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 include/tvm/runtime/tensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/vm/builtin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading