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

Function GetTensorBufferPoolSize

oneflow/core/common/tensor_buffer.cpp:198–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196constexpr size_t kDefaultThreadLocalCacheSize = 64;
197
198size_t GetTensorBufferPoolSize(size_t base = kDefaultPoolSizeBase) {
199 static double factor =
200 ParseFloatFromEnv("ONEFLOW_TENSOR_BUFFER_POOL_SIZE_FACTOR", kDefaultPoolSizeFactor);
201 return static_cast<size_t>(std::ceil(base * factor));
202}
203
204size_t GetTensorBufferPoolThreadLocalCacheSize() {
205 static size_t cache_size = ParseIntegerFromEnv(

Callers 3

TensorBufferPoolMethod · 0.85

Calls 2

ParseFloatFromEnvFunction · 0.85
ceilFunction · 0.85

Tested by

no test coverage detected