| 22 | namespace test { |
| 23 | |
| 24 | TEST(ParallelConfUtil, MakeParallelConfSuccess) { |
| 25 | std::string device_tag = "cpu"; |
| 26 | std::vector<std::string> machine_device_ids; |
| 27 | machine_device_ids.emplace_back("0:0-3"); |
| 28 | machine_device_ids.emplace_back("1:0-3"); |
| 29 | auto parallel_conf = CHECK_JUST(MakeParallelConf(device_tag, machine_device_ids, nullptr)); |
| 30 | ASSERT_EQ(parallel_conf->device_tag(), "cpu"); |
| 31 | ASSERT_EQ(parallel_conf->device_name().size(), 2); |
| 32 | ASSERT_EQ(parallel_conf->has_hierarchy(), false); |
| 33 | } |
| 34 | |
| 35 | TEST(ParallelConfUtil, MakeParallelConfError) { |
| 36 | std::string device_tag = "cpu"; |
nothing calls this directly
no test coverage detected