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

Method eigen_cpu_device

tensorflow/core/framework/device_base.cc:62–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62const Eigen::ThreadPoolDevice* DeviceBase::eigen_cpu_device() {
63 // Based on GetPerThreadMaxParallelism(), we return a different
64 // pre-allocated Eigen::ThreadPoolDevice. All these ThreadPoolDevice
65 // use the same underlying threadpool. But they use different
66 // nominal numThreads() hoping that the user of the returned
67 // Eigen::ThreadPoolDevice may not aggressively occupy all the
68 // threads in the underlying threadpool.
69 const int parallelism = std::max<int>(
70 1,
71 std::min<int>(GetPerThreadMaxParallelism(), eigen_cpu_devices_.size()));
72 return eigen_cpu_devices_[parallelism - 1];
73}
74
75namespace {
76

Callers 15

RunExecutableFunction · 0.45
RunMethod · 0.45
ComputeMethod · 0.45
OpKernelContextClass · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
MklDefaultToEigenMethod · 0.45
ComputeMethod · 0.45
ComputeMethod · 0.45
ComputeMethod · 0.45
ComputeMethod · 0.45
ComputeMethod · 0.45

Calls 2

sizeMethod · 0.45

Tested by 2

TESTFunction · 0.36
TESTFunction · 0.36