| 27 | |
| 28 | #if defined(_OPENMP) && !defined(ENABLE_DNNL_THREADPOOL) |
| 29 | TEST(MKLThreadPoolDeviceTest, TestOmpDefaults) { |
| 30 | SessionOptions options; |
| 31 | unsetenv("OMP_NUM_THREADS"); |
| 32 | |
| 33 | ThreadPoolDevice* tp = new ThreadPoolDevice( |
| 34 | options, "/device:CPU:0", Bytes(256), DeviceLocality(), cpu_allocator()); |
| 35 | |
| 36 | const int ht = port::NumHyperthreadsPerCore(); |
| 37 | EXPECT_EQ(omp_get_max_threads(), (port::NumSchedulableCPUs() + ht - 1) / ht); |
| 38 | } |
| 39 | |
| 40 | TEST(MKLThreadPoolDeviceTest, TestOmpPreSets) { |
| 41 | SessionOptions options; |
nothing calls this directly
no test coverage detected