mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-24 19:43:35 +00:00
Change assert on a null value to an ort_enforce (#9982)
This commit is contained in:
parent
b9909f985e
commit
e0960d7d79
1 changed files with 1 additions and 1 deletions
|
|
@ -199,7 +199,7 @@ static void TestOptimizerGraphBuilderWithInitialStates(OptimizerGraphConfig conf
|
|||
const ONNX_NAMESPACE::TensorProto* tensor{};
|
||||
for (auto& weight_item : opt_initializer_names_map) {
|
||||
for (auto& opt_item : weight_item.second) {
|
||||
ASSERT_TRUE(graph.GetInitializedTensor(opt_item.second, tensor));
|
||||
ORT_ENFORCE(graph.GetInitializedTensor(opt_item.second, tensor));
|
||||
ASSERT_TRUE(tensor->data_type() == ONNX_NAMESPACE::TensorProto::FLOAT || tensor->data_type() == ONNX_NAMESPACE::TensorProto::INT64);
|
||||
if (tensor->data_type() == ONNX_NAMESPACE::TensorProto::FLOAT) {
|
||||
VerifyTensorValue(tensor, values[0]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue