When value_strings attribute is specified in Constant_init function, 3rd argument (dims) of onnx_tensor_reinit is set by the following code.
(int[]){ attr->n_ints }
But I guess attr->n_strings should be used instead of attr->n_ints.
I added the test case node/test_constant_value_strings to make sure value_strings attribute is handled properly.
However, the test case passes even with original code because onnx_tensor_reinit function won't be called when output tensor is compatible with specified attribute.
When
value_strings
attribute is specified inConstant_init
function, 3rd argument (dims
) ofonnx_tensor_reinit
is set by the following code.But I guess
attr->n_strings
should be used instead ofattr->n_ints
.I added the test case
node/test_constant_value_strings
to make surevalue_strings
attribute is handled properly. However, the test case passes even with original code becauseonnx_tensor_reinit
function won't be called when output tensor is compatible with specified attribute.