diff options
| author | Mahesh Ravishankar <ravishankarm@google.com> | 2019-12-05 11:31:28 -0800 |
|---|---|---|
| committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-12-05 11:31:57 -0800 |
| commit | 4d61a79db46e1cab990444cbcb84467faff7f042 (patch) | |
| tree | 8e15f13bb127d3b2b8c8430e42fdc75f568d52a3 /mlir/test/Conversion | |
| parent | 037044b0ae4bc72f7c53db4f8435f7d163d2b68a (diff) | |
| download | bcm5719-llvm-4d61a79db46e1cab990444cbcb84467faff7f042.tar.gz bcm5719-llvm-4d61a79db46e1cab990444cbcb84467faff7f042.zip | |
Allow specification of the workgroup size for GPUToSPIRV lowering.
SPIR-V/Vulkan spec requires the workgroups size to be specified with
the spv.ExecutionMode operation. This was hard-wired to be set to a
particular value. It is now changed to be configurable by clients of
the pass or of the patterns that implement the lowering from GPU to
SPIRV.
PiperOrigin-RevId: 284017482
Diffstat (limited to 'mlir/test/Conversion')
| -rw-r--r-- | mlir/test/Conversion/GPUToSPIRV/simple.mlir | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mlir/test/Conversion/GPUToSPIRV/simple.mlir b/mlir/test/Conversion/GPUToSPIRV/simple.mlir index b0723c69bc6..ef136b9bb62 100644 --- a/mlir/test/Conversion/GPUToSPIRV/simple.mlir +++ b/mlir/test/Conversion/GPUToSPIRV/simple.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt -convert-gpu-to-spirv %s -o - | FileCheck %s +// RUN: mlir-opt -pass-pipeline='convert-gpu-to-spirv{workgroup-size=32,4}' %s -o - | FileCheck %s module attributes {gpu.container_module} { @@ -7,6 +7,7 @@ module attributes {gpu.container_module} { // CHECK-LABEL: func @kernel_1 // CHECK-SAME: {{%.*}}: f32 {spirv.interface_var_abi = {binding = 0 : i32, descriptor_set = 0 : i32, storage_class = 12 : i32{{[}][}]}} // CHECK-SAME: {{%.*}}: !spv.ptr<!spv.struct<!spv.array<12 x f32 [4]> [0]>, StorageBuffer> {spirv.interface_var_abi = {binding = 1 : i32, descriptor_set = 0 : i32, storage_class = 12 : i32{{[}][}]}} + // CHECK-SAME: spirv.entry_point_abi = {local_size = dense<[32, 4, 1]> : vector<3xi32>} func @kernel_1(%arg0 : f32, %arg1 : memref<12xf32>) attributes { gpu.kernel } { // CHECK: spv.Return |

