Skip to content

Commit

Permalink
[Runtime] Fix Can't "query_imports" Bug of VM Executable (#14656)
Browse files Browse the repository at this point in the history
This "LOG(FATAL)" will error out when the function isn't found in “executable”, so it will prevent the recursive query the function in the imported modules of "executable".

For example, if the module hierarchy is something like below.
executable
|---LLVMModuleNode
|___NPUModuleNode

This bug will cause we can't get the function in NPUModuleNode by the call "executalbe.get_function("npu_func1", query_imports=True)".

From Arm China.
  • Loading branch information
Johnson9009 authored Apr 20, 2023
1 parent 34342ba commit 7c97c4e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/runtime/vm/executable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,8 @@ PackedFunc Executable::GetFunction(const std::string& name, const ObjectPtr<Obje
Map<String, NDArray> map = args[0];
LoadLateBoundConstantsFromMap(map);
});
} else {
LOG(FATAL) << "Unknown packed function: " << name;
}
return nullptr;
}

const VMFunction& Executable::GetVMFunctionWithName(const std::string& func_name) const {
Expand Down

0 comments on commit 7c97c4e

Please sign in to comment.