Skip to content

Commit a9bb1d6

Browse files
committed
feat: Extending nox for cxx11 ABI version
Signed-off-by: Anurag Dixit <[email protected]>
1 parent 1c294fa commit a9bb1d6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

noxfile.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
# TOP_DIR
1111
TOP_DIR=os.path.dirname(os.path.realpath(__file__)) if not 'TOP_DIR' in os.environ else os.environ["TOP_DIR"]
1212

13+
# Set the USE_CXX11=1 to use cxx11_abi
14+
USE_CXX11=0 if not 'USE_CXX11' in os.environ else os.environ["USE_CXX11"]
15+
1316
SUPPORTED_PYTHON_VERSIONS=["3.7", "3.8", "3.9", "3.10"]
1417

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

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

0 commit comments

Comments
 (0)