Skip to content

Commit 7173a7d

Browse files
authored
[NVPTX][NFC] Use NAME macro for TMA intrinsic defs (#117907)
This patch updates the TMA intrinsic definitions to use the "NAME" macro (inside the multiclass) instead of an empty string. Signed-off-by: Durgadoss R <[email protected]>
1 parent 60db321 commit 7173a7d

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

llvm/lib/Target/NVPTX/NVPTXIntrinsics.td

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -536,22 +536,22 @@ multiclass CP_ASYNC_BULK_TENSOR_G2S_INTR<int dim, bit is_shared32, string mode>
536536
defvar asm_str = !if(!eq(mode, "im2col"),
537537
!strconcat(asm_str_default, im2col_asm_str), asm_str_default);
538538

539-
def "": NVPTXInst<(outs),
540-
!con((ins rc:$dst, rc:$mbar, Int64Regs:$tmap), dims_dag, im2col_dag),
541-
!strconcat(G2S_STRINGS<dim, mode, 0, 0>.inst_name, asm_str, ";"), []>,
542-
Requires<[hasPTX<80>, hasSM<90>]>;
543-
def _MC: NVPTXInst<(outs),
544-
!con((ins rc:$dst, rc:$mbar, Int64Regs:$tmap), dims_dag, im2col_dag, (ins Int16Regs:$mc)),
545-
!strconcat(G2S_STRINGS<dim, mode, 1, 0>.inst_name, asm_str, ", $mc;"), []>,
546-
Requires<[hasPTX<80>, hasSM<90>]>;
547-
def _CH: NVPTXInst<(outs),
548-
!con((ins rc:$dst, rc:$mbar, Int64Regs:$tmap), dims_dag, im2col_dag, (ins Int64Regs:$ch)),
549-
!strconcat(G2S_STRINGS<dim, mode, 0, 1>.inst_name, asm_str, ", $ch;"), []>,
550-
Requires<[hasPTX<80>, hasSM<90>]>;
551-
def _MC_CH: NVPTXInst<(outs),
552-
!con((ins rc:$dst, rc:$mbar, Int64Regs:$tmap), dims_dag, im2col_dag, (ins Int16Regs:$mc, Int64Regs:$ch)),
553-
!strconcat(G2S_STRINGS<dim, mode, 1, 1>.inst_name, asm_str, ", $mc, $ch;"), []>,
554-
Requires<[hasPTX<80>, hasSM<90>]>;
539+
def NAME: NVPTXInst<(outs),
540+
!con((ins rc:$dst, rc:$mbar, Int64Regs:$tmap), dims_dag, im2col_dag),
541+
!strconcat(G2S_STRINGS<dim, mode, 0, 0>.inst_name, asm_str, ";"), []>,
542+
Requires<[hasPTX<80>, hasSM<90>]>;
543+
def NAME # _MC: NVPTXInst<(outs),
544+
!con((ins rc:$dst, rc:$mbar, Int64Regs:$tmap), dims_dag, im2col_dag, (ins Int16Regs:$mc)),
545+
!strconcat(G2S_STRINGS<dim, mode, 1, 0>.inst_name, asm_str, ", $mc;"), []>,
546+
Requires<[hasPTX<80>, hasSM<90>]>;
547+
def NAME # _CH: NVPTXInst<(outs),
548+
!con((ins rc:$dst, rc:$mbar, Int64Regs:$tmap), dims_dag, im2col_dag, (ins Int64Regs:$ch)),
549+
!strconcat(G2S_STRINGS<dim, mode, 0, 1>.inst_name, asm_str, ", $ch;"), []>,
550+
Requires<[hasPTX<80>, hasSM<90>]>;
551+
def NAME # _MC_CH: NVPTXInst<(outs),
552+
!con((ins rc:$dst, rc:$mbar, Int64Regs:$tmap), dims_dag, im2col_dag, (ins Int16Regs:$mc, Int64Regs:$ch)),
553+
!strconcat(G2S_STRINGS<dim, mode, 1, 1>.inst_name, asm_str, ", $mc, $ch;"), []>,
554+
Requires<[hasPTX<80>, hasSM<90>]>;
555555
}
556556

557557
foreach dim = [1, 2, 3, 4, 5] in {
@@ -588,14 +588,14 @@ multiclass CP_ASYNC_BULK_TENSOR_S2G_INTR<int dim, bit shared32, string mode> {
588588
defvar asm_str = " [$tmap, {{" # dims_str # "}}], [$src]";
589589
defvar rc = !if(shared32, Int32Regs, Int64Regs);
590590

591-
def "": NVPTXInst<(outs),
592-
!con((ins rc:$src, Int64Regs:$tmap), dims_dag),
593-
!strconcat(S2G_STRINGS<dim, mode, 0>.inst_name, asm_str, ";"), []>,
594-
Requires<[hasPTX<80>, hasSM<90>]>;
595-
def _CH: NVPTXInst<(outs),
596-
!con((ins rc:$src, Int64Regs:$tmap), dims_dag, (ins Int64Regs:$ch)),
597-
!strconcat(S2G_STRINGS<dim, mode, 1>.inst_name, asm_str, ", $ch;"), []>,
598-
Requires<[hasPTX<80>, hasSM<90>]>;
591+
def NAME: NVPTXInst<(outs),
592+
!con((ins rc:$src, Int64Regs:$tmap), dims_dag),
593+
!strconcat(S2G_STRINGS<dim, mode, 0>.inst_name, asm_str, ";"), []>,
594+
Requires<[hasPTX<80>, hasSM<90>]>;
595+
def NAME # _CH: NVPTXInst<(outs),
596+
!con((ins rc:$src, Int64Regs:$tmap), dims_dag, (ins Int64Regs:$ch)),
597+
!strconcat(S2G_STRINGS<dim, mode, 1>.inst_name, asm_str, ", $ch;"), []>,
598+
Requires<[hasPTX<80>, hasSM<90>]>;
599599
}
600600

601601
def TMAReductionFlags : Operand<i32> {
@@ -662,14 +662,14 @@ multiclass CP_ASYNC_BULK_TENSOR_PREFETCH_INTR<int dim, string mode> {
662662
defvar asm_str = !if(!eq(mode, "im2col"),
663663
!strconcat(asm_str_default, im2col_asm_str), asm_str_default);
664664

665-
def "": NVPTXInst<(outs),
666-
!con((ins Int64Regs:$tmap), dims_dag, im2col_dag),
667-
!strconcat(PREFETCH_STRINGS<dim, mode, 0>.inst_name, asm_str, ";"), []>,
668-
Requires<[hasPTX<80>, hasSM<90>]>;
669-
def _CH: NVPTXInst<(outs),
670-
!con((ins Int64Regs:$tmap), dims_dag, im2col_dag, (ins Int64Regs:$ch)),
671-
!strconcat(PREFETCH_STRINGS<dim, mode, 1>.inst_name, asm_str, ", $ch;"), []>,
672-
Requires<[hasPTX<80>, hasSM<90>]>;
665+
def NAME: NVPTXInst<(outs),
666+
!con((ins Int64Regs:$tmap), dims_dag, im2col_dag),
667+
!strconcat(PREFETCH_STRINGS<dim, mode, 0>.inst_name, asm_str, ";"), []>,
668+
Requires<[hasPTX<80>, hasSM<90>]>;
669+
def NAME # _CH: NVPTXInst<(outs),
670+
!con((ins Int64Regs:$tmap), dims_dag, im2col_dag, (ins Int64Regs:$ch)),
671+
!strconcat(PREFETCH_STRINGS<dim, mode, 1>.inst_name, asm_str, ", $ch;"), []>,
672+
Requires<[hasPTX<80>, hasSM<90>]>;
673673
}
674674

675675
foreach dim = [1, 2, 3, 4, 5] in {

0 commit comments

Comments
 (0)