diff --git a/sdk/load-and-run/src/mgblar.cpp b/sdk/load-and-run/src/mgblar.cpp index 96d8360127cb107234caa46851e4d72e1911cc75..19ec721ea3cb54f33b1da3734598e53be9e76cbf 100644 --- a/sdk/load-and-run/src/mgblar.cpp +++ b/sdk/load-and-run/src/mgblar.cpp @@ -807,13 +807,16 @@ void run_test_st(Args &env) { parser.feed(path); } auto inputs = parser.inputs; - for (auto& i : inputs) { - if (tensormap.find(i.first) == tensormap.end()) { - continue; - } + if (inputs.size() > 1) { + for (auto& i : inputs) { + mgb_assert(tensormap.find(i.first) != tensormap.end()); - auto& in = tensormap.find(i.first)->second; - in->copy_from(i.second); + auto& in = tensormap.find(i.first)->second; + in->copy_from(i.second); + } + } else { + auto& in = tensormap.begin()->second; + in->copy_from(inputs.begin()->second); } warmup();