mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 13:44:15 +08:00
[ROCm] enforce ROCM_VERSION >= 6.0 (#125646)
Remove any code relying on ROCM_VERSION < 6.0. Pull Request resolved: https://github.com/pytorch/pytorch/pull/125646 Approved by: https://github.com/albanD, https://github.com/eqy
This commit is contained in:
committed by
PyTorch MergeBot
parent
0116ffae7f
commit
ae9a4fa63c
@ -235,11 +235,9 @@ COMMON_HIP_FLAGS = [
|
||||
'-fPIC',
|
||||
'-D__HIP_PLATFORM_AMD__=1',
|
||||
'-DUSE_ROCM=1',
|
||||
'-DHIPBLAS_V2',
|
||||
]
|
||||
|
||||
if ROCM_VERSION is not None and ROCM_VERSION >= (6, 0):
|
||||
COMMON_HIP_FLAGS.append('-DHIPBLAS_V2')
|
||||
|
||||
COMMON_HIPCC_FLAGS = [
|
||||
'-DCUDA_HAS_FP16=1',
|
||||
'-D__HIP_NO_HALF_OPERATORS__=1',
|
||||
@ -1083,8 +1081,7 @@ def CUDAExtension(name, sources, *args, **kwargs):
|
||||
libraries.append('torch_cpu')
|
||||
libraries.append('torch_python')
|
||||
if IS_HIP_EXTENSION:
|
||||
assert ROCM_VERSION is not None
|
||||
libraries.append('amdhip64' if ROCM_VERSION >= (3, 5) else 'hip_hcc')
|
||||
libraries.append('amdhip64')
|
||||
libraries.append('c10_hip')
|
||||
libraries.append('torch_hip')
|
||||
else:
|
||||
@ -1907,9 +1904,8 @@ def _prepare_ldflags(extra_ldflags, with_cuda, verbose, is_standalone):
|
||||
if CUDNN_HOME is not None:
|
||||
extra_ldflags.append(f'-L{os.path.join(CUDNN_HOME, "lib64")}')
|
||||
elif IS_HIP_EXTENSION:
|
||||
assert ROCM_VERSION is not None
|
||||
extra_ldflags.append(f'-L{_join_rocm_home("lib")}')
|
||||
extra_ldflags.append('-lamdhip64' if ROCM_VERSION >= (3, 5) else '-lhip_hcc')
|
||||
extra_ldflags.append('-lamdhip64')
|
||||
return extra_ldflags
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user