diff --git a/src/Builder/FrontendDialectTransformer.cpp b/src/Builder/FrontendDialectTransformer.cpp index e21996910ae7..1eaef850a76f 100644 --- a/src/Builder/FrontendDialectTransformer.cpp +++ b/src/Builder/FrontendDialectTransformer.cpp @@ -448,16 +448,17 @@ class FrontendGenImpl { ++numInputs; } } + + for (const auto &internal : graph.value_info()) { + AddValueInfo(internal); + } + for (const auto &output : graph.output()) { // Output tensor may be in input list AddValueInfo(output, true); outputNames.push_back(output.name()); } - for (const auto &internal : graph.value_info()) { - AddValueInfo(internal); - } - entryBlock->addArguments(argTypes, llvm::SmallVector(argTypes.size(), UnknownLoc()));