9
9
# TOP_DIR
10
10
TOP_DIR = os .path .dirname (os .path .realpath (__file__ )) if not 'TOP_DIR' in os .environ else os .environ ["TOP_DIR" ]
11
11
12
- nox .options .sessions = ["l0_api_tests-3" ]
12
+ SUPPORTED_PYTHON_VERSIONS = ["3.7" , "3.8" , "3.9" , "3.10" ]
13
+
14
+ nox .options .sessions = ["l0_api_tests-3.7" ]
13
15
14
16
def install_deps (session ):
15
17
print ("Installing deps" )
@@ -268,62 +270,62 @@ def run_l2_multi_gpu_tests(session, use_host_env=False):
268
270
run_multi_gpu_tests (session , use_host_env )
269
271
cleanup (session )
270
272
271
- @nox .session (python = [ "3" ] , reuse_venv = True )
273
+ @nox .session (python = SUPPORTED_PYTHON_VERSIONS , reuse_venv = True )
272
274
def l0_api_tests (session ):
273
275
"""When a developer needs to check correctness for a PR or something"""
274
276
run_l0_api_tests (session , use_host_env = False )
275
277
276
- @nox .session (python = [ "3" ] , reuse_venv = True )
278
+ @nox .session (python = SUPPORTED_PYTHON_VERSIONS , reuse_venv = True )
277
279
def l0_api_tests_host_deps (session ):
278
280
"""When a developer needs to check basic api functionality using host dependencies"""
279
281
run_l0_api_tests (session , use_host_env = True )
280
282
281
- @nox .session (python = [ "3" ] , reuse_venv = True )
283
+ @nox .session (python = SUPPORTED_PYTHON_VERSIONS , reuse_venv = True )
282
284
def l0_dla_tests_host_deps (session ):
283
285
"""When a developer needs to check basic api functionality using host dependencies"""
284
286
run_l0_dla_tests (session , use_host_env = True )
285
287
286
- @nox .session (python = [ "3" ] , reuse_venv = True )
288
+ @nox .session (python = SUPPORTED_PYTHON_VERSIONS , reuse_venv = True )
287
289
def l1_accuracy_tests (session ):
288
290
"""Checking accuracy performance on various usecases"""
289
291
run_l1_accuracy_tests (session , use_host_env = False )
290
292
291
- @nox .session (python = [ "3" ] , reuse_venv = True )
293
+ @nox .session (python = SUPPORTED_PYTHON_VERSIONS , reuse_venv = True )
292
294
def l1_accuracy_tests_host_deps (session ):
293
295
"""Checking accuracy performance on various usecases using host dependencies"""
294
296
run_l1_accuracy_tests (session , use_host_env = True )
295
297
296
- @nox .session (python = [ "3" ] , reuse_venv = True )
298
+ @nox .session (python = SUPPORTED_PYTHON_VERSIONS , reuse_venv = True )
297
299
def l1_int8_accuracy_tests (session ):
298
300
"""Checking accuracy performance on various usecases"""
299
301
run_l1_int8_accuracy_tests (session , use_host_env = False )
300
302
301
- @nox .session (python = [ "3" ] , reuse_venv = True )
303
+ @nox .session (python = SUPPORTED_PYTHON_VERSIONS , reuse_venv = True )
302
304
def l1_int8_accuracy_tests_host_deps (session ):
303
305
"""Checking accuracy performance on various usecases using host dependencies"""
304
306
run_l1_int8_accuracy_tests (session , use_host_env = True )
305
307
306
- @nox .session (python = [ "3" ] , reuse_venv = True )
308
+ @nox .session (python = SUPPORTED_PYTHON_VERSIONS , reuse_venv = True )
307
309
def l2_trt_compatibility_tests (session ):
308
310
"""Makes sure that TensorRT Python and Torch-TensorRT can work together"""
309
311
run_l2_trt_compatibility_tests (session , use_host_env = False )
310
312
311
- @nox .session (python = [ "3" ] , reuse_venv = True )
313
+ @nox .session (python = SUPPORTED_PYTHON_VERSIONS , reuse_venv = True )
312
314
def l2_trt_compatibility_tests_host_deps (session ):
313
315
"""Makes sure that TensorRT Python and Torch-TensorRT can work together using host dependencies"""
314
316
run_l2_trt_compatibility_tests (session , use_host_env = True )
315
317
316
- @nox .session (python = [ "3" ] , reuse_venv = True )
318
+ @nox .session (python = SUPPORTED_PYTHON_VERSIONS , reuse_venv = True )
317
319
def l2_multi_gpu_tests (session ):
318
320
"""Makes sure that Torch-TensorRT can operate on multi-gpu systems"""
319
321
run_l2_multi_gpu_tests (session , use_host_env = False )
320
322
321
- @nox .session (python = [ "3" ] , reuse_venv = True )
323
+ @nox .session (python = SUPPORTED_PYTHON_VERSIONS , reuse_venv = True )
322
324
def l2_multi_gpu_tests_host_deps (session ):
323
325
"""Makes sure that Torch-TensorRT can operate on multi-gpu systems using host dependencies"""
324
326
run_l2_multi_gpu_tests (session , use_host_env = True )
325
327
326
- @nox .session (python = [ "3" ] , reuse_venv = True )
328
+ @nox .session (python = SUPPORTED_PYTHON_VERSIONS , reuse_venv = True )
327
329
def download_test_models (session ):
328
330
"""Grab all the models needed for testing"""
329
331
download_models (session , use_host_env = True )
0 commit comments