"examples/vscode:/vscode.git/clone" did not exist on "159af5dfb322df80356130e30130db20a0ebdf21"
Commit 5ddde621 authored by Lei Wang's avatar Lei Wang Committed by LeiWang1999
Browse files

[Enhancement] Add get_nvcc_compiler function to retrieve nvcc path (#414)

* Introduced a new function `get_nvcc_compiler` in nvcc.py to obtain the path to the nvcc compiler.
* Updated LibraryGenerator to use `get_nvcc_compiler` instead of hardcoding the nvcc command, improving maintainability and flexibility.
parent bf824406
......@@ -412,3 +412,8 @@ def have_fp8(compute_version):
conditions.append(major == 8 and minor >= 9)
conditions.append(major >= 9)
return any(conditions)
def get_nvcc_compiler() -> str:
"""Get the path to the nvcc compiler"""
return os.path.join(find_cuda_path(), "bin", "nvcc")
from typing import Optional
from .utils import is_cuda_target, is_hip_target, is_cpu_target
from tilelang import tvm as tvm
from tilelang.contrib.nvcc import get_target_compute_version
from tilelang.contrib.nvcc import get_target_compute_version, get_nvcc_compiler
from tvm.target import Target
import ctypes
import os
......@@ -42,7 +42,7 @@ class LibraryGenerator(object):
libpath = src.name.replace(".cu", ".so")
command = [
"nvcc",
get_nvcc_compiler(),
"-std=c++17",
"-w", # Disable all warning messages
"-Xcudafe",
......
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