MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / is_pinned

Method is_pinned

oneflow/core/framework/tensor_impl.cpp:144–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144Maybe<bool> EagerLocalTensorImpl::is_pinned() const {
145 if (this->device() == JUST(Device::New("meta"))) { return false; }
146 if (!eager_blob_object_) { return false; }
147 return IsStreamAllocatorPinned::Visit(JUST(eager_blob_object_->producer_stream())->stream_type());
148}
149
150Maybe<void> EagerLocalTensorImpl::set_eager_blob_object(
151 std::shared_ptr<vm::EagerBlobObject> eager_blob_object) {

Callers 8

cloneMethod · 0.45
loadMethod · 0.45
EvictAndFindPieceLoopMethod · 0.45
EvictAndFindPieceOnceMethod · 0.45
operator()Method · 0.45
PyTensorObject_is_pinnedFunction · 0.45
operator()Method · 0.45
operator()Method · 0.45

Calls 3

NewFunction · 0.70
deviceMethod · 0.45
stream_typeMethod · 0.45

Tested by

no test coverage detected