diff --git a/.github/workflows/build_wheels_linux.yml b/.github/workflows/build_wheels_linux.yml index 7c05cbe8bd..a8d96abc8a 100644 --- a/.github/workflows/build_wheels_linux.yml +++ b/.github/workflows/build_wheels_linux.yml @@ -28,7 +28,7 @@ jobs: os: linux with-cpu: enable with-cuda: enable - with-rocm: disable + with-rocm: enable with-xpu: enable # Note: if free-threaded python is required add py3.13t here python-versions: '["3.9"]' diff --git a/setup.py b/setup.py index 7e60acbfa8..a269d4410d 100644 --- a/setup.py +++ b/setup.py @@ -311,16 +311,17 @@ def get_extensions(): glob.glob(os.path.join(extensions_cuda_dir, "**/*.cu"), recursive=True) ) - extensions_hip_dir = os.path.join( - extensions_dir, "cuda", "tensor_core_tiled_layout" - ) - hip_sources = list( - glob.glob(os.path.join(extensions_hip_dir, "*.cu"), recursive=True) - ) - extensions_hip_dir = os.path.join(extensions_dir, "cuda", "sparse_marlin") - hip_sources += list( - glob.glob(os.path.join(extensions_hip_dir, "*.cu"), recursive=True) - ) + # Define HIP source directories + hip_source_dirs = [ + os.path.join(extensions_dir, "cuda", "tensor_core_tiled_layout"), + # TODO: Add sparse_marlin back in once we have a ROCm build for it + # os.path.join(extensions_dir, "cuda", "sparse_marlin") + ] + + # Collect all HIP sources from the defined directories + hip_sources = [] + for hip_dir in hip_source_dirs: + hip_sources.extend(glob.glob(os.path.join(hip_dir, "*.cu"), recursive=True)) # Collect CUDA source files if needed if not IS_ROCM and use_cuda: