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

Method DeviceSimple

tensorflow/core/grappler/optimizers/evaluation_utils.cc:29–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27using TensorVector = gtl::InlinedVector<TensorValue, 4>;
28
29DeviceSimple::DeviceSimple() : DeviceBase(Env::Default()) {
30 eigen_worker_threads_.num_threads = port::MaxParallelism();
31 eigen_worker_threads_.workers = new thread::ThreadPool(
32 Env::Default(), "evaluation_utils", eigen_worker_threads_.num_threads);
33 eigen_device_.reset(new Eigen::ThreadPoolDevice(
34 eigen_worker_threads_.workers->AsEigenThreadPool(),
35 eigen_worker_threads_.num_threads));
36 set_tensorflow_cpu_worker_threads(&eigen_worker_threads_);
37 set_eigen_cpu_device(eigen_device_.get());
38}
39
40DeviceSimple::~DeviceSimple() {
41 eigen_device_.reset();

Callers

nothing calls this directly

Calls 6

DefaultFunction · 0.85
AsEigenThreadPoolMethod · 0.80
MaxParallelismFunction · 0.50
resetMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected