forked from dusty-nv/jetson-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
52 lines (39 loc) · 1.85 KB
/
config.py
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from jetson_containers import CUDA_ARCHITECTURES, CUDA_VERSION, update_dependencies
from packaging.version import Version
def tensorrt_llm(version, branch=None, patch=None, src=None, depends=None, requires=None, default=False):
trt_llm = package.copy()
trt_llm['name'] = f'tensorrt_llm:{version}'
if not branch:
branch = 'v' + version
if len(branch.split('.')) < 3:
branch = branch + '.0'
if not patch:
patch = 'patches/empty.diff'
if not src:
src = 'sources/empty.tar.gz'
trt_llm['build_args'] = {
'TRT_LLM_VERSION': version,
'TRT_LLM_BRANCH': branch,
'TRT_LLM_SOURCE': src,
'TRT_LLM_PATCH': patch,
'CUDA_ARCHS': ';'.join([f'{x}-real' for x in CUDA_ARCHITECTURES]),
}
if depends:
trt_llm['depends'] = update_dependencies(trt_llm['depends'], depends)
#if tensorrt:
# trt_llm['depends'] = [f"tensorrt:{tensorrt}" if x=='tensorrt' else x for x in trt_llm['depends']]
if requires:
trt_llm['requires'] = requires
builder = trt_llm.copy()
builder['name'] = builder['name'] + '-builder'
builder['build_args'] = {**builder['build_args'], 'FORCE_BUILD': 'on'}
if default:
trt_llm['alias'] = 'tensorrt_llm'
builder['alias'] = 'tensorrt_llm:builder'
return trt_llm, builder
package = [
tensorrt_llm('0.13.0', src='sources/tensorrt_llm-0.13.0.tar.gz', requires=['==r36.*', '>=cu124'], default=True),
tensorrt_llm('0.10.dev0', src='sources/tensorrt_llm-0.10.0.dev0.tar.gz', requires=['==r36.*', '>=cu124'], default=False),
#tensorrt_llm('0.9.dev', '118b3d7', patch='patches/118b3d7.diff', requires=['==r36.*', '>=cu124'], default=False),
tensorrt_llm('0.5', patch='patches/0.5.diff', requires=['==r36.*', '==cu122'], default=True),
]