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

Method SetGlobal

include/tvm/ffi/function.h:499–505  ·  view source on GitHub ↗

! * \brief Set global function by name * \param name The name of the function * \param func The function * \param override Whether to override when there is duplication. */

Source from the content-addressed store, hash-verified

497 * \param override Whether to override when there is duplication.
498 */
499 static void SetGlobal(std::string_view name,
500 Function func, // NOLINT(performance-unnecessary-value-param)
501 bool override = false) {
502 TVMFFIByteArray name_arr{name.data(), name.size()};
503 TVM_FFI_CHECK_SAFE_CALL(
504 TVMFFIFunctionSetGlobal(&name_arr, details::ObjectUnsafe::GetHeader(func.get()), override));
505 }
506 /*!
507 * \brief List all global names
508 * \return A vector of all global names

Callers

nothing calls this directly

Calls 4

TVMFFIFunctionSetGlobalFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected