Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-test-linux-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ jobs:
set -euo pipefail
pushd .
cd tests/py/dynamo
python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_core_tests_results.xml --ignore runtime/test_000_* --ignore runtime/test_001_* --ignore runtime/gen_hw_compat* runtime/*
python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_core_tests_results.xml -k "not test_000_ and not test_001_" runtime/*
popd

L2-dynamo-plugin-tests:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-linux-x86_64_rtx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ jobs:
set -euo pipefail
pushd .
cd tests/py/dynamo
python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_core_tests_results.xml --ignore runtime/test_001_* --ignore runtime/test_000_* --ignore runtime/gen_hw_compat* runtime/*
python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_core_tests_results.xml -k "not test_000_ and not test_001_" runtime/*
popd

L2-dynamo-plugin-tests:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ jobs:
set -euo pipefail
pushd .
cd tests/py/dynamo
../../../packaging/vc_env_helper.bat python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_core_tests_results.xml --ignore runtime/test_000_* --ignore runtime/gen_hw_compat* --ignore runtime/test_001_* runtime/*
../../../packaging/vc_env_helper.bat python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_core_tests_results.xml -k "not test_000_ and not test_001_" runtime/*
popd

L2-dynamo-plugin-tests:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-test-windows_rtx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ jobs:
set -euo pipefail
pushd .
cd tests/py/dynamo
../../../packaging/vc_env_helper.bat python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_core_tests_results.xml --ignore runtime/test_000_* --ignore runtime/gen_hw_compat* --ignore runtime/test_001_* --ignore runtime/test_000_* runtime/*
../../../packaging/vc_env_helper.bat python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_core_tests_results.xml -k "not test_000_ and not test_001_" runtime/*
popd
L2-dynamo-plugin-tests:
Expand All @@ -352,7 +352,7 @@ jobs:
set -euo pipefail
pushd .
cd tests/py/dynamo
../../../packaging/vc_env_helper.bat python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_plugins_tests_results.xml --ignore automatic_plugin/
../../../packaging/vc_env_helper.bat python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_plugins_tests_results.xml automatic_plugin/
popd
Expand Down
15 changes: 8 additions & 7 deletions py/torch_tensorrt/_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,14 +283,15 @@ def _fx_input_interface(
return compiled_fx_module
elif target_ir == _IRType.dynamo:
# Prepare torch and torchtrt inputs
if not arg_inputs and not inputs:
if arg_inputs is None and inputs is None:
raise AssertionError("'arg_inputs' and 'inputs' should not both be None.")

elif arg_inputs and inputs:
elif arg_inputs is not None and inputs is not None:
raise AssertionError(
"'arg_inputs' and 'inputs' should not be used at the same time."
)
arg_inputs = inputs or arg_inputs
if inputs is not None:
arg_inputs = inputs

if kwarg_inputs is None:
kwarg_inputs = {}
Expand Down Expand Up @@ -383,10 +384,10 @@ def cross_compile_for_windows(
)

# Prepare torch and torchtrt inputs
if not arg_inputs and not inputs:
if arg_inputs is None and inputs is None:
raise AssertionError("'arg_inputs' and 'inputs' should not both be None.")

elif arg_inputs and inputs:
elif arg_inputs is not None and inputs is not None:
raise AssertionError(
"'arg_inputs' and 'inputs' should not be used at the same time."
)
Expand Down Expand Up @@ -484,10 +485,10 @@ def convert_method_to_trt_engine(
enabled_precisions if enabled_precisions is not None else {torch.float}
)

if not arg_inputs and not inputs:
if arg_inputs is None and inputs is None:
raise AssertionError("'arg_inputs' and 'inputs' should not both be None.")

elif arg_inputs and inputs:
elif arg_inputs is not None and inputs is not None:
raise AssertionError(
"'arg_inputs' and 'inputs' should not be used at the same time."
)
Expand Down
12 changes: 6 additions & 6 deletions py/torch_tensorrt/dynamo/_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,12 @@ def cross_compile_for_windows(
"When enable_weight_streaming is enabled, it requires use_explicit_typing to be set to True"
)
# Aliasing inputs to arg_inputs for better understanding
if not arg_inputs and not kwarg_inputs and not inputs:
if arg_inputs is None and kwarg_inputs is None and inputs is None:
raise AssertionError(
"'arg_inputs', 'kwarg_inputs' and 'inputs' should not all be None."
)

elif arg_inputs and inputs:
elif arg_inputs is not None and inputs is not None:
raise AssertionError(
"'arg_inputs' and 'inputs' should not be used at the same time."
)
Expand Down Expand Up @@ -604,12 +604,12 @@ def compile(
"When enable_weight_streaming is enabled, it requires use_explicit_typing to be set to True"
)
# Aliasing inputs to arg_inputs for better understanding
if not arg_inputs and not kwarg_inputs and not inputs:
if arg_inputs is None and kwarg_inputs is None and inputs is None:
raise AssertionError(
"'arg_inputs', 'kwarg_inputs' and 'inputs' should not all be None."
)

elif arg_inputs and inputs:
elif arg_inputs is not None and inputs is not None:
raise AssertionError(
"'arg_inputs' and 'inputs' should not be used at the same time."
)
Expand Down Expand Up @@ -1223,12 +1223,12 @@ def convert_exported_program_to_serialized_trt_engine(
"When enable_weight_streaming is enabled, it requires use_explicit_typing to be set to True"
)
# Aliasing inputs to arg_inputs for better understanding
if not arg_inputs and not kwarg_inputs and not inputs:
if arg_inputs is None and kwarg_inputs is None and inputs is None:
raise AssertionError(
"'arg_inputs', 'kwarg_inputs' and 'inputs' should not all be None."
)

elif arg_inputs and inputs:
elif arg_inputs is not None and inputs is not None:
raise AssertionError(
"'arg_inputs' and 'inputs' should not be used at the same time."
)
Expand Down
4 changes: 2 additions & 2 deletions py/torch_tensorrt/dynamo/_tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ def trace(
"""

# Set log level at the top of compilation (torch_tensorrt.dynamo)
if not arg_inputs and not inputs:
if arg_inputs is None and inputs is None:
raise AssertionError("'arg_inputs' and 'inputs' should not both be None.")

elif arg_inputs and inputs:
elif arg_inputs is not None and inputs is not None:
raise AssertionError(
"'arg_inputs' and 'inputs' should not be used at the same time."
)
Expand Down
Loading