10
10
# TOP_DIR
11
11
TOP_DIR = os .path .dirname (os .path .realpath (__file__ )) if not 'TOP_DIR' in os .environ else os .environ ["TOP_DIR" ]
12
12
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
+
13
16
SUPPORTED_PYTHON_VERSIONS = ["3.7" , "3.8" , "3.9" , "3.10" ]
14
17
15
18
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):
32
35
def install_torch_trt (session ):
33
36
print ("Installing latest torch-tensorrt build" )
34
37
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" )
36
42
37
43
def download_datasets (session ):
38
44
print ("Downloading dataset to path" , os .path .join (TOP_DIR , 'examples/int8/training/vgg16' ))
@@ -334,4 +340,4 @@ def download_test_models(session):
334
340
@nox .session (python = SUPPORTED_PYTHON_VERSIONS , reuse_venv = True )
335
341
def download_test_models_host_deps (session ):
336
342
"""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