MCPcopy Create free account
hub / github.com/dmlc/xgboost / VerifyColumnSplitWithArgs

Function VerifyColumnSplitWithArgs

tests/cpp/test_learner.cc:729–741  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

727}
728
729void VerifyColumnSplitWithArgs(std::string const& tree_method, bool use_gpu, Args const& args,
730 Json const& expected_model) {
731 auto const world_size = collective::GetWorldSize();
732 auto const rank = collective::GetRank();
733 auto p_fmat = MakeFmatForObjTest("", 10, 10, 0);
734 std::shared_ptr<DMatrix> sliced{p_fmat->SliceCol(world_size, rank)};
735 std::string device = "cpu";
736 if (use_gpu) {
737 device = MakeCUDACtx(DistGpuIdx()).DeviceName();
738 }
739 auto model = GetModelWithArgs(sliced, tree_method, device, args);
740 ASSERT_EQ(model, expected_model);
741}
742
743void TestColumnSplitWithArgs(std::string const& tree_method, bool use_gpu, Args const& args,
744 bool federated) {

Callers 1

TestColumnSplitWithArgsFunction · 0.85

Calls 8

GetWorldSizeFunction · 0.85
GetRankFunction · 0.85
MakeFmatForObjTestFunction · 0.85
MakeCUDACtxFunction · 0.85
DistGpuIdxFunction · 0.85
GetModelWithArgsFunction · 0.85
DeviceNameMethod · 0.80
SliceColMethod · 0.45

Tested by

no test coverage detected