Replace assert with cuda assert macro (#31297)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/31297
Follow-up to https://github.com/pytorch/pytorch/pull/31276
This is final replacement needed for aten out of place hipification.
Test Plan: wait for CI to clear.
Reviewed By: bddppq
Differential Revision: D19070209
fbshipit-source-id: 1428cd0ddfb5a8f4e234fabce822285e898047ea