Skip to content

feat: Extending nox for cxx11 ABI version #1013

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

Merged
merged 2 commits into from
May 11, 2022
Merged
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
10 changes: 8 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
# TOP_DIR
TOP_DIR=os.path.dirname(os.path.realpath(__file__)) if not 'TOP_DIR' in os.environ else os.environ["TOP_DIR"]

# Set the USE_CXX11=1 to use cxx11_abi
USE_CXX11=0 if not 'USE_CXX11' in os.environ else os.environ["USE_CXX11"]

SUPPORTED_PYTHON_VERSIONS=["3.7", "3.8", "3.9", "3.10"]

nox.options.sessions = ["l0_api_tests-" + "{}.{}".format(sys.version_info.major, sys.version_info.minor)]
Expand All @@ -32,7 +35,10 @@ def download_models(session, use_host_env=False):
def install_torch_trt(session):
print("Installing latest torch-tensorrt build")
session.chdir(os.path.join(TOP_DIR, "py"))
session.run("python", "setup.py", "develop")
if USE_CXX11:
session.run('python', 'setup.py', 'develop', '--use-cxx11-abi')
else:
session.run("python", "setup.py", "develop")

def download_datasets(session):
print("Downloading dataset to path", os.path.join(TOP_DIR, 'examples/int8/training/vgg16'))
Expand Down Expand Up @@ -334,4 +340,4 @@ def download_test_models(session):
@nox.session(python=SUPPORTED_PYTHON_VERSIONS, reuse_venv=True)
def download_test_models_host_deps(session):
"""Grab all the models needed for testing using host dependencies"""
download_models(session, use_host_env=True)
download_models(session, use_host_env=True)