43
43
44
44
#include " test_objgroup_common.h"
45
45
#include " test_helpers.h"
46
+ #include " vt/collective/reduce/allreduce/rabenseifner.h"
47
+ #include " vt/configs/types/types_type.h"
46
48
#include " vt/objgroup/manager.h"
47
49
48
50
#include < typeinfo>
@@ -266,7 +268,7 @@ TEST_F(TestObjGroup, test_proxy_allreduce) {
266
268
auto const my_node = vt::theContext ()->getNode ();
267
269
268
270
TestObjGroup::total_verify_expected_ = 0 ;
269
- auto proxy = vt::theObjGroup ()->makeCollective <MyObjA>(" test_proxy_reduce " );
271
+ auto proxy = vt::theObjGroup ()->makeCollective <MyObjA>(" test_proxy_allreduce " );
270
272
271
273
vt::theCollective ()->barrier ();
272
274
@@ -289,7 +291,7 @@ TEST_F(TestObjGroup, test_proxy_allreduce) {
289
291
EXPECT_EQ (MyObjA::total_verify_expected_, 3 );
290
292
runInEpochCollective ([&] {
291
293
using Reducer = vt::collective::reduce::allreduce::RecursiveDoubling<
292
- std::vector<int >, PlusOp, MyObjA, &MyObjA::verifyAllredVec
294
+ std::vector<int >, PlusOp, MyObjA, &MyObjA::verifyAllredVec< int , 256 >
293
295
>;
294
296
std::vector<int > payload (256 , my_node);
295
297
theObjGroup ()->allreduce <Reducer>(proxy, payload);
@@ -299,18 +301,20 @@ TEST_F(TestObjGroup, test_proxy_allreduce) {
299
301
300
302
runInEpochCollective ([&] {
301
303
using Reducer = vt::collective::reduce::allreduce::Rabenseifner<
302
- std::vector< int > , PlusOp, MyObjA, &MyObjA::verifyAllredVec
304
+ NodeType , PlusOp, MyObjA, &MyObjA::verifyAllred< 1 >
303
305
>;
304
- std::vector<int > payload (256 , my_node);
305
- theObjGroup ()->allreduce <Reducer>(proxy, payload);
306
- theObjGroup ()->allreduce <Reducer>(proxy, payload);
306
+ std::vector<int > payload (2048 , my_node);
307
+ theObjGroup ()->allreduce <Reducer>(proxy, my_node);
308
+
309
+ std::vector<short > payload_large (2048 * 2 , my_node);
310
+ theObjGroup ()->allreduce <Reducer>(proxy, my_node);
307
311
});
308
312
309
313
EXPECT_EQ (MyObjA::total_verify_expected_, 6 );
310
314
311
315
runInEpochCollective ([&] {
312
316
using Reducer = vt::collective::reduce::allreduce::Rabenseifner<
313
- VectorPayload, PlusOp, MyObjA, &MyObjA::verifyAllredVecPayload>;
317
+ VectorPayload, PlusOp, MyObjA, &MyObjA::verifyAllredVecPayload<VectorPayload, 256 > >;
314
318
std::vector<int > payload (256 , my_node);
315
319
VectorPayload data{payload};
316
320
theObjGroup ()->allreduce <Reducer>(proxy, data);
0 commit comments