Skip to content

Commit f812f76

Browse files
JacobSzwejbkafacebook-github-bot
authored andcommitted
Dont require method loading for meta meta in module api
Summary: Program load is still required but this is very cheap. Method load is not needed. Differential Revision: D76278890
1 parent 611092d commit f812f76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extension/module/module.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ runtime::Error Module::load_method(
229229

230230
runtime::Result<MethodMeta> Module::method_meta(
231231
const std::string& method_name) {
232-
ET_CHECK_OK_OR_RETURN_ERROR(load_method(method_name));
233-
return methods_.at(method_name).method->method_meta();
232+
ET_CHECK_OK_OR_RETURN_ERROR(load());
233+
return program_->method_meta(method_name.c_str());
234234
}
235235

236236
runtime::Result<std::vector<runtime::EValue>> Module::execute(

0 commit comments

Comments
 (0)