Skip to content

Commit 1ae9953

Browse files
[ROCm] Update CUDAPluggableAllocator.h (#1984) (pytorch#153974)
[ROCm] Update CUDAPluggableAllocator.h (#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 (cherry picked from commit a19b667) Co-authored-by: Sriram Kumar <[email protected]>
1 parent 4a815ed commit 1ae9953

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)