Skip to content

Commit 128713d

Browse files
committed
Correcting the noxfile
1 parent c552db0 commit 128713d

File tree

1 file changed

+72
-46
lines changed

1 file changed

+72
-46
lines changed

noxfile.py

Lines changed: 72 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def run_dynamo_backend_tests(session):
216216
session.run_always("pytest", test)
217217

218218

219-
def run_fx_converter_tests(session):
219+
def run_dynamo_converter_tests(session):
220220
print("Running Dynamo converter tests")
221221
session.chdir(os.path.join(TOP_DIR, "tests/py/dynamo/"))
222222
tests = [
@@ -242,11 +242,11 @@ def run_dynamo_lower_tests(session):
242242
session.run_always("pytest", test)
243243

244244

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")
247247
session.chdir(os.path.join(TOP_DIR, "tests/py/dynamo/"))
248248
tests = [
249-
"models",
249+
"partitioning"
250250
]
251251
for test in tests:
252252
if USE_HOST_DEPS:
@@ -255,11 +255,11 @@ def run_dynamo_model_tests(session):
255255
session.run_always("pytest", test)
256256

257257

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")
260260
session.chdir(os.path.join(TOP_DIR, "tests/py/dynamo/"))
261261
tests = [
262-
"partitioning"
262+
"runtime",
263263
]
264264
for test in tests:
265265
if USE_HOST_DEPS:
@@ -268,30 +268,31 @@ def run_dynamo_partitioning_tests(session):
268268
session.run_always("pytest", test)
269269

270270

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"))
274274
tests = [
275-
"runtime",
275+
"test_models.py",
276276
]
277277
for test in tests:
278278
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})
280280
else:
281-
session.run_always("pytest", test)
281+
session.run_always("python", test, "--ir", str("torch_compile"))
282282

283283

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"))
287287
tests = [
288-
"models",
288+
"test_models_export.py",
289+
"test_export_serde.py"
289290
]
290291
for test in tests:
291292
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})
293294
else:
294-
session.run_always("pytest", test)
295+
session.run_always("python", test, "--ir", str("dynamo"))
295296

296297

297298
def run_accuracy_tests(session):
@@ -388,37 +389,61 @@ def run_l0_api_tests(session):
388389
cleanup(session)
389390

390391

391-
def run_l0_fx_tests(session):
392+
def run_l0_dynamo_tests(session):
392393
if not USE_HOST_DEPS:
393394
install_deps(session)
394395
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)
398399
cleanup(session)
399400

400401

401-
def run_l0_fx_core_tests(session):
402+
def run_l0_dynamo_backend_tests(session):
402403
if not USE_HOST_DEPS:
403404
install_deps(session)
404405
install_torch_trt(session)
405-
run_fx_core_tests(session)
406+
run_dynamo_backend_tests(session)
406407
cleanup(session)
407408

408409

409-
def run_l0_fx_converter_tests(session):
410+
def run_l0_dynamo_converter_tests(session):
410411
if not USE_HOST_DEPS:
411412
install_deps(session)
412413
install_torch_trt(session)
413-
run_fx_converter_tests(session)
414+
run_dynamo_converter_tests(session)
414415
cleanup(session)
415416

416417

417-
def run_l0_fx_lower_tests(session):
418+
def run_l0_dynamo_lower_tests(session):
418419
if not USE_HOST_DEPS:
419420
install_deps(session)
420421
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)
422447
cleanup(session)
423448

424449

@@ -431,12 +456,13 @@ def run_l0_dla_tests(session):
431456
cleanup(session)
432457

433458

434-
def run_l1_model_tests(session):
459+
def run_dynamo_model_tests(session):
435460
if not USE_HOST_DEPS:
436461
install_deps(session)
437462
install_torch_trt(session)
438463
download_models(session)
439-
run_model_tests(session)
464+
run_dynamo_model_compile_tests(session)
465+
run_dynamo_model_export_tests(session)
440466
cleanup(session)
441467

442468

@@ -450,13 +476,13 @@ def run_l1_int8_accuracy_tests(session):
450476
cleanup(session)
451477

452478

453-
def run_l1_fx_tests(session):
479+
def run_l1_dynamo_tests(session):
454480
if not USE_HOST_DEPS:
455481
install_deps(session)
456482
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)
460486
cleanup(session)
461487

462488

@@ -484,27 +510,27 @@ def l0_api_tests(session):
484510

485511

486512
@nox.session(python=SUPPORTED_PYTHON_VERSIONS, reuse_venv=True)
487-
def l0_fx_tests(session):
513+
def l0_dynamo_tests(session):
488514
"""When a developer needs to check correctness for a PR or something"""
489-
run_l0_fx_tests(session)
515+
run_l0_dynamo_tests(session)
490516

491517

492518
@nox.session(python=SUPPORTED_PYTHON_VERSIONS, reuse_venv=True)
493-
def l0_fx_core_tests(session):
519+
def l0_dynamo_backend_tests(session):
494520
"""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)
496522

497523

498524
@nox.session(python=SUPPORTED_PYTHON_VERSIONS, reuse_venv=True)
499-
def l0_fx_converter_tests(session):
525+
def l0_dynamo_converter_tests(session):
500526
"""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)
502528

503529

504530
@nox.session(python=SUPPORTED_PYTHON_VERSIONS, reuse_venv=True)
505-
def l0_fx_lower_tests(session):
531+
def l0_dynamo_lower_tests(session):
506532
"""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)
508534

509535

510536
@nox.session(python=SUPPORTED_PYTHON_VERSIONS, reuse_venv=True)
@@ -516,13 +542,13 @@ def l0_dla_tests(session):
516542
@nox.session(python=SUPPORTED_PYTHON_VERSIONS, reuse_venv=True)
517543
def l1_model_tests(session):
518544
"""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)
520546

521547

522548
@nox.session(python=SUPPORTED_PYTHON_VERSIONS, reuse_venv=True)
523-
def l1_fx_tests(session):
549+
def l1_dynamo_tests(session):
524550
"""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)
526552

527553

528554
@nox.session(python=SUPPORTED_PYTHON_VERSIONS, reuse_venv=True)

0 commit comments

Comments
 (0)