ROCm: Allow setting compilation target (#2581)
This commit is contained in:
parent
1b20639a43
commit
ea8489fce2
10
setup.py
10
setup.py
@ -287,11 +287,15 @@ if _is_cuda():
|
|||||||
},
|
},
|
||||||
))
|
))
|
||||||
elif _is_hip():
|
elif _is_hip():
|
||||||
amd_arch = get_amdgpu_offload_arch()
|
amd_archs = os.getenv("GPU_ARCHS")
|
||||||
if amd_arch not in ROCM_SUPPORTED_ARCHS:
|
if amd_archs is None:
|
||||||
|
amd_archs = get_amdgpu_offload_arch()
|
||||||
|
for arch in amd_archs.split(";"):
|
||||||
|
if arch not in ROCM_SUPPORTED_ARCHS:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
f"Only the following arch is supported: {ROCM_SUPPORTED_ARCHS}"
|
f"Only the following arch is supported: {ROCM_SUPPORTED_ARCHS}"
|
||||||
f"amdgpu_arch_found: {amd_arch}")
|
f"amdgpu_arch_found: {arch}")
|
||||||
|
NVCC_FLAGS += [f"--offload-arch={arch}"]
|
||||||
|
|
||||||
elif _is_neuron():
|
elif _is_neuron():
|
||||||
neuronxcc_version = get_neuronxcc_version()
|
neuronxcc_version = get_neuronxcc_version()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user