Skip to content

Commit 6d856c2

Browse files
authored
[release/2.5] Update CUDAPluggableAllocator.h (#1999)
Altering the flag to use the correct streamType for CUDAPluggableAllocator. This is impacting Distributed Fused Adam in Rocm/APEX. `2025-03-25T14:19:25.0187731Z #5 1815.5 FAILED: /root/dockerbuild/pytorch.1.7.0a0/apex/build/temp.linux-x86_64-cpython-312/apex/contrib/csrc/nccl_allocator/NCCLAllocator_hip.o` ``` torch/include/torch/csrc/cuda/CUDAPluggableAllocator.h:125:8: error: ‘void torch::cuda::CUDAPluggableAllocator::CUDAPluggableAllocator::recordStream(const c10::DataPtr&, torch::cuda::CUDAPluggableAllocator::streamType)’ marked ‘override’, but does not override 2025-03-25T14:19:25.0192670Z #5 1815.5 125 | void recordStream(const c10::DataPtr&, streamType stream) override; 2025-03-25T14:19:25.0192737Z #5 1815.5 | ^~~~~~~~~~~~ ``` Apex Commit : ROCm/apex#188
1 parent 0119c20 commit 6d856c2

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)