mirror of
https://github.com/NVIDIA/TensorRT-LLM.git
synced 2026-01-14 06:27:45 +08:00
* add pip scripts dir to path * move nvrtc_wrapper to conan * support building nvrtc wrapper from source --------- Signed-off-by: Tyler Burt <195370667+tburt-nv@users.noreply.github.com>
25 lines
758 B
Python
25 lines
758 B
Python
from conan import ConanFile
|
|
from conan.tools.cmake import CMakeDeps, CMakeToolchain
|
|
|
|
|
|
class TensorRT_LLM(ConanFile):
|
|
name = "TensorRT-LLM"
|
|
settings = "os", "arch", "compiler", "build_type"
|
|
virtualbuildenv = False
|
|
virtualrunenv = False
|
|
|
|
def requirements(self):
|
|
self.requires(
|
|
f"tensorrt_llm_nvrtc_wrapper/{self.conan_data['tensorrt_llm_nvrtc_wrapper']}"
|
|
)
|
|
|
|
def generate(self):
|
|
cmake = CMakeDeps(self)
|
|
cmake.generate()
|
|
tc = CMakeToolchain(self)
|
|
lib_dir = self.dependencies[
|
|
"tensorrt_llm_nvrtc_wrapper"].cpp_info.libdirs[0]
|
|
tc.variables[
|
|
"NVRTC_WRAPPER_LIB_SOURCE_REL_LOC"] = lib_dir + "/libtensorrt_llm_nvrtc_wrapper.so"
|
|
tc.generate()
|