[Mlir-commits] [mlir] b22f111 - [mlir][gpu] NFC: Change gpu.launch_func ops to custom format.
Christian Sigg
llvmlistbot at llvm.org
Thu Oct 29 13:21:39 PDT 2020
Author: Christian Sigg
Date: 2020-10-29T21:21:30+01:00
New Revision: b22f111023ba2560d0e9f6b4c3a4aea7c568df1e
URL: https://github.com/llvm/llvm-project/commit/b22f111023ba2560d0e9f6b4c3a4aea7c568df1e
DIFF: https://github.com/llvm/llvm-project/commit/b22f111023ba2560d0e9f6b4c3a4aea7c568df1e.diff
LOG: [mlir][gpu] NFC: Change gpu.launch_func ops to custom format.
This should fix the reason for the failures after ec7780ebdab480139596c3cb08ee77d7035457b3. I will roll forward in a separate change.
Reviewed By: antiagainst
Differential Revision: https://reviews.llvm.org/D90410
Added:
Modified:
mlir/test/Conversion/SPIRVToLLVM/lower-host-to-llvm-calls.mlir
mlir/test/mlir-spirv-cpu-runner/double.mlir
mlir/test/mlir-spirv-cpu-runner/simple_add.mlir
Removed:
################################################################################
diff --git a/mlir/test/Conversion/SPIRVToLLVM/lower-host-to-llvm-calls.mlir b/mlir/test/Conversion/SPIRVToLLVM/lower-host-to-llvm-calls.mlir
index 176d860e9549..dd557d105e7b 100644
--- a/mlir/test/Conversion/SPIRVToLLVM/lower-host-to-llvm-calls.mlir
+++ b/mlir/test/Conversion/SPIRVToLLVM/lower-host-to-llvm-calls.mlir
@@ -40,9 +40,8 @@ module attributes {gpu.container_module, spv.target_env = #spv.target_env<#spv.v
func @main() {
%buffer = alloc() : memref<6xi32>
%one = constant 1 : index
- "gpu.launch_func"(%one, %one, %one,
- %one, %one, %one,
- %buffer) {kernel = @foo::@bar} : (index, index, index, index, index, index, memref<6xi32>) -> ()
+ gpu.launch_func @foo::@bar blocks in (%one, %one, %one)
+ threads in (%one, %one, %one) args(%buffer : memref<6xi32>)
return
}
}
diff --git a/mlir/test/mlir-spirv-cpu-runner/double.mlir b/mlir/test/mlir-spirv-cpu-runner/double.mlir
index 8251375edc4f..77a07b49292d 100644
--- a/mlir/test/mlir-spirv-cpu-runner/double.mlir
+++ b/mlir/test/mlir-spirv-cpu-runner/double.mlir
@@ -54,10 +54,9 @@ module attributes {
call @fillI32Buffer(%output_casted, %zero) : (memref<?xi32>, i32) -> ()
%one = constant 1 : index
- "gpu.launch_func"(%one, %one, %one,
- %one, %one, %one,
- %input, %output) { kernel = @kernels::@double }
- : (index, index, index, index, index, index, memref<6xi32>, memref<6xi32>) -> ()
+ gpu.launch_func @kernels::@double
+ blocks in (%one, %one, %one) threads in (%one, %one, %one)
+ args(%input : memref<6xi32>, %output : memref<6xi32>)
%result = memref_cast %output : memref<6xi32> to memref<*xi32>
call @print_memref_i32(%result) : (memref<*xi32>) -> ()
return
diff --git a/mlir/test/mlir-spirv-cpu-runner/simple_add.mlir b/mlir/test/mlir-spirv-cpu-runner/simple_add.mlir
index 476c459423d6..18b6390d6bb7 100644
--- a/mlir/test/mlir-spirv-cpu-runner/simple_add.mlir
+++ b/mlir/test/mlir-spirv-cpu-runner/simple_add.mlir
@@ -47,10 +47,9 @@ module attributes {
call @fillF32Buffer3D(%output_casted, %0) : (memref<?x?x?xf32>, f32) -> ()
%one = constant 1 : index
- "gpu.launch_func"(%one, %one, %one,
- %one, %one, %one,
- %input1, %input2, %output) { kernel = @kernels::@sum }
- : (index, index, index, index, index, index, memref<3xf32>, memref<3x3xf32>, memref<3x3x3xf32>) -> ()
+ gpu.launch_func @kernels::@sum
+ blocks in (%one, %one, %one) threads in (%one, %one, %one)
+ args(%input1 : memref<3xf32>, %input2 : memref<3x3xf32>, %output : memref<3x3x3xf32>)
%result = memref_cast %output : memref<3x3x3xf32> to memref<*xf32>
call @print_memref_f32(%result) : (memref<*xf32>) -> ()
return
More information about the Mlir-commits
mailing list