@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / ea8489fce2
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 17, 05:30 UTC

ROCm: Allow setting compilation target (#2581)

Rasmus Larsen committed Jan 29, 2024 at 19:52 UTC ea8489fce266d69f2fbe314c1385956b1a342e12
1 file changed +9 -5
setup.py
+9 -5
@@ -287,11 +287,15 @@ if _is_cuda():
287 },
288 ))
289 elif _is_hip():
290 - amd_arch = get_amdgpu_offload_arch()
291 - if amd_arch not in ROCM_SUPPORTED_ARCHS:
292 - raise RuntimeError(
293 - f"Only the following arch is supported: {ROCM_SUPPORTED_ARCHS}"
294 - f"amdgpu_arch_found: {amd_arch}")
290 + amd_archs = os.getenv("GPU_ARCHS")
291 + if amd_archs is None:
292 + amd_archs = get_amdgpu_offload_arch()
293 + for arch in amd_archs.split(";"):
294 + if arch not in ROCM_SUPPORTED_ARCHS:
295 + raise RuntimeError(
296 + f"Only the following arch is supported: {ROCM_SUPPORTED_ARCHS}"
297 + f"amdgpu_arch_found: {arch}")
298 + NVCC_FLAGS += [f"--offload-arch={arch}"]
299
300 elif _is_neuron():
301 neuronxcc_version = get_neuronxcc_version()