-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Expand file tree
/
Copy pathconanfile.py
More file actions
33 lines (26 loc) · 999 Bytes
/
conanfile.py
File metadata and controls
33 lines (26 loc) · 999 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import os
import sys
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("libnuma/system")
def generate(self):
cmake = CMakeDeps(self)
cmake.generate()
tc = CMakeToolchain(self)
tc.generate()
def build_requirements(self):
# register libnuma_conan.py for conan
base_dir = os.path.dirname(os.path.abspath(__file__))
libnuma_path = os.path.join(base_dir, "libnuma_conan.py")
conan_bin = os.path.abspath(sys.argv[0])
if not os.path.isfile(conan_bin) or not os.access(conan_bin, os.X_OK):
raise RuntimeError(f"Conan binary not found {sys.argv[0]}")
self.run(
f"{conan_bin} export {libnuma_path} --name=libnuma --version=system"
)