MCPcopy Create free account
hub / github.com/KnowingNothing/MatmulTutorial / if

Method if

include/pipeline.h:95–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93 int warp_idx = canonical_warp_idx();
94 int lane_predicate = elect_one_sync();
95 if (warp_idx == params.active_warps && lane_predicate == 1) {
96 // Barrier FULL init
97 for (int i = 0; i < Stages; ++i) {
98 full_barrier_ptr_[i].init(1);
99 }
100 uint32_t const num_consumer_warpgroups_per_cluster =
101 params_.num_consumers / WARP_GROUP_SIZE;
102 uint32_t const multicast_consumer_arrival_count =
103 (ClusterX_ + ClusterY_ - 1) * num_consumer_warpgroups_per_cluster;
104 // Barrier EMPTY init
105 for (int i = 0; i < Stages; ++i) {
106 empty_barrier_ptr_[i].init(multicast_consumer_arrival_count);
107 }
108 }
109 // Logic to optimally schedule Empty Arrives
110 // Goal : To divide SYNCS Empty Arrival duty equally amongst the Warp-Group
111 // (128 threads)

Callers

nothing calls this directly

Calls 1

initMethod · 0.45

Tested by

no test coverage detected