Skip to content

Commit 4b6dd47

Browse files
amd-sriramamathewc
authored andcommitted
[ROCm] Update CUDAPluggableAllocator.h (pytorch#1984) (pytorch#150010)
Altering the flag to use the correct streamType in CUDAPluggableAllocator class for ROCm gpu. The flag TORCH_HIP_VERSION does not work for ROCm as intended. This flag is replaced with USE_ROCM. This is impacting Distributed Fused Adam in Rocm/APEX when using nccl_ub feature. This has been tested with rocm/apex. See PR ROCm/apex#184 Pull Request resolved: pytorch#150010 Approved by: https://github.com/jeffdaily
1 parent e9f5fc4 commit 4b6dd47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torch/csrc/cuda/CUDAPluggableAllocator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct TORCH_CUDA_CPP_API CUDAPluggableAllocatorDeleterContext {
3737
cudaStream_t stream_{};
3838
};
3939

40-
#if defined(TORCH_HIP_VERSION)
40+
#if defined(USE_ROCM)
4141
using streamType = c10::hip::HIPStream;
4242
#else
4343
using streamType = c10::cuda::CUDAStream;

0 commit comments

Comments
 (0)