1010# TOP_DIR
1111TOP_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+
1316SUPPORTED_PYTHON_VERSIONS = ["3.7" , "3.8" , "3.9" , "3.10" ]
1417
1518nox .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):
3235def 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
3743def 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 )
335341def 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