Initialize the inter and intra-op thread pool pointers in ThreadPoolOptions to nullptr. Otherwise, they may have arbitrary values.

PiperOrigin-RevId: 294833933
Change-Id: I95ff98f6a7fe308c59f1c8bf7e1b25f4c68223dc
This commit is contained in:
Li Lao 2020-02-12 21:55:33 -08:00 committed by TensorFlower Gardener
parent 68b23d5123
commit 7cdd88eb94

View File

@ -23,10 +23,10 @@ namespace thread {
struct ThreadPoolOptions {
// If not null, use this threadpool to schedule inter-op operation
thread::ThreadPoolInterface* inter_op_threadpool;
thread::ThreadPoolInterface* inter_op_threadpool = nullptr;
// If not null, use this threadpool to schedule intra-op operation
thread::ThreadPoolInterface* intra_op_threadpool;
thread::ThreadPoolInterface* intra_op_threadpool = nullptr;
};
} // namespace thread