Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"No CUDA architecture was specified" error on AMD gpu #91

Open
BowenBao opened this issue Feb 17, 2025 · 2 comments
Open

"No CUDA architecture was specified" error on AMD gpu #91

BowenBao opened this issue Feb 17, 2025 · 2 comments

Comments

@BowenBao
Copy link

Following https://github.com/tile-ai/tilelang/blob/main/install_rocm.sh to build tilelang from source. The following error is emitted upon importing tilelang.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/workspace/tilelang/tilelang/__init__.py", line 108, in <module>
    from .jit import jit, JITKernel  # noqa: F401
  File "/workspace/tilelang/tilelang/jit/__init__.py", line 15, in <module>
    from tilelang.jit.adapter import BaseKernelAdapter
  File "/workspace/tilelang/tilelang/jit/adapter/__init__.py", line 6, in <module>
    from .torch_cpp import TorchCPPKernelAdapter  # noqa: F401
  File "/workspace/tilelang/tilelang/jit/adapter/torch_cpp.py", line 10, in <module>
    from tilelang.jit.core import load_cuda_ops
  File "/workspace/tilelang/tilelang/jit/core.py", line 30, in <module>
    from .env import CUTLASS_INCLUDE_DIR, TILELANG_TEMPLATE_PATH, TILELANG_JIT_DIR
  File "/workspace/tilelang/tilelang/jit/env.py", line 66, in <module>
    _initialize_torch_cuda_arch_flags()
  File "/workspace/tilelang/tilelang/jit/env.py", line 44, in _initialize_torch_cuda_arch_flags
    compute_version = "".join(nvcc.get_target_compute_version(target).split("."))
  File "/workspace/tilelang/tilelang/../3rdparty/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 239, in __call__
    raise_last_ffi_error()
  File "/workspace/tilelang/tilelang/../3rdparty/tvm/python/tvm/_ffi/base.py", line 481, in raise_last_ffi_error
    raise py_err
  File "/workspace/tilelang/tilelang/contrib/nvcc.py", line 297, in get_target_compute_version
    raise ValueError("No CUDA architecture was specified or GPU detected."
ValueError: No CUDA architecture was specified or GPU detected.Try specifying it by adding '-arch=sm_xx' to your target.
@LeiWang1999
Copy link
Contributor

Thanks @BowenBao for reporting, it's indeed a bug as we don't test on amd devices, we'll soon make a fix, sorry for the trouble.

@LeiWang1999
Copy link
Contributor

or would you mind send a pull request for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants