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

Method set_eigen_cpu_device

tensorflow/core/framework/device_base.cc:44–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44void DeviceBase::set_eigen_cpu_device(Eigen::ThreadPoolDevice* d) {
45 // Eigen::ThreadPoolDevice is a very cheap struct (two pointers and
46 // an int). Therefore, we can afford a pre-allocated array of
47 // Eigen::ThreadPoolDevice. Here, we ensure that
48 // Eigen::ThreadPoolDevices in eigen_cpu_devices_ has increasingly
49 // larger numThreads.
50 for (int i = 1; i <= d->numThreads(); ++i) {
51 eigen_cpu_devices_.push_back(new Eigen::ThreadPoolDevice(
52 d->getPool(), i /* numThreads() */, d->allocator()));
53 }
54}
55
56void DeviceBase::set_tensorflow_gpu_device_info(GpuDeviceInfo* g) {
57 VLOG(1) << "GpuDeviceInfo is SET ";

Callers 9

TESTFunction · 0.80
BM_BiasGradFloatFunction · 0.80
BM_BiasGradHalfFunction · 0.80
BM_LRNFloatFunction · 0.80
BM_AvgPoolFunction · 0.80
BM_AvgPoolBkFunction · 0.80
BM_MaxPoolFunction · 0.80
BM_ReluFloatFunction · 0.80
BM_SoftplusFloatFunction · 0.80

Calls 4

numThreadsMethod · 0.80
getPoolMethod · 0.80
push_backMethod · 0.45
allocatorMethod · 0.45

Tested by 9

TESTFunction · 0.64
BM_BiasGradFloatFunction · 0.64
BM_BiasGradHalfFunction · 0.64
BM_LRNFloatFunction · 0.64
BM_AvgPoolFunction · 0.64
BM_AvgPoolBkFunction · 0.64
BM_MaxPoolFunction · 0.64
BM_ReluFloatFunction · 0.64
BM_SoftplusFloatFunction · 0.64