Skip to content

Commit b530b81

Browse files
committed
refine comments
1 parent a6cc8f3 commit b530b81

File tree

4 files changed

+6
-13
lines changed

4 files changed

+6
-13
lines changed

llvm/docs/NVPTXUsage.rst

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -575,12 +575,8 @@ prefetched in terms of bytes and it must be a multiple of 16.
575575

576576
* The last argument to these intrinsics is boolean flag indicating
577577
support for cache_hint. These flag argument must be compile-time
578-
constant. The backend looks through this flag and lowers the
579-
intrinsic appropriately.
580-
581-
* The Nth argument (denoted by ``i1 %flag_ch``) when set, indicates
582-
a valid cache_hint (``i64 %ch``) and generates the ``.L2::cache_hint``
583-
variant of the PTX instruction.
578+
constant. When set, indicates a valid cache_hint (``i64 %ch``)
579+
and generates the ``.L2::cache_hint`` variant of the PTX instruction.
584580

585581
For more information, refer PTX ISA
586582
`<https://docs.nvidia.com/cuda/parallel-thread-execution/#data-movement-and-conversion-instructions-cp-async-bulk-prefetch>`_.

llvm/include/llvm/IR/IntrinsicsNVVM.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5036,7 +5036,7 @@ def int_nvvm_cp_async_bulk_shared_cta_to_global
50365036
// Intrinsics for Bulk Copy Prefetch L2
50375037
def int_nvvm_cp_async_bulk_prefetch_L2
50385038
: DefaultAttrsIntrinsic<[],
5039-
[llvm_global_ptr_ty, // src_smem_ptr
5039+
[llvm_global_ptr_ty, // src_gmem_ptr
50405040
llvm_i32_ty, // copy_size
50415041
llvm_i64_ty, // cache_hint
50425042
llvm_i1_ty], // Flag for cache_hint

llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3115,11 +3115,8 @@ void NVPTXDAGToDAGISel::SelectCpAsyncBulkPrefetchL2(SDNode *N) {
31153115
size_t NumArgs = IsCacheHint ? 3 : 2; // src, size, cache_hint
31163116

31173117
SDLoc DL(N);
3118-
SmallVector<SDValue, 8> Ops(N->ops().slice(2, NumArgs));
3118+
SmallVector<SDValue, 4> Ops(N->ops().slice(2, NumArgs));
31193119
Ops.push_back(N->getOperand(0)); // Chain operand
3120-
//if (IsCacheHint) {
3121-
// Ops.push_back(N->getOperand(2));
3122-
//}
31233120

31243121
unsigned Opcode;
31253122
if (IsCacheHint)

llvm/lib/Target/NVPTX/NVPTXIntrinsics.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,12 +552,12 @@ defm CP_ASYNC_BULK_CTA_TO_CLUSTER_SHARED32 : CP_ASYNC_BULK_CTA_TO_CLUSTER<Int32R
552552
//------------------------------
553553
multiclass CP_ASYNC_BULK_PREFETCH_INTR {
554554
defvar prefetch = "cp.async.bulk.prefetch.L2.global";
555-
def "": NVPTXInst<(outs),
555+
def NAME: NVPTXInst<(outs),
556556
(ins Int64Regs:$src, Int32Regs:$size),
557557
!strconcat(prefetch," [$src], $size;"),
558558
[]>,
559559
Requires<[hasPTX<80>, hasSM<90>]>;
560-
def _CH: NVPTXInst<(outs),
560+
def NAME # _CH: NVPTXInst<(outs),
561561
(ins Int64Regs:$src, Int32Regs:$size, Int64Regs:$ch),
562562
!strconcat(prefetch,".L2::cache_hint [$src], $size, $ch;"),
563563
[]>,

0 commit comments

Comments
 (0)