nondeterminism warnings

Summary: do like xformers.

Reviewed By: shapovalov

Differential Revision: D44541873

fbshipit-source-id: 2c23160591cd9026fcd4972998d1bc90adba1356
This commit is contained in:
Jeremy Reizenstein
2023-05-04 12:50:41 -07:00
committed by Facebook GitHub Bot
parent 3e3644e534
commit ef5f620263
7 changed files with 24 additions and 1 deletions

View File

@@ -423,7 +423,8 @@ at::Tensor RasterizePointsBackwardCuda(
at::CheckedFrom c = "RasterizePointsBackwardCuda";
at::checkAllSameGPU(c, {points_t, idxs_t, grad_zbuf_t, grad_dists_t});
at::checkAllSameType(c, {points_t, grad_zbuf_t, grad_dists_t});
// This is nondeterministic because atomicAdd
at::globalContext().alertNotDeterministic("RasterizePointsBackwardCuda");
// Set the device for the kernel launch based on the device of the input
at::cuda::CUDAGuard device_guard(points.device());
cudaStream_t stream = at::cuda::getCurrentCUDAStream();