File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
include/mlir/Dialect/LLVMIR
test/Conversion/NVVMToLLVM Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -471,6 +471,22 @@ def NVVM_SetMaxRegisterOp : NVVM_PTXBuilder_Op<"setmaxregister"> {
471
471
let hasVerifier = 1;
472
472
}
473
473
474
+ def NVVM_FenceMbarrierInitOp : NVVM_PTXBuilder_Op<"fence.mbarrier.init"> {
475
+ let arguments = (ins );
476
+ let description = [{
477
+ Fence operation that applies on the prior nvvm.mbarrier.init
478
+ [For more information, see PTX ISA]
479
+ (https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-membar)
480
+ }];
481
+
482
+ let assemblyFormat = "attr-dict";
483
+ let extraClassDefinition = [{
484
+ std::string $cppClass::getPtx() {
485
+ return std::string("fence.mbarrier_init.release.cluster;");
486
+ }
487
+ }];
488
+ }
489
+
474
490
def ShflKindBfly : I32EnumAttrCase<"bfly", 0>;
475
491
def ShflKindUp : I32EnumAttrCase<"up", 1>;
476
492
def ShflKindDown : I32EnumAttrCase<"down", 2>;
Original file line number Diff line number Diff line change @@ -642,6 +642,15 @@ func.func @cp_bulk_commit() {
642
642
nvvm.cp.async.bulk.commit.group
643
643
func.return
644
644
}
645
+
646
+
647
+ // -----
648
+
649
+ func.func @fence_mbarrier_init () {
650
+ //CHECK: llvm.inline_asm has_side_effects asm_dialect = att "fence.mbarrier_init.release.cluster;"
651
+ nvvm.fence.mbarrier.init
652
+ func.return
653
+ }
645
654
// -----
646
655
647
656
func.func @fence_proxy () {
You can’t perform that action at this time.
0 commit comments