@@ -216,7 +216,7 @@ def run_dynamo_backend_tests(session):
216
216
session .run_always ("pytest" , test )
217
217
218
218
219
- def run_fx_converter_tests (session ):
219
+ def run_dynamo_converter_tests (session ):
220
220
print ("Running Dynamo converter tests" )
221
221
session .chdir (os .path .join (TOP_DIR , "tests/py/dynamo/" ))
222
222
tests = [
@@ -242,11 +242,11 @@ def run_dynamo_lower_tests(session):
242
242
session .run_always ("pytest" , test )
243
243
244
244
245
- def run_dynamo_model_tests (session ):
246
- print ("Running Dynamo model tests" )
245
+ def run_dynamo_partitioning_tests (session ):
246
+ print ("Running Dynamo Partitioning tests" )
247
247
session .chdir (os .path .join (TOP_DIR , "tests/py/dynamo/" ))
248
248
tests = [
249
- "models" ,
249
+ "partitioning"
250
250
]
251
251
for test in tests :
252
252
if USE_HOST_DEPS :
@@ -255,11 +255,11 @@ def run_dynamo_model_tests(session):
255
255
session .run_always ("pytest" , test )
256
256
257
257
258
- def run_dynamo_partitioning_tests (session ):
259
- print ("Running Dynamo Partitioning tests" )
258
+ def run_dynamo_runtime_tests (session ):
259
+ print ("Running Dynamo Runtime tests" )
260
260
session .chdir (os .path .join (TOP_DIR , "tests/py/dynamo/" ))
261
261
tests = [
262
- "partitioning"
262
+ "runtime" ,
263
263
]
264
264
for test in tests :
265
265
if USE_HOST_DEPS :
@@ -268,30 +268,31 @@ def run_dynamo_partitioning_tests(session):
268
268
session .run_always ("pytest" , test )
269
269
270
270
271
- def run_dynamo_runtime_tests (session ):
272
- print ("Running Dynamo Runtime tests" )
273
- session .chdir (os .path .join (TOP_DIR , "tests/py/dynamo/" ))
271
+ def run_dynamo_model_compile_tests (session ):
272
+ print ("Running model torch-compile tests" )
273
+ session .chdir (os .path .join (TOP_DIR , "tests/py/dynamo/models " ))
274
274
tests = [
275
- "runtime " ,
275
+ "test_models.py " ,
276
276
]
277
277
for test in tests :
278
278
if USE_HOST_DEPS :
279
- session .run_always ("pytest " , test , env = {"PYTHONPATH" : PYT_PATH })
279
+ session .run_always ("python " , test , "--ir" , str ( "torch_compile" ) , env = {"PYTHONPATH" : PYT_PATH })
280
280
else :
281
- session .run_always ("pytest " , test )
281
+ session .run_always ("python " , test , "--ir" , str ( "torch_compile" ) )
282
282
283
283
284
- def run_model_tests (session ):
285
- print ("Running model tests" )
286
- session .chdir (os .path .join (TOP_DIR , "tests/py/ts " ))
284
+ def run_dynamo_model_export_tests (session ):
285
+ print ("Running model torch-export tests" )
286
+ session .chdir (os .path .join (TOP_DIR , "tests/py/dynamo/models " ))
287
287
tests = [
288
- "models" ,
288
+ "test_models_export.py" ,
289
+ "test_export_serde.py"
289
290
]
290
291
for test in tests :
291
292
if USE_HOST_DEPS :
292
- session .run_always ("pytest " , test , env = {"PYTHONPATH" : PYT_PATH })
293
+ session .run_always ("python " , test , "--ir" , str ( "dynamo" ) , env = {"PYTHONPATH" : PYT_PATH })
293
294
else :
294
- session .run_always ("pytest " , test )
295
+ session .run_always ("python " , test , "--ir" , str ( "dynamo" ) )
295
296
296
297
297
298
def run_accuracy_tests (session ):
@@ -388,37 +389,61 @@ def run_l0_api_tests(session):
388
389
cleanup (session )
389
390
390
391
391
- def run_l0_fx_tests (session ):
392
+ def run_l0_dynamo_tests (session ):
392
393
if not USE_HOST_DEPS :
393
394
install_deps (session )
394
395
install_torch_trt (session )
395
- run_fx_core_tests (session )
396
- run_fx_converter_tests (session )
397
- run_fx_lower_tests (session )
396
+ run_dynamo_backend_tests (session )
397
+ run_dynamo_converter_tests (session )
398
+ run_dynamo_lower_tests (session )
398
399
cleanup (session )
399
400
400
401
401
- def run_l0_fx_core_tests (session ):
402
+ def run_l0_dynamo_backend_tests (session ):
402
403
if not USE_HOST_DEPS :
403
404
install_deps (session )
404
405
install_torch_trt (session )
405
- run_fx_core_tests (session )
406
+ run_dynamo_backend_tests (session )
406
407
cleanup (session )
407
408
408
409
409
- def run_l0_fx_converter_tests (session ):
410
+ def run_l0_dynamo_converter_tests (session ):
410
411
if not USE_HOST_DEPS :
411
412
install_deps (session )
412
413
install_torch_trt (session )
413
- run_fx_converter_tests (session )
414
+ run_dynamo_converter_tests (session )
414
415
cleanup (session )
415
416
416
417
417
- def run_l0_fx_lower_tests (session ):
418
+ def run_l0_dynamo_lower_tests (session ):
418
419
if not USE_HOST_DEPS :
419
420
install_deps (session )
420
421
install_torch_trt (session )
421
- run_fx_lower_tests (session )
422
+ run_dynamo_lower_tests (session )
423
+ cleanup (session )
424
+
425
+
426
+ def run_l0_dynamo_model_tests (session ):
427
+ if not USE_HOST_DEPS :
428
+ install_deps (session )
429
+ install_torch_trt (session )
430
+ run_dynamo_model_tests (session )
431
+ cleanup (session )
432
+
433
+
434
+ def run_l0_dynamo_partitioning_tests (session ):
435
+ if not USE_HOST_DEPS :
436
+ install_deps (session )
437
+ install_torch_trt (session )
438
+ run_dynamo_partitioning_tests (session )
439
+ cleanup (session )
440
+
441
+
442
+ def run_l0_dynamo_runtime_tests (session ):
443
+ if not USE_HOST_DEPS :
444
+ install_deps (session )
445
+ install_torch_trt (session )
446
+ run_dynamo_runtime_tests (session )
422
447
cleanup (session )
423
448
424
449
@@ -431,12 +456,13 @@ def run_l0_dla_tests(session):
431
456
cleanup (session )
432
457
433
458
434
- def run_l1_model_tests (session ):
459
+ def run_dynamo_model_tests (session ):
435
460
if not USE_HOST_DEPS :
436
461
install_deps (session )
437
462
install_torch_trt (session )
438
463
download_models (session )
439
- run_model_tests (session )
464
+ run_dynamo_model_compile_tests (session )
465
+ run_dynamo_model_export_tests (session )
440
466
cleanup (session )
441
467
442
468
@@ -450,13 +476,13 @@ def run_l1_int8_accuracy_tests(session):
450
476
cleanup (session )
451
477
452
478
453
- def run_l1_fx_tests (session ):
479
+ def run_l1_dynamo_tests (session ):
454
480
if not USE_HOST_DEPS :
455
481
install_deps (session )
456
482
install_torch_trt (session )
457
- run_fx_quant_tests (session )
458
- run_fx_tracer_tests (session )
459
- run_fx_tools_tests (session )
483
+ run_dynamo_model_tests (session )
484
+ run_dynamo_partitioning_tests (session )
485
+ run_dynamo_runtime_tests (session )
460
486
cleanup (session )
461
487
462
488
@@ -484,27 +510,27 @@ def l0_api_tests(session):
484
510
485
511
486
512
@nox .session (python = SUPPORTED_PYTHON_VERSIONS , reuse_venv = True )
487
- def l0_fx_tests (session ):
513
+ def l0_dynamo_tests (session ):
488
514
"""When a developer needs to check correctness for a PR or something"""
489
- run_l0_fx_tests (session )
515
+ run_l0_dynamo_tests (session )
490
516
491
517
492
518
@nox .session (python = SUPPORTED_PYTHON_VERSIONS , reuse_venv = True )
493
- def l0_fx_core_tests (session ):
519
+ def l0_dynamo_backend_tests (session ):
494
520
"""When a developer needs to check correctness for a PR or something"""
495
- run_l0_fx_core_tests (session )
521
+ run_l0_dynamo_backend_tests (session )
496
522
497
523
498
524
@nox .session (python = SUPPORTED_PYTHON_VERSIONS , reuse_venv = True )
499
- def l0_fx_converter_tests (session ):
525
+ def l0_dynamo_converter_tests (session ):
500
526
"""When a developer needs to check correctness for a PR or something"""
501
- run_l0_fx_converter_tests (session )
527
+ run_l0_dynamo_converter_tests (session )
502
528
503
529
504
530
@nox .session (python = SUPPORTED_PYTHON_VERSIONS , reuse_venv = True )
505
- def l0_fx_lower_tests (session ):
531
+ def l0_dynamo_lower_tests (session ):
506
532
"""When a developer needs to check correctness for a PR or something"""
507
- run_l0_fx_lower_tests (session )
533
+ run_l0_dynamo_lower_tests (session )
508
534
509
535
510
536
@nox .session (python = SUPPORTED_PYTHON_VERSIONS , reuse_venv = True )
@@ -516,13 +542,13 @@ def l0_dla_tests(session):
516
542
@nox .session (python = SUPPORTED_PYTHON_VERSIONS , reuse_venv = True )
517
543
def l1_model_tests (session ):
518
544
"""When a user needs to test the functionality of standard models compilation and results"""
519
- run_l1_model_tests (session )
545
+ run_dynamo_model_tests (session )
520
546
521
547
522
548
@nox .session (python = SUPPORTED_PYTHON_VERSIONS , reuse_venv = True )
523
- def l1_fx_tests (session ):
549
+ def l1_dynamo_tests (session ):
524
550
"""When a user needs to test the functionality of standard models compilation and results"""
525
- run_l1_fx_tests (session )
551
+ run_l1_dynamo_tests (session )
526
552
527
553
528
554
@nox .session (python = SUPPORTED_PYTHON_VERSIONS , reuse_venv = True )
0 commit comments