[ROCm] define C10_WARP_SIZE to warpSize HIP constant (#64302)
authorJeff Daily <jeff.daily@amd.com>
Fri, 10 Sep 2021 16:36:26 +0000 (09:36 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 10 Sep 2021 16:43:47 +0000 (09:43 -0700)
commitc7b03e2b832aba58cf42f31e8bf993f16e6317d0
tree64041db4da5423ffefe7e0ba553be9321a4cac28
parentdb3fcf0af3a5ce0103b72fb9f7c28719bea6273c
[ROCm] define C10_WARP_SIZE to warpSize HIP constant (#64302)

Summary:
warpSize is defined as a constexpr in HIP headers.  It is incorrect to assume warpSize 64.  This change fixes the C10_WARP_SIZE definition in torch sources similar to [how it was done in caffe2](https://github.com/pytorch/pytorch/blob/master/caffe2/utils/GpuDefs.cuh#L10-L14).

cc jeffdaily sunway513 jithunnair-amd ROCmSupport

Pull Request resolved: https://github.com/pytorch/pytorch/pull/64302

Reviewed By: mrshenli

Differential Revision: D30785975

Pulled By: malfet

fbshipit-source-id: 68f8333182ad4d02bd0c8d02f1751a50bc5bafa7
c10/macros/Macros.h