Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,7 @@ def NVVM_ReduxOp :
//===----------------------------------------------------------------------===//

def NVVM_NanosleepOp : NVVM_Op<"nanosleep">,
Arguments<(ins
ConfinedAttr<I32Attr, [IntMinValue<1>, IntMaxValue<1000000>]>:$duration)>
Arguments<(ins I32:$duration)>
{
let summary = "Suspends the thread for a specified duration.";

Expand All @@ -531,8 +530,7 @@ def NVVM_NanosleepOp : NVVM_Op<"nanosleep">,

string llvmBuilder = [{
createIntrinsicCall(builder,
llvm::Intrinsic::nvvm_nanosleep,
{builder.getInt32($duration)});
llvm::Intrinsic::nvvm_nanosleep, {$duration});
}];
let assemblyFormat = "attr-dict $duration";
}
Expand Down
8 changes: 0 additions & 8 deletions mlir/test/Target/LLVMIR/nvvmir-invalid.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -578,14 +578,6 @@ llvm.func @ld_matrix(%arg0: !llvm.ptr<3>) {

// -----

llvm.func @nanosleep() {
// expected-error@+1 {{integer constant out of range for attribute}}
nvvm.nanosleep 100000000000000
llvm.return
}

// -----

llvm.func @clusterlaunchcontrol_query_cancel_is_canceled_invalid_return_type(%try_cancel_response: i128) {
// expected-error@+1 {{'nvvm.clusterlaunchcontrol.query.cancel' op is_canceled query type returns an i1}}
%res = nvvm.clusterlaunchcontrol.query.cancel query = is_canceled, %try_cancel_response : i32
Expand Down
6 changes: 3 additions & 3 deletions mlir/test/Target/LLVMIR/nvvmir.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -970,8 +970,8 @@ llvm.func @nvvm_pmevent() {
// -----

// CHECK-LABEL: @nanosleep
llvm.func @nanosleep() {
// CHECK: call void @llvm.nvvm.nanosleep(i32 4000)
nvvm.nanosleep 4000
llvm.func @nanosleep(%duration: i32) {
// CHECK: call void @llvm.nvvm.nanosleep(i32 %{{.*}})
nvvm.nanosleep %duration
llvm.return
}