MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / TEST

Function TEST

oneflow/core/framework/parallel_conf_util_test.cpp:24–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22namespace test {
23
24TEST(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
35TEST(ParallelConfUtil, MakeParallelConfError) {
36 std::string device_tag = "cpu";

Callers

nothing calls this directly

Calls 7

MakeParallelConfFunction · 0.85
dimMethod · 0.80
emplace_backMethod · 0.45
sizeMethod · 0.45
errorMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected