| 27 | using TensorVector = gtl::InlinedVector<TensorValue, 4>; |
| 28 | |
| 29 | DeviceSimple::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 | |
| 40 | DeviceSimple::~DeviceSimple() { |
| 41 | eigen_device_.reset(); |
nothing calls this directly
no test coverage detected