diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a5ffb648783..78b078fcdbec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,8 +75,3 @@ jobs: - name: Integration tests (torch-${{ matrix.torch-version }}) run: | bash build_tools/ci/test_posix.sh ${{ matrix.torch-version }} - - - name: Check generated sources (torch-nightly only) - if: ${{ matrix.torch-version == 'nightly' }} - run: | - bash build_tools/ci/check_generated_sources.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 5413da9d9bab..ac162a2b23c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,7 +74,7 @@ endif() # Turning this off disables the old TorchScript path, leaving FX based import as the current supported option. # The option will be retained for a time, and if a maintainer is interested in setting up testing for it, # please reach out on the list and speak up for it. It will only be enabled in CI for test usage. -cmake_dependent_option(TORCH_MLIR_ENABLE_JIT_IR_IMPORTER "Enables JIT IR Importer" ON TORCH_MLIR_ENABLE_PYTORCH_EXTENSIONS OFF) +cmake_dependent_option(TORCH_MLIR_ENABLE_JIT_IR_IMPORTER "Enables JIT IR Importer" OFF TORCH_MLIR_ENABLE_PYTORCH_EXTENSIONS OFF) cmake_dependent_option(TORCH_MLIR_ENABLE_LTC "Enables LTC backend" OFF TORCH_MLIR_ENABLE_PYTORCH_EXTENSIONS OFF) option(TORCH_MLIR_ENABLE_ONNX_C_IMPORTER "Enables the ONNX C importer" OFF) diff --git a/build_tools/ci/build_posix.sh b/build_tools/ci/build_posix.sh index b9bb122acd37..dde181206ead 100755 --- a/build_tools/ci/build_posix.sh +++ b/build_tools/ci/build_posix.sh @@ -51,7 +51,7 @@ cmake -S "$repo_root/externals/llvm-project/llvm" -B "$build_dir" \ -DLLVM_TARGETS_TO_BUILD=host \ -DMLIR_ENABLE_BINDINGS_PYTHON=ON \ -DTORCH_MLIR_ENABLE_LTC=OFF \ - -DTORCH_MLIR_ENABLE_PYTORCH_EXTENSIONS=ON + -DTORCH_MLIR_ENABLE_PYTORCH_EXTENSIONS=OFF echo "::endgroup::" echo "::group::Build" diff --git a/build_tools/ci/test_posix.sh b/build_tools/ci/test_posix.sh index bdeae5c7dfe4..25de2c1a7368 100755 --- a/build_tools/ci/test_posix.sh +++ b/build_tools/ci/test_posix.sh @@ -6,7 +6,7 @@ this_dir="$(cd $(dirname $0) && pwd)" repo_root="$(cd $this_dir/../.. && pwd)" torch_version="${1:-unknown}" -export PYTHONPATH="$repo_root/build/tools/torch-mlir/python_packages/torch_mlir:$repo_root/projects/pt1" +export PYTHONPATH="$repo_root/build/tools/torch-mlir/python_packages/torch_mlir:$repo_root/projects/e2e" echo "::group::Run ONNX e2e integration tests" python3 -m e2e_testing.main --config=onnx -v diff --git a/docs/adding_an_e2e_test.md b/docs/adding_an_e2e_test.md index 91eee0520f56..99df4fd216fe 100644 --- a/docs/adding_an_e2e_test.md +++ b/docs/adding_an_e2e_test.md @@ -5,7 +5,7 @@ Adding support for a Torch operator in Torch-MLIR should always be accompanied by at least one end-to-end test to make sure the implementation of the op matches the behavior of PyTorch. The tests live in the -`torch-mlir/projects/pt1/python/torch_mlir_e2e_test/test_suite` directory. When adding a new +`torch-mlir/projects/e2e/torch_mlir_e2e_test/test_suite` directory. When adding a new test, choose a file that best matches the op you're testing, and if there is no file that best matches add a new file for your op. diff --git a/docs/development.md b/docs/development.md index 360dff8f9df8..6c947985be0f 100644 --- a/docs/development.md +++ b/docs/development.md @@ -463,10 +463,10 @@ Torch-MLIR has two types of tests: 1. End-to-end execution tests. These compile and run a program and check the result against the expected output from execution on native Torch. These use a homegrown testing framework (see - `projects/pt1/python/torch_mlir_e2e_test/framework.py`) and the test suite - lives at `projects/pt1/python/torch_mlir_e2e_test/test_suite/__init__.py`. - The tests require to build with `TORCH_MLIR_ENABLE_PYTORCH_EXTENSIONS` (and - the dependent option `TORCH_MLIR_ENABLE_JIT_IR_IMPORTER`) set to `ON`. + `projects/e2e/torch_mlir_e2e_test/framework.py`) and the test suite + lives at `projects/e2e/torch_mlir_e2e_test/test_suite/__init__.py`. + Some old configs require building with `TORCH_MLIR_ENABLE_PYTORCH_EXTENSIONS` + (and the dependent option `TORCH_MLIR_ENABLE_JIT_IR_IMPORTER`) set to `ON`. 2. Compiler and Python API unit tests. These use LLVM's `lit` testing framework. For example, these might involve using `torch-mlir-opt` to run a pass and @@ -482,7 +482,7 @@ Torch-MLIR has two types of tests: > An `.env` file must be generated via `build_tools/write_env_file.sh` before these commands can be run. -The following assumes you are in the `projects/pt1` directory: +The following assumes you are in the `projects/e2e` directory: ```shell # Run all tests on the reference backend @@ -496,7 +496,7 @@ The following assumes you are in the `projects/pt1` directory: Alternatively, you can run the tests via Python directly: ```shell -cd projects/pt1 +cd projects/e2e python -m e2e_testing.main -f 'AtenEmbeddingBag' ``` @@ -621,10 +621,10 @@ Here are some examples of PRs updating the LLVM and MLIR-HLO submodules: To enable ASAN, pass `-DLLVM_USE_SANITIZER=Address` to CMake. This should "just work" with all C++ tools like `torch-mlir-opt`. When running a Python script -such as through `./projects/pt1/tools/e2e_test.sh`, you will need to do: +such as through `./projects/e2e/tools/e2e_test.sh`, you will need to do: ``` -LD_PRELOAD="$(clang -print-file-name=libclang_rt.asan-x86_64.so)" ./projects/pt1/tools/e2e_test.sh -s +LD_PRELOAD="$(clang -print-file-name=libclang_rt.asan-x86_64.so)" ./projects/e2e/tools/e2e_test.sh -s # See instructions here for how to get the libasan path for GCC: # https://stackoverflow.com/questions/48833176/get-location-of-libasan-from-gcc-clang ``` diff --git a/projects/CMakeLists.txt b/projects/CMakeLists.txt index 572c4535b7a5..e6b6ed6e9c50 100644 --- a/projects/CMakeLists.txt +++ b/projects/CMakeLists.txt @@ -64,6 +64,11 @@ if(TORCH_MLIR_ENABLE_JIT_IR_IMPORTER OR TORCH_MLIR_ENABLE_LTC) message(STATUS "TORCH_LIBRARIES = ${TORCH_LIBRARIES}") endif() +# Include e2e testing infra. +if(NOT TORCH_MLIR_ENABLE_ONLY_MLIR_PYTHON_BINDINGS) + add_subdirectory(e2e) +endif() + # Include jit_ir_common if the jit_ir importer or LTC is enabled, # since they both require it. if(TORCH_MLIR_ENABLE_JIT_IR_IMPORTER OR TORCH_MLIR_ENABLE_LTC) diff --git a/projects/e2e/CMakeLists.txt b/projects/e2e/CMakeLists.txt new file mode 100644 index 000000000000..25b51aedfe7a --- /dev/null +++ b/projects/e2e/CMakeLists.txt @@ -0,0 +1,7 @@ +message(STATUS "Building end-to-end testing package.") + +################################################################################ +# Setup python. +################################################################################ + +add_subdirectory(torch_mlir_e2e_test) diff --git a/projects/pt1/e2e_testing/main.py b/projects/e2e/e2e_testing/main.py similarity index 63% rename from projects/pt1/e2e_testing/main.py rename to projects/e2e/e2e_testing/main.py index ae4986b7f96c..a47f724571a6 100644 --- a/projects/pt1/e2e_testing/main.py +++ b/projects/e2e/e2e_testing/main.py @@ -11,20 +11,15 @@ torch.device("cpu") -from torch_mlir_e2e_test.framework import run_tests +from torch_mlir_e2e_test.framework import run_tests, TestConfig from torch_mlir_e2e_test.reporting import report_results from torch_mlir_e2e_test.registry import GLOBAL_TEST_REGISTRY -# Available test configs. from torch_mlir_e2e_test.configs import ( - LazyTensorCoreTestConfig, + FxImporterTestConfig, NativeTorchTestConfig, OnnxBackendTestConfig, - TorchScriptTestConfig, - TorchDynamoTestConfig, - JITImporterTestConfig, - FxImporterTestConfig, ) from torch_mlir_e2e_test.linalg_on_tensors_backends.refbackend import ( @@ -65,30 +60,42 @@ register_all_tests() +DEPRECATED_CONFIGS = [ + "torchscript", + "linalg", + "stablehlo", + "tosa", + "lazy_tensor_core", + "torchdynamo", +] + +CONFIGS = [ + "native_torch", + "onnx", + "onnx_tosa", + "fx_importer", + "fx_importer_stablehlo", + "fx_importer_tosa", +] + def _get_argparse(): - config_choices = [ - "native_torch", - "torchscript", - "linalg", - "stablehlo", - "tosa", - "lazy_tensor_core", - "torchdynamo", - "onnx", - "onnx_tosa", - "fx_importer", - "fx_importer_stablehlo", - "fx_importer_tosa", - ] + config_choices = CONFIGS + DEPRECATED_CONFIGS parser = argparse.ArgumentParser(description="Run torchscript e2e tests.") parser.add_argument( "-c", "--config", choices=config_choices, - default="linalg", + default="fx_importer", help=f""" Meaning of options: +"onnx": export to the model via onnx and reimport using the torch-onnx-to-torch path. +"fx_importer": run the model through the fx importer frontend and execute the graph using Linalg-on-Tensors. +"fx_importer_stablehlo": run the model through the fx importer frontend and execute the graph using Stablehlo backend. +"fx_importer_tosa": run the model through the fx importer frontend and execute the graph using the TOSA backend. +"onnx_tosa": Import ONNX to Torch via the torch-onnx-to-torch path and execute the graph using the TOSA backend. + +The following options are deprecated: "linalg": run through torch-mlir"s default Linalg-on-Tensors backend. "tosa": run through torch-mlir"s default TOSA backend. "stablehlo": run through torch-mlir"s default Stablehlo backend. @@ -96,11 +103,6 @@ def _get_argparse(): "torchscript": compile the model to a torch.jit.ScriptModule, and then run that as-is (useful for verifying TorchScript is modeling the program correctly). "lazy_tensor_core": run the model through the Lazy Tensor Core frontend and execute the traced graph. "torchdynamo": run the model through the TorchDynamo frontend and execute the graph using Linalg-on-Tensors. -"onnx": export to the model via onnx and reimport using the torch-onnx-to-torch path. -"fx_importer": run the model through the fx importer frontend and execute the graph using Linalg-on-Tensors. -"fx_importer_stablehlo": run the model through the fx importer frontend and execute the graph using Stablehlo backend. -"fx_importer_tosa": run the model through the fx importer frontend and execute the graph using the TOSA backend. -"onnx_tosa": Import ONNX to Torch via the torch-onnx-to-torch path and execute the graph using the TOSA backend. """, ) parser.add_argument( @@ -143,63 +145,106 @@ def _get_argparse(): return parser +def _setup_config( + config: str, all_test_unique_names: set[str] +) -> tuple[TestConfig, set[str], set[str]]: + if config in DEPRECATED_CONFIGS: + return _setup_deprecated_config(config, all_test_unique_names) + if config == "native_torch": + return ( + NativeTorchTestConfig(), + set(), + set(), + ) + if config == "fx_importer": + return ( + FxImporterTestConfig(RefBackendLinalgOnTensorsBackend()), + FX_IMPORTER_XFAIL_SET, + FX_IMPORTER_CRASHING_SET, + ) + if config == "fx_importer_stablehlo": + return ( + FxImporterTestConfig(LinalgOnTensorsStablehloBackend(), "stablehlo"), + FX_IMPORTER_STABLEHLO_XFAIL_SET, + FX_IMPORTER_STABLEHLO_CRASHING_SET, + ) + if config == "fx_importer_tosa": + return ( + FxImporterTestConfig(LinalgOnTensorsTosaBackend(), "tosa"), + FX_IMPORTER_TOSA_XFAIL_SET, + FX_IMPORTER_TOSA_CRASHING_SET, + ) + if config == "onnx": + return ( + OnnxBackendTestConfig(RefBackendLinalgOnTensorsBackend()), + ONNX_XFAIL_SET, + ONNX_CRASHING_SET, + ) + if config == "onnx_tosa": + return ( + OnnxBackendTestConfig(LinalgOnTensorsTosaBackend(), output_type="tosa"), + ONNX_TOSA_XFAIL_SET, + ONNX_TOSA_CRASHING_SET, + ) + raise ValueError(f'Got invalid config, "{config}". Choices: {CONFIGS}') + + +def _setup_deprecated_config( + config: str, all_test_unique_names: set[str] +) -> tuple[TestConfig, set[str], set[str]]: + print(f"Warning: the selected config, '{config}', is not actively supported.") + import torch_mlir_e2e_test.pt1_configs as _configs + + if config == "linalg": + return ( + _configs.JITImporterTestConfig(RefBackendLinalgOnTensorsBackend()), + LINALG_XFAIL_SET, + LINALG_CRASHING_SET, + ) + if config == "stablehlo": + return ( + _configs.JITImporterTestConfig( + LinalgOnTensorsStablehloBackend(), "stablehlo" + ), + all_test_unique_names - STABLEHLO_PASS_SET, + STABLEHLO_CRASHING_SET, + ) + if config == "tosa": + return ( + _configs.JITImporterTestConfig(LinalgOnTensorsTosaBackend(), "tosa"), + all_test_unique_names - TOSA_PASS_SET, + TOSA_CRASHING_SET, + ) + if config == "torchscript": + return ( + _configs.TorchScriptTestConfig(), + set(), + set(), + ) + if config == "lazy_tensor_core": + return ( + _configs.LazyTensorCoreTestConfig(), + LTC_XFAIL_SET, + LTC_CRASHING_SET, + ) + if config == "torchdynamo": + return ( + _configs.TorchDynamoTestConfig( + RefBackendLinalgOnTensorsBackend(generate_runtime_verification=False) + ), + TORCHDYNAMO_XFAIL_SET, + TORCHDYNAMO_CRASHING_SET, + ) + raise ValueError(f"Unhandled config {config}.") + + def main(): args = _get_argparse().parse_args() all_test_unique_names = set(test.unique_name for test in GLOBAL_TEST_REGISTRY) # Find the selected config. - if args.config == "linalg": - config = JITImporterTestConfig(RefBackendLinalgOnTensorsBackend()) - xfail_set = LINALG_XFAIL_SET - crashing_set = LINALG_CRASHING_SET - elif args.config == "stablehlo": - config = JITImporterTestConfig(LinalgOnTensorsStablehloBackend(), "stablehlo") - xfail_set = all_test_unique_names - STABLEHLO_PASS_SET - crashing_set = STABLEHLO_CRASHING_SET - elif args.config == "tosa": - config = JITImporterTestConfig(LinalgOnTensorsTosaBackend(), "tosa") - xfail_set = all_test_unique_names - TOSA_PASS_SET - crashing_set = TOSA_CRASHING_SET - elif args.config == "native_torch": - config = NativeTorchTestConfig() - xfail_set = set() - crashing_set = set() - elif args.config == "torchscript": - config = TorchScriptTestConfig() - xfail_set = set() - crashing_set = set() - elif args.config == "lazy_tensor_core": - config = LazyTensorCoreTestConfig() - xfail_set = LTC_XFAIL_SET - crashing_set = LTC_CRASHING_SET - elif args.config == "fx_importer": - config = FxImporterTestConfig(RefBackendLinalgOnTensorsBackend()) - xfail_set = FX_IMPORTER_XFAIL_SET - crashing_set = FX_IMPORTER_CRASHING_SET - elif args.config == "fx_importer_stablehlo": - config = FxImporterTestConfig(LinalgOnTensorsStablehloBackend(), "stablehlo") - xfail_set = FX_IMPORTER_STABLEHLO_XFAIL_SET - crashing_set = FX_IMPORTER_STABLEHLO_CRASHING_SET - elif args.config == "fx_importer_tosa": - config = FxImporterTestConfig(LinalgOnTensorsTosaBackend(), "tosa") - xfail_set = FX_IMPORTER_TOSA_XFAIL_SET - crashing_set = FX_IMPORTER_TOSA_CRASHING_SET - elif args.config == "torchdynamo": - # TODO: Enanble runtime verification and extend crashing set. - config = TorchDynamoTestConfig( - RefBackendLinalgOnTensorsBackend(generate_runtime_verification=False) - ) - xfail_set = TORCHDYNAMO_XFAIL_SET - crashing_set = TORCHDYNAMO_CRASHING_SET - elif args.config == "onnx": - config = OnnxBackendTestConfig(RefBackendLinalgOnTensorsBackend()) - xfail_set = ONNX_XFAIL_SET - crashing_set = ONNX_CRASHING_SET - elif args.config == "onnx_tosa": - config = OnnxBackendTestConfig(LinalgOnTensorsTosaBackend(), output_type="tosa") - xfail_set = ONNX_TOSA_XFAIL_SET - crashing_set = ONNX_TOSA_CRASHING_SET + config, xfail_set, crashing_set = _setup_config(args.config, all_test_unique_names) do_not_attempt = set( args.crashing_tests_to_not_attempt_to_run_and_a_bug_is_filed or [] @@ -231,11 +276,6 @@ def main(): # Report the test results. failed = report_results(results, xfail_set, args.verbose, args.config) - if args.config == "torchdynamo": - print( - "\033[91mWarning: the TorchScript based dynamo support is deprecated. " - "The config for torchdynamo is planned to be removed in the future.\033[0m" - ) if args.ignore_failures: sys.exit(0) sys.exit(1 if failed else 0) diff --git a/projects/pt1/e2e_testing/xfail_sets.py b/projects/e2e/e2e_testing/xfail_sets.py similarity index 99% rename from projects/pt1/e2e_testing/xfail_sets.py rename to projects/e2e/e2e_testing/xfail_sets.py index f494bc8574e6..b9a505a1efa2 100644 --- a/projects/pt1/e2e_testing/xfail_sets.py +++ b/projects/e2e/e2e_testing/xfail_sets.py @@ -11,7 +11,7 @@ # might be used to keep more elaborate sets of testing configurations). from torch_mlir_e2e_test.test_suite import COMMON_TORCH_MLIR_LOWERING_XFAILS -from torch_mlir._version import torch_version_for_comparison, version +from torch_mlir_e2e_test.utils import torch_version_for_comparison, version print(f"TORCH_VERSION_FOR_COMPARISON =", torch_version_for_comparison()) diff --git a/projects/pt1/tools/e2e_test.sh b/projects/e2e/tools/e2e_test.sh similarity index 100% rename from projects/pt1/tools/e2e_test.sh rename to projects/e2e/tools/e2e_test.sh diff --git a/projects/pt1/python/torch_mlir_e2e_test/CMakeLists.txt b/projects/e2e/torch_mlir_e2e_test/CMakeLists.txt similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/CMakeLists.txt rename to projects/e2e/torch_mlir_e2e_test/CMakeLists.txt diff --git a/projects/pt1/python/torch_mlir_e2e_test/__init__.py b/projects/e2e/torch_mlir_e2e_test/__init__.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/__init__.py rename to projects/e2e/torch_mlir_e2e_test/__init__.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/annotations.py b/projects/e2e/torch_mlir_e2e_test/annotations.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/annotations.py rename to projects/e2e/torch_mlir_e2e_test/annotations.py diff --git a/projects/e2e/torch_mlir_e2e_test/configs/__init__.py b/projects/e2e/torch_mlir_e2e_test/configs/__init__.py new file mode 100644 index 000000000000..77a874b357d5 --- /dev/null +++ b/projects/e2e/torch_mlir_e2e_test/configs/__init__.py @@ -0,0 +1,8 @@ +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# Also available under a BSD-style license. See LICENSE. + +from .fx_importer_backend import FxImporterTestConfig +from .native_torch import NativeTorchTestConfig +from .onnx_backend import OnnxBackendTestConfig diff --git a/projects/pt1/python/torch_mlir_e2e_test/configs/fx_importer_backend.py b/projects/e2e/torch_mlir_e2e_test/configs/fx_importer_backend.py similarity index 96% rename from projects/pt1/python/torch_mlir_e2e_test/configs/fx_importer_backend.py rename to projects/e2e/torch_mlir_e2e_test/configs/fx_importer_backend.py index 396d43638a42..a116a94dabd3 100644 --- a/projects/pt1/python/torch_mlir_e2e_test/configs/fx_importer_backend.py +++ b/projects/e2e/torch_mlir_e2e_test/configs/fx_importer_backend.py @@ -149,9 +149,12 @@ def _export_run(self, artifact: torch.nn.Module, trace: Trace) -> Trace: ) module = self._backend.compile(module) backend_module = self._backend.load(module) + input_buffers = prog.graph_signature.inputs_to_buffers.values() params = { # **dict(artifact.named_parameters(remove_duplicate=False)), - **dict(artifact.named_buffers(remove_duplicate=False)), + name: value + for (name, value) in artifact.named_buffers(remove_duplicate=False) + if name in input_buffers } params_flat, params_spec = pytree.tree_flatten(params) params_flat = list(params_flat) diff --git a/projects/pt1/python/torch_mlir_e2e_test/configs/native_torch.py b/projects/e2e/torch_mlir_e2e_test/configs/native_torch.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/configs/native_torch.py rename to projects/e2e/torch_mlir_e2e_test/configs/native_torch.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/configs/onnx_backend.py b/projects/e2e/torch_mlir_e2e_test/configs/onnx_backend.py similarity index 99% rename from projects/pt1/python/torch_mlir_e2e_test/configs/onnx_backend.py rename to projects/e2e/torch_mlir_e2e_test/configs/onnx_backend.py index 5461dc04c0d1..44e9801ecda7 100644 --- a/projects/pt1/python/torch_mlir_e2e_test/configs/onnx_backend.py +++ b/projects/e2e/torch_mlir_e2e_test/configs/onnx_backend.py @@ -10,7 +10,6 @@ import onnx import torch from torch.onnx._constants import ONNX_TORCHSCRIPT_EXPORTER_MAX_OPSET as max_opset_ver -import torch_mlir from torch_mlir_e2e_test.framework import TestConfig, Trace, TraceItem from torch_mlir_e2e_test.utils import convert_annotations_to_placeholders @@ -82,6 +81,7 @@ def convert_onnx(model, inputs): model, examples, buffer, + dynamo=False, input_names=input_names, dynamic_axes=dynamic_tensors, opset_version=max_opset_ver, diff --git a/projects/pt1/python/torch_mlir_e2e_test/configs/utils.py b/projects/e2e/torch_mlir_e2e_test/configs/utils.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/configs/utils.py rename to projects/e2e/torch_mlir_e2e_test/configs/utils.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/debug/lockstep.py b/projects/e2e/torch_mlir_e2e_test/debug/lockstep.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/debug/lockstep.py rename to projects/e2e/torch_mlir_e2e_test/debug/lockstep.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/framework.py b/projects/e2e/torch_mlir_e2e_test/framework.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/framework.py rename to projects/e2e/torch_mlir_e2e_test/framework.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/linalg_on_tensors_backends/__init__.py b/projects/e2e/torch_mlir_e2e_test/linalg_on_tensors_backends/__init__.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/linalg_on_tensors_backends/__init__.py rename to projects/e2e/torch_mlir_e2e_test/linalg_on_tensors_backends/__init__.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/linalg_on_tensors_backends/abc.py b/projects/e2e/torch_mlir_e2e_test/linalg_on_tensors_backends/abc.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/linalg_on_tensors_backends/abc.py rename to projects/e2e/torch_mlir_e2e_test/linalg_on_tensors_backends/abc.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/linalg_on_tensors_backends/refbackend.py b/projects/e2e/torch_mlir_e2e_test/linalg_on_tensors_backends/refbackend.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/linalg_on_tensors_backends/refbackend.py rename to projects/e2e/torch_mlir_e2e_test/linalg_on_tensors_backends/refbackend.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/configs/__init__.py b/projects/e2e/torch_mlir_e2e_test/pt1_configs/__init__.py similarity index 75% rename from projects/pt1/python/torch_mlir_e2e_test/configs/__init__.py rename to projects/e2e/torch_mlir_e2e_test/pt1_configs/__init__.py index 62e731349a95..0f88ab202de5 100644 --- a/projects/pt1/python/torch_mlir_e2e_test/configs/__init__.py +++ b/projects/e2e/torch_mlir_e2e_test/pt1_configs/__init__.py @@ -3,10 +3,7 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # Also available under a BSD-style license. See LICENSE. +from .jit_importer_backend import JITImporterTestConfig from .lazy_tensor_core import LazyTensorCoreTestConfig -from .native_torch import NativeTorchTestConfig -from .onnx_backend import OnnxBackendTestConfig -from .torchscript import TorchScriptTestConfig from .torchdynamo import TorchDynamoTestConfig -from .jit_importer_backend import JITImporterTestConfig -from .fx_importer_backend import FxImporterTestConfig +from .torchscript import TorchScriptTestConfig diff --git a/projects/pt1/python/torch_mlir_e2e_test/configs/jit_importer_backend.py b/projects/e2e/torch_mlir_e2e_test/pt1_configs/jit_importer_backend.py similarity index 98% rename from projects/pt1/python/torch_mlir_e2e_test/configs/jit_importer_backend.py rename to projects/e2e/torch_mlir_e2e_test/pt1_configs/jit_importer_backend.py index 4f547d531294..4377f9b4b616 100644 --- a/projects/pt1/python/torch_mlir_e2e_test/configs/jit_importer_backend.py +++ b/projects/e2e/torch_mlir_e2e_test/pt1_configs/jit_importer_backend.py @@ -12,7 +12,7 @@ from torch_mlir_e2e_test.framework import TestConfig, Trace, TraceItem from torch_mlir_e2e_test.utils import convert_annotations_to_placeholders -from .utils import ( +from torch_mlir_e2e_test.configs.utils import ( recursively_convert_to_numpy, recursively_convert_from_numpy, ) diff --git a/projects/pt1/python/torch_mlir_e2e_test/configs/lazy_tensor_core.py b/projects/e2e/torch_mlir_e2e_test/pt1_configs/lazy_tensor_core.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/configs/lazy_tensor_core.py rename to projects/e2e/torch_mlir_e2e_test/pt1_configs/lazy_tensor_core.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/configs/torchdynamo.py b/projects/e2e/torch_mlir_e2e_test/pt1_configs/torchdynamo.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/configs/torchdynamo.py rename to projects/e2e/torch_mlir_e2e_test/pt1_configs/torchdynamo.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/configs/torchscript.py b/projects/e2e/torch_mlir_e2e_test/pt1_configs/torchscript.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/configs/torchscript.py rename to projects/e2e/torch_mlir_e2e_test/pt1_configs/torchscript.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/registry.py b/projects/e2e/torch_mlir_e2e_test/registry.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/registry.py rename to projects/e2e/torch_mlir_e2e_test/registry.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/reporting.py b/projects/e2e/torch_mlir_e2e_test/reporting.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/reporting.py rename to projects/e2e/torch_mlir_e2e_test/reporting.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/stablehlo_backends/__init__.py b/projects/e2e/torch_mlir_e2e_test/stablehlo_backends/__init__.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/stablehlo_backends/__init__.py rename to projects/e2e/torch_mlir_e2e_test/stablehlo_backends/__init__.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/stablehlo_backends/abc.py b/projects/e2e/torch_mlir_e2e_test/stablehlo_backends/abc.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/stablehlo_backends/abc.py rename to projects/e2e/torch_mlir_e2e_test/stablehlo_backends/abc.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/stablehlo_backends/linalg_on_tensors.py b/projects/e2e/torch_mlir_e2e_test/stablehlo_backends/linalg_on_tensors.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/stablehlo_backends/linalg_on_tensors.py rename to projects/e2e/torch_mlir_e2e_test/stablehlo_backends/linalg_on_tensors.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/__init__.py b/projects/e2e/torch_mlir_e2e_test/test_suite/__init__.py similarity index 96% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/__init__.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/__init__.py index bd82cd1c11b0..93cdc1560673 100644 --- a/projects/pt1/python/torch_mlir_e2e_test/test_suite/__init__.py +++ b/projects/e2e/torch_mlir_e2e_test/test_suite/__init__.py @@ -7,8 +7,6 @@ # These represent further work needed in torch-mlir to lower them properly # to the backend contract. -from torch_mlir._version import torch_version_for_comparison, version - COMMON_TORCH_MLIR_LOWERING_XFAILS = { "NativeGroupNormBackwardModule_basic", "QuantizedMLP_basic", diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/arange.py b/projects/e2e/torch_mlir_e2e_test/test_suite/arange.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/arange.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/arange.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/backprop.py b/projects/e2e/torch_mlir_e2e_test/test_suite/backprop.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/backprop.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/backprop.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/basic.py b/projects/e2e/torch_mlir_e2e_test/test_suite/basic.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/basic.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/basic.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/cast.py b/projects/e2e/torch_mlir_e2e_test/test_suite/cast.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/cast.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/cast.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/constant_alloc.py b/projects/e2e/torch_mlir_e2e_test/test_suite/constant_alloc.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/constant_alloc.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/constant_alloc.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/control_flow.py b/projects/e2e/torch_mlir_e2e_test/test_suite/control_flow.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/control_flow.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/control_flow.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/conv.py b/projects/e2e/torch_mlir_e2e_test/test_suite/conv.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/conv.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/conv.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/custom_op_example.py b/projects/e2e/torch_mlir_e2e_test/test_suite/custom_op_example.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/custom_op_example.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/custom_op_example.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/diagonal.py b/projects/e2e/torch_mlir_e2e_test/test_suite/diagonal.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/diagonal.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/diagonal.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/elementwise.py b/projects/e2e/torch_mlir_e2e_test/test_suite/elementwise.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/elementwise.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/elementwise.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/elementwise_comparison.py b/projects/e2e/torch_mlir_e2e_test/test_suite/elementwise_comparison.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/elementwise_comparison.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/elementwise_comparison.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/gridsampler.py b/projects/e2e/torch_mlir_e2e_test/test_suite/gridsampler.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/gridsampler.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/gridsampler.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/histogram_binning_calibration.py b/projects/e2e/torch_mlir_e2e_test/test_suite/histogram_binning_calibration.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/histogram_binning_calibration.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/histogram_binning_calibration.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/index_select.py b/projects/e2e/torch_mlir_e2e_test/test_suite/index_select.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/index_select.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/index_select.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/kl_div_loss.py b/projects/e2e/torch_mlir_e2e_test/test_suite/kl_div_loss.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/kl_div_loss.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/kl_div_loss.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/linalg_algorithms.py b/projects/e2e/torch_mlir_e2e_test/test_suite/linalg_algorithms.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/linalg_algorithms.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/linalg_algorithms.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/matmul.py b/projects/e2e/torch_mlir_e2e_test/test_suite/matmul.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/matmul.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/matmul.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/meshgrid.py b/projects/e2e/torch_mlir_e2e_test/test_suite/meshgrid.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/meshgrid.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/meshgrid.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/mlp.py b/projects/e2e/torch_mlir_e2e_test/test_suite/mlp.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/mlp.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/mlp.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/nll_loss.py b/projects/e2e/torch_mlir_e2e_test/test_suite/nll_loss.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/nll_loss.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/nll_loss.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/norm_like.py b/projects/e2e/torch_mlir_e2e_test/test_suite/norm_like.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/norm_like.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/norm_like.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/padding.py b/projects/e2e/torch_mlir_e2e_test/test_suite/padding.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/padding.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/padding.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/pooling.py b/projects/e2e/torch_mlir_e2e_test/test_suite/pooling.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/pooling.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/pooling.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/quantized_models.py b/projects/e2e/torch_mlir_e2e_test/test_suite/quantized_models.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/quantized_models.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/quantized_models.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/reduction.py b/projects/e2e/torch_mlir_e2e_test/test_suite/reduction.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/reduction.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/reduction.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/reshape_like.py b/projects/e2e/torch_mlir_e2e_test/test_suite/reshape_like.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/reshape_like.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/reshape_like.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/return_types.py b/projects/e2e/torch_mlir_e2e_test/test_suite/return_types.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/return_types.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/return_types.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/rng.py b/projects/e2e/torch_mlir_e2e_test/test_suite/rng.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/rng.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/rng.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/scalar.py b/projects/e2e/torch_mlir_e2e_test/test_suite/scalar.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/scalar.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/scalar.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/scalar_comparison.py b/projects/e2e/torch_mlir_e2e_test/test_suite/scalar_comparison.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/scalar_comparison.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/scalar_comparison.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/scatter.py b/projects/e2e/torch_mlir_e2e_test/test_suite/scatter.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/scatter.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/scatter.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/slice_like.py b/projects/e2e/torch_mlir_e2e_test/test_suite/slice_like.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/slice_like.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/slice_like.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/spectral.py b/projects/e2e/torch_mlir_e2e_test/test_suite/spectral.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/spectral.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/spectral.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/squeeze.py b/projects/e2e/torch_mlir_e2e_test/test_suite/squeeze.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/squeeze.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/squeeze.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/stats.py b/projects/e2e/torch_mlir_e2e_test/test_suite/stats.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/stats.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/stats.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/threshold.py b/projects/e2e/torch_mlir_e2e_test/test_suite/threshold.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/threshold.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/threshold.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/timeout.py b/projects/e2e/torch_mlir_e2e_test/test_suite/timeout.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/timeout.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/timeout.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/type_conversion.py b/projects/e2e/torch_mlir_e2e_test/test_suite/type_conversion.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/type_conversion.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/type_conversion.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/type_promotion.py b/projects/e2e/torch_mlir_e2e_test/test_suite/type_promotion.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/type_promotion.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/type_promotion.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/test_suite/vision_models.py b/projects/e2e/torch_mlir_e2e_test/test_suite/vision_models.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/test_suite/vision_models.py rename to projects/e2e/torch_mlir_e2e_test/test_suite/vision_models.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/tosa_backends/__init__.py b/projects/e2e/torch_mlir_e2e_test/tosa_backends/__init__.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/tosa_backends/__init__.py rename to projects/e2e/torch_mlir_e2e_test/tosa_backends/__init__.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/tosa_backends/abc.py b/projects/e2e/torch_mlir_e2e_test/tosa_backends/abc.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/tosa_backends/abc.py rename to projects/e2e/torch_mlir_e2e_test/tosa_backends/abc.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/tosa_backends/linalg_on_tensors.py b/projects/e2e/torch_mlir_e2e_test/tosa_backends/linalg_on_tensors.py similarity index 100% rename from projects/pt1/python/torch_mlir_e2e_test/tosa_backends/linalg_on_tensors.py rename to projects/e2e/torch_mlir_e2e_test/tosa_backends/linalg_on_tensors.py diff --git a/projects/pt1/python/torch_mlir_e2e_test/utils.py b/projects/e2e/torch_mlir_e2e_test/utils.py similarity index 84% rename from projects/pt1/python/torch_mlir_e2e_test/utils.py rename to projects/e2e/torch_mlir_e2e_test/utils.py index 0ab47efa9284..b3a144f37387 100644 --- a/projects/pt1/python/torch_mlir_e2e_test/utils.py +++ b/projects/e2e/torch_mlir_e2e_test/utils.py @@ -3,6 +3,9 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # Also available under a BSD-style license. See LICENSE. +from packaging import version +import torch + from torch_mlir.compiler_utils import TensorPlaceholder from torch_mlir_e2e_test.annotations import TORCH_MLIR_ARG_ANNOTATIONS_ATTR_NAME @@ -22,3 +25,8 @@ def convert_annotations_to_placeholders(forward_method): ) placeholders.append(TensorPlaceholder(annotation[0], annotation[1])) return placeholders + + +def torch_version_for_comparison(): + # Ignore +cpu, +cu117m, etc. in comparisons + return version.parse(torch.__version__.split("+", 1)[0]) diff --git a/projects/pt1/python/CMakeLists.txt b/projects/pt1/python/CMakeLists.txt index c86f8e52c881..ca0febf011e4 100644 --- a/projects/pt1/python/CMakeLists.txt +++ b/projects/pt1/python/CMakeLists.txt @@ -41,7 +41,6 @@ endif() if(TORCH_MLIR_ENABLE_JIT_IR_IMPORTER) add_subdirectory(torch_mlir/jit_ir_importer) add_subdirectory(torch_mlir/csrc/jit_ir_importer) - add_subdirectory(torch_mlir_e2e_test) endif() ################################################################################ diff --git a/projects/pt1/python/test/torchscript_e2e_test/basic.py b/projects/pt1/python/test/torchscript_e2e_test/basic.py index 83a73900d6b8..096855e77f06 100644 --- a/projects/pt1/python/test/torchscript_e2e_test/basic.py +++ b/projects/pt1/python/test/torchscript_e2e_test/basic.py @@ -10,7 +10,7 @@ from torch_mlir_e2e_test.framework import run_tests, TestUtils from torch_mlir_e2e_test.reporting import report_results from torch_mlir_e2e_test.registry import register_test_case, GLOBAL_TEST_REGISTRY -from torch_mlir_e2e_test.configs import TorchScriptTestConfig +from torch_mlir_e2e_test.pt1_configs import TorchScriptTestConfig class MmModule(torch.nn.Module): diff --git a/projects/pt1/python/test/torchscript_e2e_test/compilation_failure.py b/projects/pt1/python/test/torchscript_e2e_test/compilation_failure.py index 4aac65df8aae..7f1c8d6424a5 100644 --- a/projects/pt1/python/test/torchscript_e2e_test/compilation_failure.py +++ b/projects/pt1/python/test/torchscript_e2e_test/compilation_failure.py @@ -10,7 +10,7 @@ from torch_mlir_e2e_test.framework import run_tests, TestUtils from torch_mlir_e2e_test.reporting import report_results from torch_mlir_e2e_test.registry import register_test_case, GLOBAL_TEST_REGISTRY -from torch_mlir_e2e_test.configs import TorchScriptTestConfig +from torch_mlir_e2e_test.pt1_configs import TorchScriptTestConfig class MmModule(torch.nn.Module): diff --git a/projects/pt1/python/test/torchscript_e2e_test/error_reports.py b/projects/pt1/python/test/torchscript_e2e_test/error_reports.py index f6c949c3d828..62062203ce73 100644 --- a/projects/pt1/python/test/torchscript_e2e_test/error_reports.py +++ b/projects/pt1/python/test/torchscript_e2e_test/error_reports.py @@ -12,7 +12,7 @@ from torch_mlir_e2e_test.framework import run_tests, TestUtils from torch_mlir_e2e_test.reporting import report_results from torch_mlir_e2e_test.registry import register_test_case, GLOBAL_TEST_REGISTRY -from torch_mlir_e2e_test.configs import TorchScriptTestConfig +from torch_mlir_e2e_test.pt1_configs import TorchScriptTestConfig # CHECK: Unexpected outcome summary: # CHECK: FAIL - "ErroneousModule_basic" diff --git a/projects/pt1/python/test/torchscript_e2e_test/non_tensor_values.py b/projects/pt1/python/test/torchscript_e2e_test/non_tensor_values.py index 8991229f0a29..b3c09efc4276 100644 --- a/projects/pt1/python/test/torchscript_e2e_test/non_tensor_values.py +++ b/projects/pt1/python/test/torchscript_e2e_test/non_tensor_values.py @@ -12,7 +12,7 @@ from torch_mlir_e2e_test.framework import run_tests, TestUtils from torch_mlir_e2e_test.reporting import report_results from torch_mlir_e2e_test.registry import register_test_case, GLOBAL_TEST_REGISTRY -from torch_mlir_e2e_test.configs import TorchScriptTestConfig +from torch_mlir_e2e_test.pt1_configs import TorchScriptTestConfig class NonTensorValuesModule(torch.nn.Module): diff --git a/projects/pt1/python/test/torchscript_e2e_test/runtime_failure.py b/projects/pt1/python/test/torchscript_e2e_test/runtime_failure.py index b7609bc2c0e2..415785472316 100644 --- a/projects/pt1/python/test/torchscript_e2e_test/runtime_failure.py +++ b/projects/pt1/python/test/torchscript_e2e_test/runtime_failure.py @@ -10,7 +10,7 @@ from torch_mlir_e2e_test.framework import run_tests, TestUtils from torch_mlir_e2e_test.reporting import report_results from torch_mlir_e2e_test.registry import register_test_case, GLOBAL_TEST_REGISTRY -from torch_mlir_e2e_test.configs import TorchScriptTestConfig +from torch_mlir_e2e_test.pt1_configs import TorchScriptTestConfig class MmModule(torch.nn.Module): diff --git a/projects/pt1/python/test/torchscript_e2e_test/submodule.py b/projects/pt1/python/test/torchscript_e2e_test/submodule.py index ae7ee878bf36..6656da1b61c5 100644 --- a/projects/pt1/python/test/torchscript_e2e_test/submodule.py +++ b/projects/pt1/python/test/torchscript_e2e_test/submodule.py @@ -10,7 +10,7 @@ from torch_mlir_e2e_test.framework import run_tests, TestUtils from torch_mlir_e2e_test.reporting import report_results from torch_mlir_e2e_test.registry import register_test_case, GLOBAL_TEST_REGISTRY -from torch_mlir_e2e_test.configs import TorchScriptTestConfig +from torch_mlir_e2e_test.pt1_configs import TorchScriptTestConfig class Submodule2(torch.nn.Module): diff --git a/pytorch-hash.txt b/pytorch-hash.txt index b1886c1abddd..582695ddc3c7 100644 --- a/pytorch-hash.txt +++ b/pytorch-hash.txt @@ -1 +1 @@ -7956a1d1d0dc7cdaaaa42d0863eebb1b1e75eb65 +0dfcb1a118dd45c544a156e1d86566368e528e69 diff --git a/pytorch-requirements.txt b/pytorch-requirements.txt index 87cbf28f5a98..ac81781a6b2b 100644 --- a/pytorch-requirements.txt +++ b/pytorch-requirements.txt @@ -1,3 +1,3 @@ -f https://download.pytorch.org/whl/nightly/cpu/torch/ --pre -torch==2.9.0.dev20250820 +torch==2.10.0.dev20251016 diff --git a/torchvision-requirements.txt b/torchvision-requirements.txt index 68c96010c96f..546bfb138e43 100644 --- a/torchvision-requirements.txt +++ b/torchvision-requirements.txt @@ -1,3 +1,3 @@ -f https://download.pytorch.org/whl/nightly/cpu/torchvision/ --pre -torchvision==0.24.0.dev20250820 +torchvision==0.25.0.dev20251016