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

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


The following commit(s) were added to refs/heads/main by this push:
     new 71dea75  small fix (#27)
71dea75 is described below

commit 71dea752f43267b1929a119672b6862db20ac8aa
Author: Kathryn (Jinqi) Chen <[email protected]>
AuthorDate: Thu Sep 18 17:45:35 2025 -0700

    small fix (#27)
---
 python/tvm_ffi/_optional_torch_c_dlpack.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/tvm_ffi/_optional_torch_c_dlpack.py 
b/python/tvm_ffi/_optional_torch_c_dlpack.py
index 2501607..dd820a9 100644
--- a/python/tvm_ffi/_optional_torch_c_dlpack.py
+++ b/python/tvm_ffi/_optional_torch_c_dlpack.py
@@ -210,7 +210,7 @@ template <class T>
 T* toDLPackImpl(const Tensor& src) {
   auto view = src;
 
-  bool need_normalize_strides = src.ndim() == 1 && src.size(0) == 1 && 
src.stride(0) != 1;
+  bool need_normalize_strides = src.dim() == 1 && src.size(0) == 1 && 
src.stride(0) != 1;
   // less common case, try normalizing the strides
   if (need_normalize_strides) {
     // create a new tensor with possibly normalized strides

Reply via email to