Setup the env to since ops such as MatchFileOp rely on it.
PiperOrigin-RevId: 158336344
This commit is contained in:
parent
2741561c8e
commit
187404eac0
@ -30,6 +30,7 @@ limitations under the License.
|
|||||||
#include "tensorflow/core/lib/gtl/inlined_vector.h"
|
#include "tensorflow/core/lib/gtl/inlined_vector.h"
|
||||||
#include "tensorflow/core/lib/strings/numbers.h"
|
#include "tensorflow/core/lib/strings/numbers.h"
|
||||||
#include "tensorflow/core/lib/strings/strcat.h"
|
#include "tensorflow/core/lib/strings/strcat.h"
|
||||||
|
#include "tensorflow/core/platform/env.h"
|
||||||
#include "tensorflow/core/public/version.h"
|
#include "tensorflow/core/public/version.h"
|
||||||
|
|
||||||
namespace tensorflow {
|
namespace tensorflow {
|
||||||
@ -53,7 +54,7 @@ class EigenThreadPoolWrapper : public Eigen::ThreadPoolInterface {
|
|||||||
|
|
||||||
class DeviceSimple : public DeviceBase {
|
class DeviceSimple : public DeviceBase {
|
||||||
public:
|
public:
|
||||||
DeviceSimple() : DeviceBase(nullptr) {
|
DeviceSimple() : DeviceBase(Env::Default()) {
|
||||||
eigen_worker_threads_.num_threads = 1;
|
eigen_worker_threads_.num_threads = 1;
|
||||||
eigen_worker_threads_.workers = new thread::ThreadPool(
|
eigen_worker_threads_.workers = new thread::ThreadPool(
|
||||||
Env::Default(), "constant_folding", eigen_worker_threads_.num_threads);
|
Env::Default(), "constant_folding", eigen_worker_threads_.num_threads);
|
||||||
|
Loading…
Reference in New Issue
Block a user