Skip to content

Commit 5ed95d8

Browse files
committed
Refactor HIP source directory handling in setup.py and remove deprecated runner configuration from build workflow
1 parent addcd5a commit 5ed95d8

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

.github/workflows/build_wheels_linux.yml

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ jobs:
3232
with-xpu: enable
3333
# Note: if free-threaded python is required add py3.13t here
3434
python-versions: '["3.9"]'
35-
runner: '{"rocm": "linux.rocm.gpu.mi300.2"}'
3635

3736
build:
3837
needs: generate-matrix

setup.py

+13-10
Original file line numberDiff line numberDiff line change
@@ -311,16 +311,19 @@ def get_extensions():
311311
glob.glob(os.path.join(extensions_cuda_dir, "**/*.cu"), recursive=True)
312312
)
313313

314-
extensions_hip_dir = os.path.join(
315-
extensions_dir, "cuda", "tensor_core_tiled_layout"
316-
)
317-
hip_sources = list(
318-
glob.glob(os.path.join(extensions_hip_dir, "*.cu"), recursive=True)
319-
)
320-
extensions_hip_dir = os.path.join(extensions_dir, "cuda", "sparse_marlin")
321-
hip_sources += list(
322-
glob.glob(os.path.join(extensions_hip_dir, "*.cu"), recursive=True)
323-
)
314+
# Define HIP source directories
315+
hip_source_dirs = [
316+
os.path.join(extensions_dir, "cuda", "tensor_core_tiled_layout"),
317+
# TODO: Add sparse_marlin back in once we have a ROCm build for it
318+
#os.path.join(extensions_dir, "cuda", "sparse_marlin")
319+
]
320+
321+
# Collect all HIP sources from the defined directories
322+
hip_sources = []
323+
for hip_dir in hip_source_dirs:
324+
hip_sources.extend(
325+
glob.glob(os.path.join(hip_dir, "*.cu"), recursive=True)
326+
)
324327

325328
# Collect CUDA source files if needed
326329
if not IS_ROCM and use_cuda:

0 commit comments

Comments
 (0)