Skip to content

Commit 73ef4dd

Browse files
authored
[flang][cuda] Add missing semi-colon in inlined ptx (#166254)
This would trigger error in ptxas.
1 parent 6152999 commit 73ef4dd

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

flang/lib/Optimizer/Builder/IntrinsicCall.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9501,7 +9501,7 @@ void IntrinsicLibrary::genTMABulkS2G(llvm::ArrayRef<fir::ExtendedValue> args) {
95019501
builder, loc, dst, src, fir::getBase(args[2]), {}, {});
95029502

95039503
mlir::NVVM::InlinePtxOp::create(builder, loc, mlir::TypeRange{}, {}, {},
9504-
"cp.async.bulk.commit_group", {});
9504+
"cp.async.bulk.commit_group;", {});
95059505
mlir::NVVM::CpAsyncBulkWaitGroupOp::create(builder, loc,
95069506
builder.getI32IntegerAttr(0), {});
95079507
}
@@ -9517,7 +9517,7 @@ static void genTMABulkStore(fir::FirOpBuilder &builder, mlir::Location loc,
95179517
mlir::NVVM::CpAsyncBulkSharedCTAToGlobalOp::create(builder, loc, dst, src,
95189518
size, {}, {});
95199519
mlir::NVVM::InlinePtxOp::create(builder, loc, mlir::TypeRange{}, {}, {},
9520-
"cp.async.bulk.commit_group", {});
9520+
"cp.async.bulk.commit_group;", {});
95219521
mlir::NVVM::CpAsyncBulkWaitGroupOp::create(builder, loc,
95229522
builder.getI32IntegerAttr(0), {});
95239523
}

flang/test/Lower/CUDA/cuda-device-proc.cuf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ end subroutine
494494

495495
! CHECK-LABEL: func.func @_QPtest_bulk_s2g
496496
! CHECL: nvvm.cp.async.bulk.global.shared.cta %{{.*}}, %{{.*}}, %{{.*}} : <1>, <3>
497-
! CHECK: nvvm.inline_ptx "cp.async.bulk.commit_group"
497+
! CHECK: nvvm.inline_ptx "cp.async.bulk.commit_group;"
498498
! CHECK: nvvm.cp.async.bulk.wait_group 0
499499

500500
attributes(device) subroutine testAtomicCasLoop(aa, n)
@@ -675,7 +675,7 @@ end subroutine
675675

676676
! CHECK-LABEL: func.func @_QPtest_tma_bulk_store_c4
677677
! CHECK: nvvm.cp.async.bulk.global.shared.cta %{{.*}}, %{{.*}}, %{{.*}} : <1>, <3>
678-
! CHECK: nvvm.inline_ptx "cp.async.bulk.commit_group"
678+
! CHECK: nvvm.inline_ptx "cp.async.bulk.commit_group;"
679679
! CHECK: nvvm.cp.async.bulk.wait_group 0
680680

681681
attributes(global) subroutine test_tma_bulk_store_c8(c, n)
@@ -688,7 +688,7 @@ end subroutine
688688

689689
! CHECK-LABEL: func.func @_QPtest_tma_bulk_store_c8
690690
! CHECK: nvvm.cp.async.bulk.global.shared.cta %{{.*}}, %{{.*}}, %{{.*}} : <1>, <3>
691-
! CHECK: nvvm.inline_ptx "cp.async.bulk.commit_group"
691+
! CHECK: nvvm.inline_ptx "cp.async.bulk.commit_group;"
692692
! CHECK: nvvm.cp.async.bulk.wait_group 0
693693

694694
attributes(global) subroutine test_tma_bulk_store_i4(c, n)
@@ -701,7 +701,7 @@ end subroutine
701701

702702
! CHECK-LABEL: func.func @_QPtest_tma_bulk_store_i4
703703
! CHECK: nvvm.cp.async.bulk.global.shared.cta %{{.*}}, %{{.*}}, %{{.*}} : <1>, <3>
704-
! CHECK: nvvm.inline_ptx "cp.async.bulk.commit_group"
704+
! CHECK: nvvm.inline_ptx "cp.async.bulk.commit_group;"
705705
! CHECK: nvvm.cp.async.bulk.wait_group 0
706706

707707
attributes(global) subroutine test_tma_bulk_store_i8(c, n)
@@ -714,7 +714,7 @@ end subroutine
714714

715715
! CHECK-LABEL: func.func @_QPtest_tma_bulk_store_i8
716716
! CHECK: nvvm.cp.async.bulk.global.shared.cta %{{.*}}, %{{.*}}, %{{.*}} : <1>, <3>
717-
! CHECK: nvvm.inline_ptx "cp.async.bulk.commit_group"
717+
! CHECK: nvvm.inline_ptx "cp.async.bulk.commit_group;"
718718
! CHECK: nvvm.cp.async.bulk.wait_group 0
719719

720720

@@ -728,7 +728,7 @@ end subroutine
728728

729729
! CHECK-LABEL: func.func @_QPtest_tma_bulk_store_r2
730730
! CHECK: nvvm.cp.async.bulk.global.shared.cta %{{.*}}, %{{.*}}, %{{.*}} : <1>, <3>
731-
! CHECK: nvvm.inline_ptx "cp.async.bulk.commit_group"
731+
! CHECK: nvvm.inline_ptx "cp.async.bulk.commit_group;"
732732
! CHECK: nvvm.cp.async.bulk.wait_group 0
733733

734734
attributes(global) subroutine test_tma_bulk_store_r4(c, n)
@@ -741,7 +741,7 @@ end subroutine
741741

742742
! CHECK-LABEL: func.func @_QPtest_tma_bulk_store_r4
743743
! CHECK: nvvm.cp.async.bulk.global.shared.cta %{{.*}}, %{{.*}}, %{{.*}} : <1>, <3>
744-
! CHECK: nvvm.inline_ptx "cp.async.bulk.commit_group"
744+
! CHECK: nvvm.inline_ptx "cp.async.bulk.commit_group;"
745745
! CHECK: nvvm.cp.async.bulk.wait_group 0
746746

747747
attributes(global) subroutine test_tma_bulk_store_r8(c, n)
@@ -754,5 +754,5 @@ end subroutine
754754

755755
! CHECK-LABEL: func.func @_QPtest_tma_bulk_store_r8
756756
! CHECK: nvvm.cp.async.bulk.global.shared.cta %{{.*}}, %{{.*}}, %{{.*}} : <1>, <3>
757-
! CHECK: nvvm.inline_ptx "cp.async.bulk.commit_group"
757+
! CHECK: nvvm.inline_ptx "cp.async.bulk.commit_group;"
758758
! CHECK: nvvm.cp.async.bulk.wait_group 0

0 commit comments

Comments
 (0)