Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TensorRT easyblock for TensorRT 10+ #3554

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions easybuild/easyblocks/t/tensorrt.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##
# Copyright 2017-2025 Ghent University
# Copyright 2017-2024 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
Expand Down Expand Up @@ -96,11 +96,15 @@ def extensions_step(self):
super(EB_TensorRT, self).extensions_step()

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

for whl in whls:
whl_paths = glob.glob(os.path.join(self.installdir, whl))
if len(whl_paths) == 1:
Expand All @@ -118,8 +122,10 @@ def extensions_step(self):
cmd += " --ignore-installed --no-deps"

run_cmd(cmd, log_all=True, simple=True, log_ok=True)
elif whl_paths:
raise EasyBuildError("Failed to isolate .whl in %s: %s", self.installdir, whl_paths)
else:
raise EasyBuildError("Failed to isolate .whl in %s: %s", whl_paths, self.installdir)
raise EasyBuildError("No .whl found in %s for patter %s", self.installdir, whl)

def sanity_check_step(self):
"""Custom sanity check for TensorRT."""
Expand Down