You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When loading a model that uses sparse tensor but with incompatible dense and indices tensor shape, onnxruntime will crash.
Additional checks should be added when loading sparse tensors to ensure data can actually be loaded and avoid reading array pass their end. Having those safeguards will also help providing better error feedback.
Describe the issue
When loading a model that uses sparse tensor but with incompatible dense and indices tensor shape, onnxruntime will crash.
Additional checks should be added when loading sparse tensors to ensure data can actually be loaded and avoid reading array pass their end. Having those safeguards will also help providing better error feedback.
onnxruntime/onnxruntime/core/framework/tensorprotoutils.cc
Line 1262 in c20ced4
cur_index
is at least of sizen_sparse_elements * rank
To reproduce
Create an inference session with the attached ONNX model, a crash will occur.
wrong_sparse_shape.zip
Urgency
No response
Platform
Windows
OS Version
10
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.16.1
ONNX Runtime API
Python
Architecture
X64
Execution Provider
Default CPU
Execution Provider Library Version
No response
The text was updated successfully, but these errors were encountered: