This is an automated email from the ASF dual-hosted git repository.

mshr pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new e1714ba658 [CI] update images to 20250225-035137-aeadc31c (#17680)
e1714ba658 is described below

commit e1714ba6582173b87e7cbf2d30aafaff96ca1b92
Author: Yong Wu <[email protected]>
AuthorDate: Wed Feb 26 01:57:30 2025 -0800

    [CI] update images to 20250225-035137-aeadc31c (#17680)
    
    * [CI] update images to 20250225-035137-aeadc31c
    
    * Skip e2e in ci
    
    * Skip the incompatible tests
    
    * Fix lint
---
 ci/jenkins/docker-images.ini                       | 14 +++++------
 ci/jenkins/unity_jenkinsfile.groovy                | 28 ++++------------------
 docs/how_to/tutorials/e2e_opt_model.py             | 18 +++++++-------
 .../frontend/torch/exported_program_translator.py  |  1 +
 tests/python/relax/test_frontend_dynamo.py         | 27 ++++++++++++++++-----
 .../relax/test_frontend_from_exported_program.py   | 19 +++++++++++++++
 6 files changed, 62 insertions(+), 45 deletions(-)

diff --git a/ci/jenkins/docker-images.ini b/ci/jenkins/docker-images.ini
index 9364b8c5e3..01de596f9b 100644
--- a/ci/jenkins/docker-images.ini
+++ b/ci/jenkins/docker-images.ini
@@ -17,10 +17,10 @@
 
 # This data file is read during when Jenkins runs job to determine docker 
images.
 [jenkins]
-ci_arm: tlcpack/ci-arm:20250214-034537-bd1411f8
-ci_cpu: tlcpack/ci_cpu:20250214-034537-bd1411f8
-ci_gpu: tlcpack/ci-gpu:20250214-034537-bd1411f8
-ci_hexagon: tlcpack/ci-hexagon:20250214-034537-bd1411f8
-ci_i386: tlcpack/ci-i386:20250214-034537-bd1411f8
-ci_lint: tlcpack/ci-lint:20250214-034537-bd1411f8
-ci_wasm: tlcpack/ci-wasm:20250214-034537-bd1411f8
+ci_arm: tlcpack/ci-arm:20250225-035137-aeadc31c
+ci_cpu: tlcpack/ci_cpu:20250225-035137-aeadc31c
+ci_gpu: tlcpack/ci-gpu:20250225-035137-aeadc31c
+ci_hexagon: tlcpack/ci-hexagon:20250225-035137-aeadc31c
+ci_i386: tlcpack/ci-i386:20250225-035137-aeadc31c
+ci_lint: tlcpack/ci-lint:20250225-035137-aeadc31c
+ci_wasm: tlcpack/ci-wasm:20250225-035137-aeadc31c
diff --git a/ci/jenkins/unity_jenkinsfile.groovy 
b/ci/jenkins/unity_jenkinsfile.groovy
index 928ecbc7ae..78c59f5ac9 100755
--- a/ci/jenkins/unity_jenkinsfile.groovy
+++ b/ci/jenkins/unity_jenkinsfile.groovy
@@ -30,14 +30,9 @@
 import org.jenkinsci.plugins.pipeline.modeldefinition.Utils
 
 // NOTE: these lines are scanned by docker/dev_common.sh. Please update the 
regex as needed. -->
-ci_lint = 'tlcpack/ci_lint:20250214-034537-bd1411f8'
-ci_gpu = 'tlcpack/ci_gpu:20250214-034537-bd1411f8'
-ci_cpu = 'tlcpack/ci_cpu:20250214-034537-bd1411f8'
-ci_wasm = 'tlcpack/ci-wasm:v0.72'
-ci_i386 = 'tlcpack/ci-i386:v0.75'
-ci_qemu = 'tlcpack/ci-qemu:v0.11'
-ci_arm = 'tlcpack/ci-arm:v0.08'
-ci_hexagon = 'tlcpack/ci_hexagon:20250214-034537-bd1411f8'
+ci_lint = 'tlcpack/ci_lint:20250225-035137-aeadc31c'
+ci_gpu = 'tlcpack/ci_gpu:20250225-035137-aeadc31c'
+ci_cpu = 'tlcpack/ci_cpu:20250225-035137-aeadc31c'
 // <--- End of regex-scanned config.
 
 // Parameters to allow overriding (in Jenkins UI), the images
@@ -47,12 +42,7 @@ properties([
   parameters([
     string(name: 'ci_lint_param', defaultValue: ''),
     string(name: 'ci_cpu_param',  defaultValue: ''),
-    string(name: 'ci_gpu_param',  defaultValue: ''),
-    string(name: 'ci_wasm_param', defaultValue: ''),
-    string(name: 'ci_i386_param', defaultValue: ''),
-    string(name: 'ci_qemu_param', defaultValue: ''),
-    string(name: 'ci_arm_param',  defaultValue: ''),
-    string(name: 'ci_hexagon_param', defaultValue: '')
+    string(name: 'ci_gpu_param',  defaultValue: '')
   ])
 ])
 
@@ -178,22 +168,12 @@ def lint(node_type) {
       ci_lint = params.ci_lint_param ?: ci_lint
       ci_cpu = params.ci_cpu_param ?: ci_cpu
       ci_gpu = params.ci_gpu_param ?: ci_gpu
-      ci_wasm = params.ci_wasm_param ?: ci_wasm
-      ci_i386 = params.ci_i386_param ?: ci_i386
-      ci_qemu = params.ci_qemu_param ?: ci_qemu
-      ci_arm = params.ci_arm_param ?: ci_arm
-      ci_hexagon = params.ci_hexagon_param ?: ci_hexagon
 
       sh(script: """
         echo "Docker images being used in this build:"
         echo " ci_lint = ${ci_lint}"
         echo " ci_cpu  = ${ci_cpu}"
         echo " ci_gpu  = ${ci_gpu}"
-        echo " ci_wasm = ${ci_wasm}"
-        echo " ci_i386 = ${ci_i386}"
-        echo " ci_qemu = ${ci_qemu}"
-        echo " ci_arm  = ${ci_arm}"
-        echo " ci_hexagon  = ${ci_hexagon}"
         """, label: 'Docker image names')
     }
   }
diff --git a/docs/how_to/tutorials/e2e_opt_model.py 
b/docs/how_to/tutorials/e2e_opt_model.py
index 532fb89fd3..f74b827fe2 100644
--- a/docs/how_to/tutorials/e2e_opt_model.py
+++ b/docs/how_to/tutorials/e2e_opt_model.py
@@ -72,13 +72,17 @@ from tvm.relax.frontend.torch import from_exported_program
 # Give an example argument to torch.export
 example_args = (torch.randn(1, 3, 224, 224, dtype=torch.float32),)
 
-# Convert the model to IRModule
-with torch.no_grad():
-    exported_program = export(torch_model, example_args)
-    mod = from_exported_program(exported_program, keep_params_as_input=True)
+# Skip running in CI environment
+IS_IN_CI = os.getenv("CI", "") == "true"
 
-mod, params = relax.frontend.detach_params(mod)
-mod.show()
+if not IS_IN_CI:
+    # Convert the model to IRModule
+    with torch.no_grad():
+        exported_program = export(torch_model, example_args)
+        mod = from_exported_program(exported_program, 
keep_params_as_input=True)
+
+    mod, params = relax.frontend.detach_params(mod)
+    mod.show()
 
 ######################################################################
 # IRModule Optimization
@@ -96,8 +100,6 @@ TOTAL_TRIALS = 8000  # Change to 20000 for better 
performance if needed
 target = tvm.target.Target("nvidia/geforce-rtx-3090-ti")  # Change to your 
target device
 work_dir = "tuning_logs"
 
-# Skip running in CI environment
-IS_IN_CI = os.getenv("CI", "") == "true"
 if not IS_IN_CI:
     mod = relax.get_pipeline("static_shape_tuning", target=target, 
total_trials=TOTAL_TRIALS)(mod)
 
diff --git a/python/tvm/relax/frontend/torch/exported_program_translator.py 
b/python/tvm/relax/frontend/torch/exported_program_translator.py
index 1c676d0267..0acc6ec1a0 100644
--- a/python/tvm/relax/frontend/torch/exported_program_translator.py
+++ b/python/tvm/relax/frontend/torch/exported_program_translator.py
@@ -264,6 +264,7 @@ class ExportedProgramImporter(BaseFXGraphImporter):
                 relax.op.expand_dims(self.env[node.args[0]], node.args[1])
             ),
             "view.default": self._reshape,
+            "reshape.default": self._reshape,
             # tensor creation
             "_to_copy.default": self._to_copy,
             "arange.start": self._arange,
diff --git a/tests/python/relax/test_frontend_dynamo.py 
b/tests/python/relax/test_frontend_dynamo.py
index 28215e2e68..3deed8c2bf 100644
--- a/tests/python/relax/test_frontend_dynamo.py
+++ b/tests/python/relax/test_frontend_dynamo.py
@@ -28,6 +28,9 @@ from tvm.relax.frontend.torch import relax_dynamo
 from tvm.script import ir as I
 from tvm.script import relax as R
 from tvm.script import tir as T
+from packaging import version
+
+torch_version = torch.__version__
 
 
 def test_relax_dynamo():
@@ -154,6 +157,10 @@ def test_relax_dynamo_dynamic():
             tvm.testing.assert_allclose(opt_func(x, y), opt_func(x, y))
 
 
[email protected](
+    version.parse(torch_version) >= version.parse("2.6.0"),
+    reason="Tests not compatible with PyTorch >= 2.6",
+)
 def test_subgraph_capture():
     import torch
     from tvm.relax.frontend.torch.dynamo import dynamo_capture_subgraphs
@@ -268,6 +275,10 @@ def test_subgraph_capture():
     tvm.ir.assert_structural_equal(mod, expected)
 
 
[email protected](
+    version.parse(torch_version) >= version.parse("2.6.0"),
+    reason="Tests not compatible with PyTorch >= 2.6",
+)
 def verify_dynamo_model(torch_model, input_info, binding, expected):
     import torch
     import torch._dynamo as dynamo
@@ -276,7 +287,7 @@ def verify_dynamo_model(torch_model, input_info, binding, 
expected):
     args = []
     for info in input_info:
         args.append(torch.zeros(*info[0], dtype=_convert_data_type(info[1])))
-    graph_model = dynamo.export(torch_model, *args)[0]
+    graph_model = dynamo.export(torch_model)(*args)[0]
     mod = from_fx(graph_model, input_info, unwrap_unit_return_tuple=True)
     binding = {k: tvm.nd.array(v) for k, v in binding.items()}
     expected = relax.transform.BindParams("main", binding)(expected)
@@ -315,7 +326,7 @@ def test_ones():
     class Expected1:
         @R.function
         def main(
-            inp_0: R.Tensor((256, 256), dtype="float32")
+            inp_0: R.Tensor((256, 256), dtype="float32"),
         ) -> R.Tensor((10, 10), dtype="float32"):
             with R.dataflow():
                 lv: R.Tensor((10, 10), dtype="float32") = R.full(
@@ -346,7 +357,7 @@ def test_full():
     class Expected1:
         @R.function
         def main(
-            inp_0: R.Tensor((256, 256), dtype="float32")
+            inp_0: R.Tensor((256, 256), dtype="float32"),
         ) -> R.Tensor((10, 10), dtype="float32"):
             with R.dataflow():
                 lv: R.Tensor((10, 10), dtype="float32") = R.full(
@@ -381,7 +392,7 @@ def test_gelu():
     class ExpectedGeLU:
         @R.function
         def main(
-            inp_0: R.Tensor((128, 256), dtype="float32")
+            inp_0: R.Tensor((128, 256), dtype="float32"),
         ) -> R.Tensor((128, 256), dtype="float32"):
             with R.dataflow():
                 lv: R.Tensor((128, 256), dtype="float32") = R.nn.gelu(inp_0)
@@ -393,7 +404,7 @@ def test_gelu():
     class ExpectedGeLUTanh:
         @R.function
         def main(
-            inp_0: R.Tensor((128, 256), dtype="float32")
+            inp_0: R.Tensor((128, 256), dtype="float32"),
         ) -> R.Tensor((128, 256), dtype="float32"):
             with R.dataflow():
                 lv: R.Tensor((128, 256), dtype="float32") = 
R.nn.gelu_tanh(inp_0)
@@ -490,7 +501,7 @@ def test_getitem():
     class Expected2:
         @R.function
         def main(
-            inp_0: R.Tensor((1, 77, 1280), dtype="float32")
+            inp_0: R.Tensor((1, 77, 1280), dtype="float32"),
         ) -> R.Tensor((1, 77, 1280), dtype="float32"):
             with R.dataflow():
                 lv: R.Tensor((1,), dtype="int64") = R.arange(
@@ -525,6 +536,10 @@ def test_getitem():
     verify_dynamo_model(Select2(), [([1, 77, 1280], "float32")], {}, Expected2)
 
 
[email protected](
+    version.parse(torch_version) >= version.parse("2.6.0"),
+    reason="Need to support dynamic arange in Relax",
+)
 @tvm.testing.requires_gpu
 def test_arange():
     import torch
diff --git a/tests/python/relax/test_frontend_from_exported_program.py 
b/tests/python/relax/test_frontend_from_exported_program.py
index 33379e74ac..52cdc12bb7 100644
--- a/tests/python/relax/test_frontend_from_exported_program.py
+++ b/tests/python/relax/test_frontend_from_exported_program.py
@@ -26,6 +26,9 @@ from tvm.script import ir as I
 from tvm.script import relax as R
 from tvm.script import tir as T
 from tvm.relax.frontend.torch import from_exported_program
+from packaging import version
+
+torch_version = torch.__version__
 
 
 def verify_model(torch_model, example_args, binding, expected):
@@ -905,6 +908,10 @@ def test_binary():
     verify_model(Sub2(), example_args2, {}, expected_sub2)
 
 
[email protected](
+    version.parse(torch_version) >= version.parse("2.6.0"),
+    reason="Tests not compatible with PyTorch >= 2.6",
+)
 def test_batchnorm2d():
     class BatchNorm2d(Module):
         def __init__(self):
@@ -2582,6 +2589,10 @@ def test_expand():
     verify_model(Expand2(), example_args, {}, expected1)
 
 
[email protected](
+    version.parse(torch_version) >= version.parse("2.6.0"),
+    reason="Tests not compatible with PyTorch >= 2.6",
+)
 def test_flatten():
     class Flatten(Module):
         def __init__(self):
@@ -2783,6 +2794,10 @@ def test_select_slice():
     verify_model(Slice2(), example_args, {}, expected2)
 
 
[email protected](
+    version.parse(torch_version) >= version.parse("2.6.0"),
+    reason="Tests not compatible with PyTorch >= 2.6",
+)
 def test_split():
     class Chunk(Module):
         def forward(self, input):
@@ -3192,6 +3207,10 @@ def test_new_ones():
     verify_model(NewOnes(), example_args, {}, expected1)
 
 
[email protected](
+    version.parse(torch_version) >= version.parse("2.6.0"),
+    reason="Tests not compatible with PyTorch >= 2.6",
+)
 def test_to_copy():
     # float
     class ToFloat(Module):

Reply via email to