Skip to content

Commit 0e690d3

Browse files
authored
Merge pull request #3554 from Flamefire/20250114154134_new_pr_tensorrt
Update TensorRT easyblock for TensorRT 10+
2 parents 41ea350 + 3da8d6f commit 0e690d3

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

easybuild/easyblocks/t/tensorrt.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,14 @@ def extensions_step(self):
9191
super().extensions_step()
9292

9393
pyver = ''.join(get_software_version('Python').split('.')[:2])
94-
whls = [
95-
os.path.join('graphsurgeon', 'graphsurgeon-*-py2.py3-none-any.whl'),
96-
os.path.join('uff', 'uff-*-py2.py3-none-any.whl'),
97-
os.path.join('python', 'tensorrt-%s-cp%s-*-linux_x86_64.whl' % (self.version, pyver)),
98-
]
94+
whls = []
95+
# graphsurgeon and uff removed in 10.0.1
96+
if self.version < LooseVersion('10.0.1'):
97+
whls.extend([
98+
os.path.join('graphsurgeon', 'graphsurgeon-*-py2.py3-none-any.whl'),
99+
os.path.join('uff', 'uff-*-py2.py3-none-any.whl'),
100+
])
101+
whls.append(os.path.join('python', 'tensorrt-%s-cp%s-*-linux_x86_64.whl' % (self.version, pyver)))
99102

100103
installopts = ' '.join([self.cfg['installopts']] + self.py_installopts)
101104

@@ -116,8 +119,10 @@ def extensions_step(self):
116119
cmd += " --ignore-installed --no-deps"
117120

118121
run_shell_cmd(cmd)
122+
elif whl_paths:
123+
raise EasyBuildError("Failed to isolate .whl in %s: %s", self.installdir, whl_paths)
119124
else:
120-
raise EasyBuildError("Failed to isolate .whl in %s: %s", whl_paths, self.installdir)
125+
raise EasyBuildError("No .whl found in %s for patter %s", self.installdir, whl)
121126

122127
def sanity_check_step(self):
123128
"""Custom sanity check for TensorRT."""

0 commit comments

Comments
 (0)