Skip to content

Commit d5e6931

Browse files
committed
[MLIR][NVVM] Make links for PTX ISA documents
This works makes links more readable in NVVM dialect's tablegen file. Differential Revision: https://reviews.llvm.org/D158585
1 parent 7c540c0 commit d5e6931

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ def NVVM_SyncWarpOp :
514514
let assemblyFormat = "$mask attr-dict `:` type($mask)";
515515
}
516516

517-
// https://docs.nvidia.com/cuda/parallel-thread-execution/#id62
517+
518518
def LoadCacheModifierCA : I32EnumAttrCase<"CA", 0, "ca">;
519519
def LoadCacheModifierCG : I32EnumAttrCase<"CG", 1, "cg">;
520520
def LoadCacheModifierCS : I32EnumAttrCase<"CS", 2, "cs">;
@@ -528,6 +528,11 @@ def LoadCacheModifierKind : I32EnumAttr<"LoadCacheModifierKind",
528528
LoadCacheModifierLU, LoadCacheModifierCV]> {
529529
let genSpecializedAttr = 0;
530530
let cppNamespace = "::mlir::NVVM";
531+
let description = [{
532+
Enum attribute of the different kinds of cache operators for load instructions.
533+
534+
[For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#id62)
535+
}];
531536
}
532537

533538
def LoadCacheModifierAttr : EnumAttr<NVVM_Dialect, LoadCacheModifierKind, "load_cache_modifier">;
@@ -1436,8 +1441,8 @@ def NVVM_WgmmaFenceAlignedOp : NVVM_Op<"wgmma.fence.aligned",
14361441
let description = [{
14371442
Enforce an ordering of register accesses between warpgroup level matrix
14381443
multiplication and other operations.
1439-
See for more information:
1440-
https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#asynchronous-warpgroup-level-matrix-instructions-wgmma-fence
1444+
1445+
[For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#asynchronous-warpgroup-level-matrix-instructions-wgmma-fence)
14411446
}];
14421447
let assemblyFormat = "attr-dict";
14431448
let extraClassDefinition = [{
@@ -1451,8 +1456,8 @@ def NVVM_WgmmaGroupSyncAlignedOp : NVVM_Op<"wgmma.commit.group.sync.aligned",
14511456
let assemblyFormat = "attr-dict";
14521457
let description = [{
14531458
Commits all prior uncommitted warpgroup level matrix multiplication operations.
1454-
See for more information:
1455-
https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#asynchronous-warpgroup-level-matrix-instructions-wgmma-commit-group
1459+
1460+
[For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#asynchronous-warpgroup-level-matrix-instructions-wgmma-commit-group)
14561461
}];
14571462
let extraClassDefinition = [{
14581463
std::string $cppClass::getPtx() { return std::string("wgmma.commit_group.sync.aligned;"); }
@@ -1465,8 +1470,8 @@ def NVVM_WgmmaWaitGroupSyncOp : NVVM_Op<"wgmma.wait.group.sync.aligned",
14651470
let assemblyFormat = "attr-dict $group";
14661471
let description = [{
14671472
Signal the completion of a preceding warpgroup operation.
1468-
See for more information:
1469-
https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#asynchronous-warpgroup-level-matrix-instructions-wgmma-wait-group
1473+
1474+
[For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#asynchronous-warpgroup-level-matrix-instructions-wgmma-wait-group)
14701475
}];
14711476
let extraClassDefinition = [{
14721477
std::string $cppClass::getPtx() { return std::string("wgmma.wait_group.sync.aligned %0;"); }
@@ -1603,8 +1608,8 @@ def NVVM_WgmmaMmaAsyncOp : NVVM_Op<"wgmma.mma_async",
16031608
|--------------|--------------|------------|--------------|---------------|
16041609
```
16051610

1606-
See for more information:
1607-
https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#asynchronous-warpgroup-level-matrix-instructions
1611+
1612+
[For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#asynchronous-warpgroup-level-matrix-instructions)
16081613
}];
16091614

16101615
let hasVerifier = 1;

0 commit comments

Comments
 (0)