You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by sy...@apache.org on 2023/12/04 08:29:48 UTC
(tvm) 01/01: update
This is an automated email from the ASF dual-hosted git repository.
syfeng pushed a commit to branch test_all_cases_on_unity
in repository https://gitbox.apache.org/repos/asf/tvm.git
commit c1f3d83bca07d1ec0b72108064b1d311b525b580
Author: Siyuan Feng <hz...@sjtu.edu.cn>
AuthorDate: Mon Dec 4 16:29:09 2023 +0800
update
---
ci/jenkins/generated/cpu_jenkinsfile.groovy | 3 ++-
include/tvm/topi/transform.h | 11 +++++++++--
rust/tvm/src/ir/module.rs | 2 +-
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/ci/jenkins/generated/cpu_jenkinsfile.groovy b/ci/jenkins/generated/cpu_jenkinsfile.groovy
index 38364747bc..3a5f888427 100644
--- a/ci/jenkins/generated/cpu_jenkinsfile.groovy
+++ b/ci/jenkins/generated/cpu_jenkinsfile.groovy
@@ -572,7 +572,8 @@ def build(node_type) {
ci_setup(ci_cpu)
// sh "${docker_run} ${ci_cpu} ./tests/scripts/task_golang.sh"
// TODO(@jroesch): need to resolve CI issue will turn back on in follow up patch
- sh (script: "${docker_run} ${ci_cpu} ./tests/scripts/task_rust.sh", label: 'Rust build and test')
+
+ // sh (script: "${docker_run} ${ci_cpu} ./tests/scripts/task_rust.sh", label: 'Rust build and test')
})
}
}
diff --git a/include/tvm/topi/transform.h b/include/tvm/topi/transform.h
index 009f8cdd30..7ee09d834f 100644
--- a/include/tvm/topi/transform.h
+++ b/include/tvm/topi/transform.h
@@ -43,6 +43,8 @@
#include <unordered_set>
#include <vector>
+#include "tvm/tir/expr.h"
+
namespace tvm {
namespace topi {
@@ -716,8 +718,13 @@ inline Tensor dynamic_strided_slice(const Tensor& x, const Array<PrimExpr>& begi
arith::Analyzer analyzer;
for (size_t i = 0; i < num_slice_axes; ++i) {
- auto d = analyzer.Simplify(indexdiv(end[i] - begin[i], strides[i]));
- out_shape.push_back(d);
+ // Check ProducerLoad to keep backward compatibility for Relay.
+ if (!begin[i]->IsInstance<ProducerLoadNode>() && !end[i]->IsInstance<ProducerLoadNode>() &&
+ !strides[i]->IsInstance<ProducerLoadNode>()) {
+ out_shape.push_back(analyzer.Simplify(indexdiv(end[i] - begin[i], strides[i])));
+ } else {
+ out_shape.push_back(tvm::tir::Var("dim"));
+ }
}
for (size_t i = num_slice_axes; i < src_tensor_dim; ++i) {
diff --git a/rust/tvm/src/ir/module.rs b/rust/tvm/src/ir/module.rs
index a4eccbbf41..bb1d2b730d 100644
--- a/rust/tvm/src/ir/module.rs
+++ b/rust/tvm/src/ir/module.rs
@@ -123,7 +123,7 @@ impl IRModule {
funcs.iter(),
types.iter(),
attrs.iter(),
- global_infos.iter()
+ global_infos.iter(),
)
}