From f12755bad0567dcaf30304e55c7a870af87f9caa Mon Sep 17 00:00:00 2001 From: skishore Date: Wed, 19 Mar 2025 21:28:36 +0000 Subject: [PATCH] Altering the flag to use the correct streamType for CUDAPluggableAllocator. This is impacting Distributed Fused Adam in Rocm/APEX. See PR https://github.com/ROCm/apex/pull/184 --- torch/csrc/cuda/CUDAPluggableAllocator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torch/csrc/cuda/CUDAPluggableAllocator.h b/torch/csrc/cuda/CUDAPluggableAllocator.h index a600e8017b788..befb747d1c674 100644 --- a/torch/csrc/cuda/CUDAPluggableAllocator.h +++ b/torch/csrc/cuda/CUDAPluggableAllocator.h @@ -37,7 +37,7 @@ struct TORCH_CUDA_CPP_API CUDAPluggableAllocatorDeleterContext { cudaStream_t stream_; }; -#if defined(TORCH_HIP_VERSION) +#if defined(USE_ROCM) using streamType = c10::hip::HIPStream; #else using streamType = c10::cuda::CUDAStream;