From 69a2b603a122fc01a8e354a205b8e6383d60dc2c Mon Sep 17 00:00:00 2001 From: Luke Hutton Date: Tue, 27 Feb 2024 13:25:37 +0000 Subject: [PATCH] [BugFix][FFI] Add a missing default for datatype lanes A default value for lanes was unintentionally removed in #16612, this PR fixes this which in turn fixes the test failure seen in `test_tensor_dtype_lanes` in CI. Change-Id: If1b06cb836d62e85620971fd1ad0498c9fdc66b9 --- python/tvm/_ffi/runtime_ctypes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/tvm/_ffi/runtime_ctypes.py b/python/tvm/_ffi/runtime_ctypes.py index 06f2d4c7e6b6..570a24ed5dd3 100644 --- a/python/tvm/_ffi/runtime_ctypes.py +++ b/python/tvm/_ffi/runtime_ctypes.py @@ -140,6 +140,8 @@ def __init__(self, type_str): self.lanes = ctypes.c_uint16(-int(arr[2])) elif len(arr) > 1: self.lanes = ctypes.c_uint16(int(arr[1])) + else: + self.lanes = 1 bits = 32 if head.startswith("int"):