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

Function elect_one_sync

include/common.h:403–417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

401}
402
403DEVICE uint32_t elect_one_sync() {
404 uint32_t pred = 0;
405 uint32_t laneid = 0;
406 asm volatile(
407 "{\n"
408 ".reg .b32 %rx;\n"
409 ".reg .pred %px;\n"
410 " elect.sync %rx|%px, %2;\n"
411 "@%px mov.s32 %1, 1;\n"
412 " mov.s32 %0, %rx;\n"
413 "}\n"
414 : "+r"(laneid), "+r"(pred)
415 : "r"(0xFFFFFFFF));
416 return pred;
417}
418
419DEVICE uint32_t block_rank_in_cluster() {
420 uint32_t rank;

Callers 2

PipelineTmaAsyncClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected