mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-27 20:02:15 +00:00
throw exception using dmlc::LogMessageFatal (#2033)
* throw exception using dmlc::LogMessageFatal On windows, ORT_THROW couldn't be caught if the exception was thrown from a jitted functions. Let's call dmlc::LogMessageFatal instead. * address CR use LOG(FATAL)
This commit is contained in:
parent
19b0d0af87
commit
a94c9bd88d
1 changed files with 7 additions and 5 deletions
|
|
@ -37,8 +37,9 @@ void ScatterCommon(tvm::TVMArgs args, tvm::TVMRetValue* /*ret*/) {
|
|||
|
||||
for (int i = 0; i < num_dims; i++) {
|
||||
if (indices->shape[i] != updates->shape[i]) {
|
||||
ORT_THROW("Indices vs updates dimensions differs at position=", i,
|
||||
" ", indices->shape[i], " vs ", updates->shape[i]);
|
||||
LOG(FATAL) <<
|
||||
"Indices vs updates dimensions differs at position=" <<
|
||||
i << " " << indices->shape[i] << " vs " << updates->shape[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -53,9 +54,10 @@ void ScatterCommon(tvm::TVMArgs args, tvm::TVMRetValue* /*ret*/) {
|
|||
if (idx >= -axis_size && idx < axis_size) {
|
||||
indices_data_vec[i] = idx >= 0 ? idx : idx + static_cast<Tind>(axis_size);
|
||||
} else {
|
||||
ORT_THROW("indices element out of data bounds, idx=", idx,
|
||||
" must be within the inclusive range [", -axis_size,
|
||||
",", axis_size - 1, "]");
|
||||
LOG(FATAL) <<
|
||||
"indices element out of data bounds, idx=" << idx <<
|
||||
" must be within the inclusive range [" << -axis_size <<
|
||||
"," << axis_size - 1 << "]";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue