diff --git a/mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td b/mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td --- a/mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td +++ b/mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td @@ -101,13 +101,13 @@ "__ockl_get_local_size", 2>; def ROCDL_GridDimXOp : ROCDL_DeviceFunctionOp<"grid.dim.x", - "__ockl_get_global_size", 0>; + "__ockl_get_num_groups", 0>; def ROCDL_GridDimYOp : ROCDL_DeviceFunctionOp<"grid.dim.y", - "__ockl_get_global_size", 1>; + "__ockl_get_num_groups", 1>; def ROCDL_GridDimZOp : ROCDL_DeviceFunctionOp<"grid.dim.z", - "__ockl_get_global_size", 2>; + "__ockl_get_num_groups", 2>; //===----------------------------------------------------------------------===// // Synchronization primitives diff --git a/mlir/test/Target/LLVMIR/rocdl.mlir b/mlir/test/Target/LLVMIR/rocdl.mlir --- a/mlir/test/Target/LLVMIR/rocdl.mlir +++ b/mlir/test/Target/LLVMIR/rocdl.mlir @@ -20,11 +20,11 @@ %8 = rocdl.workgroup.dim.y : i64 // CHECK: call i64 @__ockl_get_local_size(i32 2) %9 = rocdl.workgroup.dim.z : i64 - // CHECK: call i64 @__ockl_get_global_size(i32 0) + // CHECK: call i64 @__ockl_get_num_groups(i32 0) %10 = rocdl.grid.dim.x : i64 - // CHECK: call i64 @__ockl_get_global_size(i32 1) + // CHECK: call i64 @__ockl_get_num_groups(i32 1) %11 = rocdl.grid.dim.y : i64 - // CHECK: call i64 @__ockl_get_global_size(i32 2) + // CHECK: call i64 @__ockl_get_num_groups(i32 2) %12 = rocdl.grid.dim.z : i64 // CHECK: call i32 @llvm.amdgcn.workitem.id.x(),{{.*}} !range ![[$RANGE:[0-9]+]]