Skip to content
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 1 commit into from
Nov 2, 2022
Merged

Conversation

peri044
Copy link
Collaborator

@peri044 peri044 commented Nov 2, 2022

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.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project (You can use the linters)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas and hacks
  • I have made corresponding changes to the documentation
  • I have added tests to verify my fix or my feature
  • New and existing unit tests pass locally with my changes
  • I have added the relevant labels to my PR in so that relevant reviewers are notified

Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com>
@peri044 peri044 merged commit 17a9903 into master Nov 2, 2022
Copy link

@github-actions github-actions bot left a 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

Copy link

@github-actions github-actions bot left a 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants