From 82e6d652e130cfc972a76237e3679e39c530a66a Mon Sep 17 00:00:00 2001 From: "Carson M." Date: Wed, 11 Mar 2026 14:32:30 -0500 Subject: [PATCH] fix: allow using tensors with undefined element types --- src/value/type.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/value/type.rs b/src/value/type.rs index 7411439..35d8e24 100644 --- a/src/value/type.rs +++ b/src/value/type.rs @@ -389,7 +389,6 @@ impl Drop for Outlet { pub(crate) unsafe fn extract_data_type_from_tensor_info(info_ptr: NonNull) -> ValueType { let mut type_sys = ort_sys::ONNXTensorElementDataType::ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED; ortsys![unsafe GetTensorElementType(info_ptr.as_ptr(), &mut type_sys).expect("infallible")]; - assert_ne!(type_sys, ort_sys::ONNXTensorElementDataType::ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED); // This transmute should be safe since its value is read from GetTensorElementType, which we must trust let mut num_dims = 0; ortsys![unsafe GetDimensionsCount(info_ptr.as_ptr(), &mut num_dims).expect("infallible")];