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

Function TVMFFIPyPushTempPyObject

python/tvm_ffi/cython/tvm_ffi_python_helpers.h:1016–1021  ·  view source on GitHub ↗

! * \brief Push a temporary Python object to the call context that will be recycled after the call * \param ctx The call context * \param arg The Python object to push */

Source from the content-addressed store, hash-verified

1014 * \param arg The Python object to push
1015 */
1016TVM_FFI_INLINE void TVMFFIPyPushTempPyObject(TVMFFIPyCallContext* ctx, PyObject* arg) noexcept {
1017 // invariance: each ArgSetter can have at most one temporary Python object
1018 // so it ensures that we won't overflow the temporary Python object stack
1019 Py_IncRef(arg);
1020 ctx->temp_py_objects[ctx->num_temp_py_objects++] = arg;
1021}
1022
1023/*!
1024 * \brief Push Extra temporary Python object to the call context that may go beyond one temp per

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected