}
auto jit_op = findOperatorFor(opname);
- std::vector<c10::Argument> args;
+ const std::vector<c10::Argument>* pArgs = nullptr;
if (jit_op) {
fn = [jit_op](Stack& stack) { jit_op->getOperation()(stack); };
- args = jit_op->schema().arguments();
+ pArgs = &jit_op->schema().arguments();
} else {
auto op = c10::Dispatcher::singleton().findSchema(opname_c10);
if (op.has_value()) {
fn = [op](Stack& stack) { op->callBoxed(&stack); };
if (op->hasSchema()) {
- args = op->schema().arguments();
+ pArgs = &op->schema().arguments();
} else {
TORCH_CHECK(false, "arguments are missing for operator ", opname);
}
}
}
+ TORCH_INTERNAL_ASSERT_DEBUG_ONLY(pArgs);
+ const auto& args = *pArgs;
if (model_version == 0x3LL &&
opname == c10::OperatorName("aten::_convolution", "")) {
// Since byte-code versions 0x4L, convolution has an additional