File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -287,11 +287,15 @@ def get_torch_arch_list() -> Set[str]:
287
287
},
288
288
))
289
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 } " ]
295
299
296
300
elif _is_neuron ():
297
301
neuronxcc_version = get_neuronxcc_version ()
You can’t perform that action at this time.
0 commit comments