-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Nox file update from NGC 22.11 release #1438
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to C++ style guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some changes that do not conform to Python style guidelines:
--- noxfile.py 2022-11-02 22:00:09.316237 +0000
+++ noxfile.py 2022-11-02 22:00:46.176780 +0000
@@ -200,10 +200,11 @@
if USE_HOST_DEPS:
session.run_always("pytest", test, env={"PYTHONPATH": PYT_PATH})
else:
session.run_always("pytest", test)
+
def run_fx_core_tests(session):
print("Running FX core tests")
session.chdir(os.path.join(TOP_DIR, "py/torch_tensorrt/fx/test"))
tests = [
"core",
@@ -212,10 +213,11 @@
if USE_HOST_DEPS:
session.run_always("pytest", test, env={"PYTHONPATH": PYT_PATH})
else:
session.run_always("pytest", test)
+
def run_fx_converter_tests(session):
print("Running FX converter tests")
session.chdir(os.path.join(TOP_DIR, "py/torch_tensorrt/fx/test"))
tests = [
"converters",
@@ -226,27 +228,29 @@
for test in tests:
if USE_HOST_DEPS:
session.run_always("pytest", test, skip_tests, env={"PYTHONPATH": PYT_PATH})
else:
session.run_always("pytest", test, skip_tests)
+
def run_fx_lower_tests(session):
print("Running FX passes and trt_lower tests")
session.chdir(os.path.join(TOP_DIR, "py/torch_tensorrt/fx/test"))
tests = [
"passes/test_multi_fuse_trt.py",
# "passes/test_fuse_permute_linear_trt.py",
"passes/test_remove_duplicate_output_args.py",
"passes/test_fuse_permute_matmul_trt.py",
- #"passes/test_graph_opts.py"
+ # "passes/test_graph_opts.py"
"trt_lower",
]
for test in tests:
if USE_HOST_DEPS:
session.run_always("pytest", test, env={"PYTHONPATH": PYT_PATH})
else:
session.run_always("pytest", test)
+
def run_fx_quant_tests(session):
print("Running FX Quant tests")
session.chdir(os.path.join(TOP_DIR, "py/torch_tensorrt/fx/test"))
tests = [
@@ -258,26 +262,28 @@
for test in tests:
if USE_HOST_DEPS:
session.run_always("pytest", test, skip_tests, env={"PYTHONPATH": PYT_PATH})
else:
session.run_always("pytest", test, skip_tests)
+
def run_fx_tracer_tests(session):
print("Running FX Tracer tests")
session.chdir(os.path.join(TOP_DIR, "py/torch_tensorrt/fx/test"))
# skipping a test since it depends on torchdynamo
# Enable this test once NGC moves to latest pytorch which has dynamo integrated.
tests = [
"tracer/test_acc_shape_prop.py",
"tracer/test_acc_tracer.py",
- #"tracer/test_dispatch_tracer.py"
- ]
- for test in tests:
- if USE_HOST_DEPS:
- session.run_always("pytest", test, env={"PYTHONPATH": PYT_PATH})
- else:
- session.run_always("pytest", test)
+ # "tracer/test_dispatch_tracer.py"
+ ]
+ for test in tests:
+ if USE_HOST_DEPS:
+ session.run_always("pytest", test, env={"PYTHONPATH": PYT_PATH})
+ else:
+ session.run_always("pytest", test)
+
def run_fx_tools_tests(session):
print("Running FX tools tests")
session.chdir(os.path.join(TOP_DIR, "py/torch_tensorrt/fx/test"))
tests = [
@@ -394,39 +400,44 @@
install_torch_trt(session)
download_models(session)
run_base_tests(session)
cleanup(session)
+
def run_l0_fx_tests(session):
if not USE_HOST_DEPS:
install_deps(session)
install_torch_trt(session)
run_fx_core_tests(session)
run_fx_converter_tests(session)
run_fx_lower_tests(session)
cleanup(session)
+
def run_l0_fx_core_tests(session):
if not USE_HOST_DEPS:
install_deps(session)
install_torch_trt(session)
run_fx_core_tests(session)
cleanup(session)
+
def run_l0_fx_converter_tests(session):
if not USE_HOST_DEPS:
install_deps(session)
install_torch_trt(session)
run_fx_converter_tests(session)
cleanup(session)
+
def run_l0_fx_lower_tests(session):
if not USE_HOST_DEPS:
install_deps(session)
install_torch_trt(session)
run_fx_lower_tests(session)
cleanup(session)
+
def run_l0_dla_tests(session):
if not USE_HOST_DEPS:
install_deps(session)
install_torch_trt(session)
@@ -440,29 +451,32 @@
install_deps(session)
install_torch_trt(session)
download_models(session)
run_model_tests(session)
cleanup(session)
+
def run_l1_int8_accuracy_tests(session):
if not USE_HOST_DEPS:
install_deps(session)
install_torch_trt(session)
train_model(session)
finetune_model(session)
run_int8_accuracy_tests(session)
cleanup(session)
+
def run_l1_fx_tests(session):
if not USE_HOST_DEPS:
install_deps(session)
install_torch_trt(session)
run_fx_quant_tests(session)
run_fx_tracer_tests(session)
run_fx_tools_tests(session)
cleanup(session)
+
def run_l2_trt_compatibility_tests(session):
if not USE_HOST_DEPS:
install_deps(session)
install_torch_trt(session)
run_trt_compatibility_tests(session)
@@ -481,30 +495,35 @@
@nox.session(python=SUPPORTED_PYTHON_VERSIONS, reuse_venv=True)
def l0_api_tests(session):
"""When a developer needs to check correctness for a PR or something"""
run_l0_api_tests(session)
+
@nox.session(python=SUPPORTED_PYTHON_VERSIONS, reuse_venv=True)
def l0_fx_tests(session):
"""When a developer needs to check correctness for a PR or something"""
run_l0_fx_tests(session)
+
@nox.session(python=SUPPORTED_PYTHON_VERSIONS, reuse_venv=True)
def l0_fx_core_tests(session):
"""When a developer needs to check correctness for a PR or something"""
run_l0_fx_core_tests(session)
+
@nox.session(python=SUPPORTED_PYTHON_VERSIONS, reuse_venv=True)
def l0_fx_converter_tests(session):
"""When a developer needs to check correctness for a PR or something"""
run_l0_fx_converter_tests(session)
+
@nox.session(python=SUPPORTED_PYTHON_VERSIONS, reuse_venv=True)
def l0_fx_lower_tests(session):
"""When a developer needs to check correctness for a PR or something"""
run_l0_fx_lower_tests(session)
+
@nox.session(python=SUPPORTED_PYTHON_VERSIONS, reuse_venv=True)
def l0_dla_tests(session):
"""When a developer needs to check basic api functionality using host dependencies"""
run_l0_dla_tests(session)
@@ -512,15 +531,17 @@
@nox.session(python=SUPPORTED_PYTHON_VERSIONS, reuse_venv=True)
def l1_model_tests(session):
"""When a user needs to test the functionality of standard models compilation and results"""
run_l1_model_tests(session)
+
@nox.session(python=SUPPORTED_PYTHON_VERSIONS, reuse_venv=True)
def l1_fx_tests(session):
"""When a user needs to test the functionality of standard models compilation and results"""
run_l1_fx_tests(session)
+
@nox.session(python=SUPPORTED_PYTHON_VERSIONS, reuse_venv=True)
def l1_int8_accuracy_tests(session):
"""Checking accuracy performance on various usecases"""
run_l1_int8_accuracy_tests(session)
@@ -532,6 +553,6 @@
@nox.session(python=SUPPORTED_PYTHON_VERSIONS, reuse_venv=True)
def l2_multi_gpu_tests(session):
"""Makes sure that Torch-TensorRT can operate on multi-gpu systems"""
- run_l2_multi_gpu_tests(session)
\ No newline at end of file
+ run_l2_multi_gpu_tests(session)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Dheeraj Peri peri.dheeraj@gmail.com
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant and/or add your own.
Checklist: