Skip to content

[WARNING] cpu_adam cuda is missing or is incompatible with installed torch, only cpu ops can be compiled! #4513

Closed

Description

@lylcst

import deepspeed
[2023-10-16 05:02:49,683] [INFO] [real_accelerator.py:158:get_accelerator] Setting ds_accelerator to cuda (auto detect)
deepspeed.ops.op_builder.CPUAdamBuilder().load()
[WARNING] cpu_adam cuda is missing or is incompatible with installed torch, only cpu ops can be compiled!
Using /home/aiscuser/.cache/torch_extensions/py38_cpu as PyTorch extensions root...
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/simd.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/simd.h [skipped, no changes]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/ds_kernel_utils.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/ds_kernel_utils_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/StopWatch.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/StopWatch.h [skipped, no changes]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/cublas_wrappers.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/cublas_wrappers_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/gemm_test.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/gemm_test_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/context.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/context_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/custom_cuda_layers.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/custom_hip_layers.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/cpu_adam.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/cpu_adam_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/adam/cpu_adam.cpp -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/adam/cpu_adam_hip.cpp [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/adam/cpu_adam_impl.cpp -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/adam/cpu_adam_impl_hip.cpp [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/common/custom_cuda_kernel.cu -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/common/custom_hip_kernel.hip [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/gemm_test.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/gemm_test_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/conversion_utils.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/conversion_utils_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/memory_access_utils.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/memory_access_utils_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/quantization.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/quantization_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/reduction_utils.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/reduction_utils_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/quantization_utils.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/quantization_utils_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/cpu_adam.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/cpu_adam_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/general_kernels.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/general_kernels_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/simd.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/simd.h [skipped, no changes]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/dropout.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/dropout_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/feed_forward.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/feed_forward_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/gelu.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/gelu_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/normalize_layer.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/normalize_layer_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/softmax.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/softmax_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/strided_batch_gemm.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/strided_batch_gemm_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/ds_transformer_cuda.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/ds_transformer_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/context.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/context_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/compat.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/compat.h [skipped, no changes]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/dropout.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/dropout_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/memory_access_utils.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/memory_access_utils_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/feed_forward.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/feed_forward_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/ds_kernel_utils.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/ds_kernel_utils_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/cublas_wrappers.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/cublas_wrappers_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/normalize_layer.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/normalize_layer_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/dequantization_utils.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/dequantization_utils_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/custom_cuda_layers.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/custom_hip_layers.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/type_shim.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/type_shim_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/reduction_utils.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/reduction_utils_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/cpu_adagrad.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/cpu_adagrad_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/StopWatch.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/StopWatch.h [skipped, no changes]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/gelu.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/gelu_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/softmax.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/softmax_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/strided_batch_gemm.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/strided_batch_gemm_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/conversion_utils.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/conversion_utils_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/Timer.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/Timer_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/cpu_lion.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/cpu_lion_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/quantization.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/quantization_hip.h [skipped, already hipified]
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/quantizer.h -> /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/quantizer_hip.h [skipped, already hipified]
Successfully preprocessed all matching files.
Total number of unsupported CUDA function calls: 0

Total number of replaced kernel launches: 2
Detected CUDA files, patching ldflags
Emitting ninja build file /home/aiscuser/.cache/torch_extensions/py38_cpu/cpu_adam/build.ninja...
Building extension module cpu_adam...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/2] /opt/rocm/bin/hipcc -DWITH_HIP -DTORCH_EXTENSION_NAME=cpu_adam -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1013" -I/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes -I/opt/rocm/include -I/opt/rocm/include/rocrand -I/opt/rocm/include/hiprand -isystem /opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/include -isystem /opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/include/TH -isystem /opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/include/THC -isystem /opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/include/THH -isystem /opt/rocm/include -isystem /opt/conda/envs/py_3.8/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=1 -fPIC -std=c++17 -O3 -std=c++17 -g -Wno-reorder -L/opt/rocm/lib -lcudart -lcublas -g -march=native -fopenmp -D__AVX256 -D__DISABLE_CUDA_ -fPIC -D__HIP_PLATFORM_HCC__=1 -DUSE_ROCM=1 -DCUDA_HAS_FP16=1 -D__HIP_NO_HALF_OPERATORS__=1 -D__HIP_NO_HALF_CONVERSIONS__=1 -O3 -std=c++17 -U__HIP_NO_HALF_OPERATORS__ -U__HIP_NO_HALF_CONVERSIONS__ -U__HIP_NO_HALF2_OPERATORS__ -DROCM_VERSION_MAJOR=5 -DROCM_VERSION_MINOR=6 --offload-arch=gfx906 --offload-arch=gfx908 --offload-arch=gfx90a --offload-arch=gfx1030 --offload-arch=gfx1100 --offload-arch=gfx1101 -fno-gpu-rdc -c /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/common/custom_hip_kernel.hip -o custom_hip_kernel.cuda.o
FAILED: custom_hip_kernel.cuda.o
/opt/rocm/bin/hipcc -DWITH_HIP -DTORCH_EXTENSION_NAME=cpu_adam -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1013" -I/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes -I/opt/rocm/include -I/opt/rocm/include/rocrand -I/opt/rocm/include/hiprand -isystem /opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/include -isystem /opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/include/TH -isystem /opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/include/THC -isystem /opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/include/THH -isystem /opt/rocm/include -isystem /opt/conda/envs/py_3.8/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=1 -fPIC -std=c++17 -O3 -std=c++17 -g -Wno-reorder -L/opt/rocm/lib -lcudart -lcublas -g -march=native -fopenmp -D__AVX256 -D__DISABLE_CUDA_ -fPIC -D__HIP_PLATFORM_HCC__=1 -DUSE_ROCM=1 -DCUDA_HAS_FP16=1 -D__HIP_NO_HALF_OPERATORS__=1 -D__HIP_NO_HALF_CONVERSIONS__=1 -O3 -std=c++17 -U__HIP_NO_HALF_OPERATORS__ -U__HIP_NO_HALF_CONVERSIONS__ -U__HIP_NO_HALF2_OPERATORS__ -DROCM_VERSION_MAJOR=5 -DROCM_VERSION_MINOR=6 --offload-arch=gfx906 --offload-arch=gfx908 --offload-arch=gfx90a --offload-arch=gfx1030 --offload-arch=gfx1100 --offload-arch=gfx1101 -fno-gpu-rdc -c /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/common/custom_hip_kernel.hip -o custom_hip_kernel.cuda.o
clang-16: warning: -lcudart: 'linker' input unused [-Wunused-command-line-argument]
clang-16: warning: -lcublas: 'linker' input unused [-Wunused-command-line-argument]
In file included from /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/common/custom_hip_kernel.hip:8:
In file included from /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/custom_hip_layers.h:17:
In file included from /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/context_hip.h:17:
In file included from /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/gemm_test_hip.h:20:
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/cublas_wrappers_hip.h:31:20: error: unknown type name 'rocblas_gemm_algo'
rocblas_gemm_algo algo = rocblas_gemm_algo_standard);
^
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/cublas_wrappers_hip.h:31:45: error: use of undeclared identifier 'rocblas_gemm_algo_standard'
rocblas_gemm_algo algo = rocblas_gemm_algo_standard);
^
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/cublas_wrappers_hip.h:48:20: error: unknown type name 'rocblas_gemm_algo'
rocblas_gemm_algo algo = rocblas_gemm_algo_standard);
^
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/cublas_wrappers_hip.h:48:45: error: use of undeclared identifier 'rocblas_gemm_algo_standard'
rocblas_gemm_algo algo = rocblas_gemm_algo_standard);
^
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/cublas_wrappers_hip.h:69:33: error: unknown type name 'rocblas_gemm_algo'
rocblas_gemm_algo algo = rocblas_gemm_algo_standard);
^
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/cublas_wrappers_hip.h:69:58: error: use of undeclared identifier 'rocblas_gemm_algo_standard'
rocblas_gemm_algo algo = rocblas_gemm_algo_standard);
^
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/cublas_wrappers_hip.h:90:33: error: unknown type name 'rocblas_gemm_algo'
rocblas_gemm_algo algo = rocblas_gemm_algo_standard);
^
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/cublas_wrappers_hip.h:90:58: error: use of undeclared identifier 'rocblas_gemm_algo_standard'
rocblas_gemm_algo algo = rocblas_gemm_algo_standard);
^
In file included from /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/common/custom_hip_kernel.hip:8:
In file included from /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/custom_hip_layers.h:17:
In file included from /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/context_hip.h:17:
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/gemm_test_hip.h:69:40: error: unknown type name 'rocblas_gemm_algo'
static_cast<rocblas_gemm_algo>(algo));
^
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/gemm_test_hip.h:88:40: error: unknown type name 'rocblas_gemm_algo'
static_cast<rocblas_gemm_algo>(algo));
^
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/gemm_test_hip.h:107:40: error: unknown type name 'rocblas_gemm_algo'
static_cast<rocblas_gemm_algo>(algo));
^
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/gemm_test_hip.h:123:30: error: use of undeclared identifier 'rocblas_gemm_algo_standard'
for (int algo = (int)rocblas_gemm_algo_standard; algo <= (int)rocblas_gemm_algo_standard;
^
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/gemm_test_hip.h:123:71: error: use of undeclared identifier 'rocblas_gemm_algo_standard'
for (int algo = (int)rocblas_gemm_algo_standard; algo <= (int)rocblas_gemm_algo_standard;
^
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/gemm_test_hip.h:132:13: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
hipDeviceSynchronize();
^~~~~~~~~~~~~~~~~~~~
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/gemm_test_hip.h:138:13: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
hipDeviceSynchronize();
^~~~~~~~~~~~~~~~~~~~
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/gemm_test_hip.h:213:53: error: unknown type name 'rocblas_gemm_algo'
static_cast<rocblas_gemm_algo>(algo));
^
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/gemm_test_hip.h:247:53: error: unknown type name 'rocblas_gemm_algo'
static_cast<rocblas_gemm_algo>(algo));
^
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/gemm_test_hip.h:278:53: error: unknown type name 'rocblas_gemm_algo'
static_cast<rocblas_gemm_algo>(algo));
^
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/gemm_test_hip.h:294:30: error: use of undeclared identifier 'rocblas_gemm_algo_standard'
for (int algo = (int)rocblas_gemm_algo_standard; algo <= (int)rocblas_gemm_algo_standard;
^
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/gemm_test_hip.h:294:71: error: use of undeclared identifier 'rocblas_gemm_algo_standard'
for (int algo = (int)rocblas_gemm_algo_standard; algo <= (int)rocblas_gemm_algo_standard;
^
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/gemm_test_hip.h:303:13: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
hipDeviceSynchronize();
^~~~~~~~~~~~~~~~~~~~
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/gemm_test_hip.h:309:13: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
hipDeviceSynchronize();
^~~~~~~~~~~~~~~~~~~~
In file included from /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/common/custom_hip_kernel.hip:8:
In file included from /opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/custom_hip_layers.h:17:
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/csrc/includes/context_hip.h:68:9: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
hipFree(_workspace);
^~~~~~~ ~~~~~~~~~~
5 warnings and 18 errors generated when compiling for gfx1030.
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 2100, in _run_ninja_build
subprocess.run(
File "/opt/conda/envs/py_3.8/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "", line 1, in
File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/op_builder/builder.py", line 446, in load
return self.jit_load(verbose)
File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed/ops/op_builder/builder.py", line 489, in jit_load
op_module = load(name=self.name,
File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1308, in load
return _jit_compile(
File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1710, in _jit_compile
_write_ninja_file_and_build_library(
File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1823, in _write_ninja_file_and_build_library
_run_ninja_build(
File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 2116, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error building extension 'cpu_adam'

ds_report:

DeepSpeed C++/CUDA extension op report

NOTE: Ops not installed will be just-in-time (JIT) compiled at
runtime if needed. Op compatibility means that your system
meet the required dependencies to JIT install the op.

JIT compiled ops requires ninja
ninja .................. [OKAY]

op name ................ installed .. compatible

[WARNING] async_io requires the dev libaio .so object and headers but these were not found.
[WARNING] async_io: please install the libaio-dev package with apt
[WARNING] If libaio is already installed (perhaps from source), try setting the CFLAGS and LDFLAGS environment variables to where it can be found.
async_io ............... [NO] ....... [NO]
fused_adam ............. [NO] ....... [OKAY]
cpu_adam ............... [NO] ....... [OKAY]
cpu_adagrad ............ [NO] ....... [OKAY]
cpu_lion ............... [NO] ....... [OKAY]
[WARNING] Please specify the CUTLASS repo directory as environment variable $CUTLASS_PATH
evoformer_attn ......... [NO] ....... [NO]
fused_lamb ............. [NO] ....... [OKAY]
fused_lion ............. [NO] ....... [OKAY]
quantizer .............. [NO] ....... [OKAY]
random_ltd ............. [NO] ....... [OKAY]
[WARNING] sparse_attn is not compatible with ROCM
sparse_attn ............ [NO] ....... [NO]
spatial_inference ...... [NO] ....... [OKAY]
transformer ............ [NO] ....... [OKAY]
stochastic_transformer . [NO] ....... [OKAY]
transformer_inference .. [NO] ....... [OKAY]

DeepSpeed general environment info:
torch install path ............... ['/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch']
torch version .................... 2.2.0a0+git92fea5a
deepspeed install path ........... ['/opt/conda/envs/py_3.8/lib/python3.8/site-packages/deepspeed']
deepspeed info ................... 0.11.1, unknown, unknown
torch cuda version ............... None
torch hip version ................ 5.6.31061-8c743ae5d
nvcc version ..................... None
deepspeed wheel compiled w. ...... torch 2.2, hip 5.6
shared memory (/dev/shm) size .... 797.00 GB

Activity

  1. loadams commented on Oct 18, 2023

    @loadams
    Collaborator

    Hi @lylcst - can you let us know what command you are running/how you installed DeepSpeed and some information about your environment? It looks like you're using torch 2.2 nightly? I'm not sure, but it looks like the torch version isn't built for ROCm here?

    2.2.0a0+git92fea5a vs torch 2.2, hip 5.6?

    Can you run the following commands in your environment?

    python -c "import torch; print('torch:', torch.__version__, torch)"
    python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
    
  2. self-assigned this
    on Oct 18, 2023
  3. loadams commented on Oct 18, 2023

    @loadams
    Collaborator

    FYI @rraminen and @jithunnair-amd since this might be related to ROCm and changes in torch nightly.

  4. added
    build
    on Oct 18, 2023
  5. lylcst commented on Oct 19, 2023

    @lylcst
    Author

    Hi @lylcst - can you let us know what command you are running/how you installed DeepSpeed and some information about your environment? It looks like you're using torch 2.2 nightly? I'm not sure, but it looks like the torch version isn't built for ROCm here?

    2.2.0a0+git92fea5a vs torch 2.2, hip 5.6?

    Can you run the following commands in your environment?

    python -c "import torch; print('torch:', torch.__version__, torch)"
    python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
    

    hi, thanks for your reply, this is the result of this two commands:
    image

    and I run the following command to get the error info above

    python -c "import deepspeed; deepspeed.ops.op_builder.CPUAdamBuilder().load()"
    

    It seems to that cuda is available, and I installed deepspeed with 'pip install deepspeed' based on rocm/pytorch-nightly:2023-10-09-rocm5.6 docker image, and this error seems to occur when I use the optimizer states offload.

  6. fxmarty commented on Oct 19, 2023

    @fxmarty

    Same issue running in rocm/dev-ubuntu-22.04:5.6 with torch==2.1.0+rocm5.6, torchaudio==2.1.0+rocm5.6, torchvision==0.16.0+rocm5.6, deepspeed=0.11.1 (deepspeed being installed through pip install deepspeed)

    edit: this looks to be a duplicate of #4507 and that this will be fixed with #4538

  7. loadams commented on Oct 19, 2023

    @loadams
    Collaborator

    @fxmarty - you're correct. That PR should go in shortly. If you are hitting any other issues after that one, please open a new issue and let us know. Thanks!

  8. QingtaoLi1 commented on Jul 4, 2025

    @QingtaoLi1

    I meet the same error on MI300X with deepspeed==0.15.4: [WARNING] cpu_adam cuda is missing or is incompatible with installed torch, only cpu ops can be compiled!

    ds_report result:

    --------------------------------------------------
    DeepSpeed C++/CUDA extension op report
    --------------------------------------------------
    NOTE: Ops not installed will be just-in-time (JIT) compiled at
          runtime if needed. Op compatibility means that your system
          meet the required dependencies to JIT install the op.
    --------------------------------------------------
    JIT compiled ops requires ninja
    ninja .................. [OKAY]
    --------------------------------------------------
    op name ................ installed .. compatible
    --------------------------------------------------
    async_io ............... [NO] ....... [OKAY]
    fused_adam ............. [NO] ....... [OKAY]
    cpu_adam ............... [NO] ....... [OKAY]
    cpu_adagrad ............ [NO] ....... [OKAY]
    cpu_lion ............... [NO] ....... [OKAY]
     [WARNING]  Please specify the CUTLASS repo directory as environment variable $CUTLASS_PATH
    evoformer_attn ......... [NO] ....... [NO]
     [WARNING]  FP Quantizer is using an untested triton version (3.1.0), only 2.3.(0, 1) and 3.0.0 are known to be compatible with these kernels
    fp_quantizer ........... [NO] ....... [NO]
    fused_lamb ............. [NO] ....... [OKAY]
    fused_lion ............. [NO] ....... [OKAY]
     [WARNING]  gds is not compatible with ROCM
    gds .................... [NO] ....... [NO]
    transformer_inference .. [NO] ....... [OKAY]
    inference_core_ops ..... [NO] ....... [OKAY]
    cutlass_ops ............ [NO] ....... [OKAY]
    quantizer .............. [NO] ....... [OKAY]
    ragged_device_ops ...... [NO] ....... [OKAY]
    ragged_ops ............. [NO] ....... [OKAY]
    random_ltd ............. [NO] ....... [OKAY]
     [WARNING]  sparse_attn is not compatible with ROCM
    sparse_attn ............ [NO] ....... [NO]
    spatial_inference ...... [NO] ....... [OKAY]
    transformer ............ [NO] ....... [OKAY]
    stochastic_transformer . [NO] ....... [OKAY]
    --------------------------------------------------
    DeepSpeed general environment info:
    torch version .................... 2.5.1+rocm6.1
    deepspeed info ................... 0.15.4, unknown, unknown
    torch cuda version ............... None
    torch hip version ................ 6.1.40091-a8dbc0c19
    nvcc version ..................... None
    deepspeed wheel compiled w. ...... torch 2.5, hip 6.1
    
  9. QingtaoLi1 commented on Jul 7, 2025

    @QingtaoLi1

    I find the problem. I'm using uv env, while the variable has no effect in uv pip. DS_BUILD_CPU_ADAM=1 pip install deepspeed==0.15.4 without uv works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

build

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions