MCPcopy Create free account
hub / github.com/apache/tvm-ffi / GetFunctionMetadata

Method GetFunctionMetadata

src/ffi/extra/library_module.cc:61–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59 }
60
61 Optional<String> GetFunctionMetadata(const String& name) final {
62 // Look for __tvm_ffi__metadata_<name> symbol
63 String metadata_symbol = symbol::tvm_ffi_metadata_prefix + name;
64 void* symbol = lib_->GetSymbol(metadata_symbol);
65 if (symbol != nullptr) {
66 using MetadataGetter = int (*)(void*, const TVMFFIAny*, int32_t, TVMFFIAny*);
67 auto metadata_getter = reinterpret_cast<MetadataGetter>(symbol);
68 return Function::InvokeExternC(nullptr, metadata_getter).cast<String>();
69 }
70 return std::nullopt;
71 }
72
73 Optional<String> GetFunctionDoc(const String& name) final {
74 // Look for __tvm_ffi__doc_<name> symbol

Callers

nothing calls this directly

Calls 1

GetSymbolMethod · 0.45

Tested by

no test coverage detected