TensorRT-LLMs/cpp/conanfile.py
tburt-nv c0dd6cbce0
infra: move nvrtc_wrapper to conan (#3282)
* 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>
2025-04-15 05:31:01 +08:00

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()