MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / _external_obj

Method _external_obj

imperative/python/src/tensor.cpp:770–775  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

768}
769
770PyObject* TensorWrapper::_external_obj() {
771 TypedValueRef<PyobjectValue> value =
772 imperative::apply(GetExternalVal(), m_tensor->data())[0]
773 .as_ref<PyobjectValue>();
774 return value->object().release().ptr();
775}
776
777PyObject* TensorWrapper::_is_external_value() {
778 auto&& external_tsf =

Callers 3

__call__Method · 0.80
test_external_tsf_setFunction · 0.80
workerFunction · 0.80

Calls 6

GetExternalValClass · 0.85
applyFunction · 0.50
dataMethod · 0.45
ptrMethod · 0.45
releaseMethod · 0.45
objectMethod · 0.45

Tested by 2

test_external_tsf_setFunction · 0.64
workerFunction · 0.64