MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / SetDeviceMemorySize

Method SetDeviceMemorySize

tensorflow/compiler/xrt/xrt_state.cc:395–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

393}
394
395void XRTTupleAllocation::SetDeviceMemorySize() {
396 size_t size = 0;
397 for (auto& index_buffer : buffers_) {
398 if (index_buffer.second != nullptr) {
399 size += index_buffer.second->allocation().size();
400 }
401 }
402 device_memory_size_ = size;
403}
404
405/* static */ Status XRTTupleAllocation::ExpandTreeOfTuples(
406 const xla::ShapeTree<ExpandedTupleInput>& elements, int device_ordinal,

Callers 5

CreateAndTransferMethod · 0.80
CreateUninitializedMethod · 0.80
CreateFromBufferMethod · 0.80
MakeSubBufferMethod · 0.80
MakeTupleMethod · 0.80

Calls 2

sizeMethod · 0.45
allocationMethod · 0.45

Tested by

no test coverage detected