This is an automated email from the ASF dual-hosted git repository.
ruihangl 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 f68651f035 [FFI][ABI] Bump tvm-ffi to latest (#18349)
f68651f035 is described below
commit f68651f035d08024c05f218182b5c003ad814eb5
Author: Tianqi Chen <[email protected]>
AuthorDate: Sat Sep 27 23:16:35 2025 -0400
[FFI][ABI] Bump tvm-ffi to latest (#18349)
This PR bumps tvm-ffi to latest. Which introduces ShapeView andminimizes
TensorObj ABI.
---
3rdparty/tvm-ffi | 2 +-
include/tvm/runtime/tensor.h | 2 +-
src/runtime/vm/builtin.cc | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/3rdparty/tvm-ffi b/3rdparty/tvm-ffi
index 43ffe571bf..fde8dabbba 160000
--- a/3rdparty/tvm-ffi
+++ b/3rdparty/tvm-ffi
@@ -1 +1 @@
-Subproject commit 43ffe571bfef2a3f2c2dc254ca3e5dc10e093daa
+Subproject commit fde8dabbba8aa0ea8133a02fcd9ff0190d830948
diff --git a/include/tvm/runtime/tensor.h b/include/tvm/runtime/tensor.h
index 97af218a18..3028723957 100644
--- a/include/tvm/runtime/tensor.h
+++ b/include/tvm/runtime/tensor.h
@@ -63,7 +63,7 @@ class Tensor : public tvm::ffi::Tensor {
Tensor(ffi::Tensor&& other) : tvm::ffi::Tensor(std::move(other)) {} //
NOLINT(*)
Tensor(const ffi::Tensor& other) : tvm::ffi::Tensor(other) {} //
NOLINT(*)
- ffi::Shape Shape() const { return this->shape(); }
+ ffi::ShapeView Shape() const { return this->shape(); }
runtime::DataType DataType() const { return
runtime::DataType(this->dtype()); }
// DLPack handling
diff --git a/src/runtime/vm/builtin.cc b/src/runtime/vm/builtin.cc
index 41c011678e..d94d5676bb 100644
--- a/src/runtime/vm/builtin.cc
+++ b/src/runtime/vm/builtin.cc
@@ -510,7 +510,7 @@ TVM_FFI_STATIC_INIT_BLOCK() {
TVM_FFI_STATIC_INIT_BLOCK() {
namespace refl = tvm::ffi::reflection;
refl::GlobalDef()
- .def_method("vm.builtin.shape_of", &Tensor::Shape)
+ .def_method("vm.builtin.shape_of", [](Tensor data) -> ffi::Shape {
return data.Shape(); })
.def("vm.builtin.copy", [](ffi::Any a) -> ffi::Any { return a; })
.def(
"vm.builtin.reshape",