Commit e3378b20 authored by zhuwenwen's avatar zhuwenwen
Browse files

add gfx

parent 318e2b5a
...@@ -67,20 +67,20 @@ CXX_FLAGS += [f"-D_GLIBCXX_USE_CXX11_ABI={ABI}"] ...@@ -67,20 +67,20 @@ CXX_FLAGS += [f"-D_GLIBCXX_USE_CXX11_ABI={ABI}"]
NVCC_FLAGS += [f"-D_GLIBCXX_USE_CXX11_ABI={ABI}"] NVCC_FLAGS += [f"-D_GLIBCXX_USE_CXX11_ABI={ABI}"]
# def get_amdgpu_offload_arch(): def get_amdgpu_offload_arch():
# command = "/opt/rocm/llvm/bin/amdgpu-offload-arch" command = "/opt/dtk-23.10/llvm/bin/amdgpu-offload-arch"
# try: try:
# output = subprocess.check_output([command]) output = subprocess.check_output([command])
# return output.decode('utf-8').strip() return output.decode('utf-8').strip()
# except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
# error_message = f"Error: {e}" error_message = f"Error: {e}"
# raise RuntimeError(error_message) from e raise RuntimeError(error_message) from e
# except FileNotFoundError as e: except FileNotFoundError as e:
# # If the command is not found, print an error message # If the command is not found, print an error message
# error_message = f"The command {command} was not found." error_message = f"The command {command} was not found."
# raise RuntimeError(error_message) from e raise RuntimeError(error_message) from e
# return None return None
def get_hipcc_rocm_version(): def get_hipcc_rocm_version():
...@@ -290,16 +290,17 @@ if _is_cuda(): ...@@ -290,16 +290,17 @@ if _is_cuda():
"nvcc": NVCC_FLAGS_PUNICA, "nvcc": NVCC_FLAGS_PUNICA,
}, },
)) ))
# elif _is_hip(): elif _is_hip():
# amd_archs = os.getenv("GPU_ARCHS") amd_archs = os.getenv("GPU_ARCHS")
# if amd_archs is None: if amd_archs is None:
# amd_archs = get_amdgpu_offload_arch() # amd_archs = get_amdgpu_offload_arch()
# for arch in amd_archs.split(";"): amd_archs = "gfx906;gfx926"
# if arch not in ROCM_SUPPORTED_ARCHS: for arch in amd_archs.split(";"):
# raise RuntimeError( if arch not in ROCM_SUPPORTED_ARCHS:
# f"Only the following arch is supported: {ROCM_SUPPORTED_ARCHS}" raise RuntimeError(
# f"amdgpu_arch_found: {arch}") f"Only the following arch is supported: {ROCM_SUPPORTED_ARCHS}"
# NVCC_FLAGS += [f"--offload-arch={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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment