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

Method GetGlobalRequired

include/tvm/ffi/function.h:456–462  ·  view source on GitHub ↗

! * \brief Get global function by name and throw an error if it is not found. * \param name The name of the function * \return The global function * \note This function will throw an error if the function is not found. */

Source from the content-addressed store, hash-verified

454 * \note This function will throw an error if the function is not found.
455 */
456 static Function GetGlobalRequired(std::string_view name) {
457 std::optional<Function> res = GetGlobal(name);
458 if (!res.has_value()) {
459 TVM_FFI_THROW(ValueError) << "Function " << name << " not found";
460 }
461 return *res;
462 }
463
464 /*!
465 * \brief Get global function by name

Callers

nothing calls this directly

Calls 3

lengthMethod · 0.80
has_valueMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected