Skip to content

Commit cb1d9f5

Browse files
committed
Clarify comments
1 parent 6e24d02 commit cb1d9f5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

third_party/intel/lib/TritonIntelGPUToLLVM/ConvertLayoutOpToLLVM.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,9 @@ struct ConvertLayoutOpUsingLinearLayoutsConversion
448448

449449
// Return a vector such as:
450450
// [[0, 1], [0, 2], [0, 4], ..., [0, laneSize / 2], [laneSize, 0], ...,
451-
// [registerSize / 2, 0]]
451+
// [registerSize / 2, 0]],
452+
// i.e., mapping registers to lanes till laneSize and performing an ID
453+
// conversion afterwards.
452454
static std::vector<std::vector<int32_t>>
453455
buildSubGroupTransposeRegisterBases(int32_t registerSize, int32_t laneSize) {
454456
std::vector<std::vector<int32_t>> bases;
@@ -468,6 +470,8 @@ struct ConvertLayoutOpUsingLinearLayoutsConversion
468470
// Return a vector such as:
469471
// [[0, 1], [0, 2], [0, 4], ..., [0, laneSize / 2], [1, 0], ...,
470472
// [registerSize / (2 * laneSize), 0]]
473+
// i.e., mapping registers to lanes till laneSize and repeating the pattern
474+
// afterwards.
471475
static std::vector<std::vector<int32_t>>
472476
buildSubGroupShuffleRegisterBases(int32_t registerSize, int32_t laneSize) {
473477
std::vector<std::vector<int32_t>> bases;
@@ -485,7 +489,8 @@ struct ConvertLayoutOpUsingLinearLayoutsConversion
485489
}
486490

487491
// Return a vector such as:
488-
// [[1, 0], [2, 0], [4, 0], ..., [laneSize / 2, 0]]
492+
// [[1, 0], [2, 0], [4, 0], ..., [laneSize / 2, 0]],
493+
// i.e., mapping lanes to registers.
489494
static std::vector<std::vector<int32_t>>
490495
buildSubGroupTransposeLaneBases(int32_t laneSize) {
491496
std::vector<std::vector<int32_t>> bases;

0 commit comments

Comments
 (0)