diff --git a/include/gc/Transforms/Passes.h b/include/gc/Transforms/Passes.h index 805c63da4..a9b73d687 100644 --- a/include/gc/Transforms/Passes.h +++ b/include/gc/Transforms/Passes.h @@ -115,6 +115,10 @@ std::unique_ptr createMergeAllocPass(); void populateFrontendPasses(mlir::OpPassManager &); void populateCPUPipeline(mlir::OpPassManager &); +#ifdef GC_USE_IMEX +void populateGPUPipeline(mlir::OpPassManager &); +#endif + #define GEN_PASS_DECL #include "gc/Transforms/Passes.h.inc" diff --git a/lib/gc/Transforms/GPU/CMakeLists.txt b/lib/gc/Transforms/GPU/CMakeLists.txt index 18a7434e2..13f9c2981 100644 --- a/lib/gc/Transforms/GPU/CMakeLists.txt +++ b/lib/gc/Transforms/GPU/CMakeLists.txt @@ -1,5 +1,6 @@ gc_add_mlir_library(GcGpuPasses LinalgToXeGPU.cpp + Pipeline.cpp DEPENDS GraphCompilerPassIncGen @@ -18,3 +19,7 @@ gc_add_mlir_library(GcGpuPasses GcUtilsIR ) +include(imex) +get_property(IMEX_INCLUDES GLOBAL PROPERTY IMEX_INCLUDES) +target_include_directories(GcGpuPasses PRIVATE ${IMEX_INCLUDES}) + diff --git a/lib/gc/Transforms/GPU/LinalgToXeGPU.cpp b/lib/gc/Transforms/GPU/LinalgToXeGPU.cpp index 8309e106c..c6162cc1d 100644 --- a/lib/gc/Transforms/GPU/LinalgToXeGPU.cpp +++ b/lib/gc/Transforms/GPU/LinalgToXeGPU.cpp @@ -1405,6 +1405,17 @@ LogicalResult createMemoryFillKernel(linalg::LinalgOp linalgOp, auto outputType = cast(output.getType()); auto outputShape = outputType.getShape(); + if (outputShape.size() != 2) { + return rewriter.notifyMatchFailure( + linalgOp, "Memory fill operation expects 2D output"); + } + + // Otherwise 'xegpu-to-vc' pass will fail to convert it to VC + if (outputShape[0] * outputShape[1] < 16) { + return rewriter.notifyMatchFailure( + linalgOp, "Memory fill operation is to small to be converted to xegpu"); + } + // Extract SIMD sized sub-tiles int maxSizeSIMD = 256; int64_t subTileCols = outputShape[1]; diff --git a/lib/gc/Transforms/GPU/Pipeline.cpp b/lib/gc/Transforms/GPU/Pipeline.cpp new file mode 100644 index 000000000..061c115b8 --- /dev/null +++ b/lib/gc/Transforms/GPU/Pipeline.cpp @@ -0,0 +1,120 @@ +//===- Pipeline.cpp - Graph Compiler GPU pipeline ---------------*- C++ -*-===// +// +// This file is licensed under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "mlir/Conversion/Passes.h" +#include "mlir/Dialect/Arith/Transforms/Passes.h" +#include "mlir/Dialect/Bufferization/Transforms/OneShotAnalysis.h" +#include "mlir/Dialect/Bufferization/Transforms/Passes.h" +#include "mlir/Dialect/LLVMIR/LLVMDialect.h" +#include "mlir/Dialect/LLVMIR/Transforms/Passes.h" +#include "mlir/Dialect/Linalg/Passes.h" +#include "mlir/Dialect/Math/Transforms/Passes.h" +#include "mlir/Dialect/MemRef/IR/MemRef.h" +#include "mlir/Dialect/MemRef/Transforms/Passes.h" +#include "mlir/Dialect/SCF/IR/SCF.h" +#include "mlir/Dialect/Tensor/IR/Tensor.h" +#include "mlir/IR/DialectRegistry.h" +#include "mlir/InitAllPasses.h" +#include "mlir/Pass/PassManager.h" +#include "mlir/Support/LogicalResult.h" +#include "mlir/Transforms/Passes.h" +#include + +#include "mlir/Dialect/GPU/IR/GPUDialect.h" +#include "mlir/Dialect/GPU/Transforms/Passes.h" +#include "mlir/Dialect/SPIRV/Transforms/Passes.h" + +#include +#include + +#include + +#include "gc/Transforms/Passes.h" + +namespace mlir::gc { + +void populateGPUPipeline(mlir::OpPassManager &pm) { + pm.addNestedPass(createIterativeTilingAndFusion()); + + pm.addPass(bufferization::createEmptyTensorEliminationPass()); + pm.addPass(bufferization::createEmptyTensorToAllocTensorPass()); + + bufferization::OneShotBufferizationOptions options; + options.bufferizeFunctionBoundaries = true; + options.setFunctionBoundaryTypeConversion( + bufferization::LayoutMapOption::IdentityLayoutMap); + pm.addPass(bufferization::createOneShotBufferizePass(options)); + + pm.addPass(bufferization::createDropEquivalentBufferResultsPass()); + pm.addNestedPass( + bufferization::createFinalizingBufferizePass()); + pm.addPass(createCanonicalizerPass()); + pm.addPass(createCSEPass()); + pm.addPass(bufferization::createDropEquivalentBufferResultsPass()); + pm.addPass(memref::createExpandReallocPass()); + pm.addPass(createCanonicalizerPass()); + pm.addPass(bufferization::createOwnershipBasedBufferDeallocationPass()); + pm.addPass(createCanonicalizerPass()); + pm.addPass(bufferization::createBufferDeallocationSimplificationPass()); + pm.addPass(bufferization::createLowerDeallocationsPass()); + pm.addPass(createCSEPass()); + pm.addPass(createCanonicalizerPass()); + pm.addPass(createBufferizationToMemRefPass()); + + pm.addNestedPass(createForallToParallelLoopPass()); + pm.addNestedPass(createLinalgToXeGPU( + {/*kTile=*/16, /*stages=*/1, /*dpasTiles=*/{8, 16, 16}})); + + pm.addNestedPass(createConvertLinalgToLoopsPass()); + pm.addPass(xegpu::createXeGPUFoldAliasOps()); + pm.addPass(memref::createFoldMemRefAliasOpsPass()); + pm.addNestedPass(createGpuMapParallelLoopsPass()); + pm.addNestedPass(createParallelLoopToGpuPass()); + + pm.addNestedPass(imex::createInsertGPUAllocsPass("opencl")); + pm.addPass(createGpuKernelOutliningPass()); + pm.addPass(createCanonicalizerPass()); + pm.addPass(imex::createSetSPIRVCapabilitiesPass()); + pm.addNestedPass( + imex::createSetSPIRVAbiAttributePass("opencl")); + pm.addPass(createLowerAffinePass()); + pm.addPass(imex::createVectorLinearizePass()); + pm.addNestedPass(imex::createConvertXeGPUToVCPass()); + pm.addPass(createReconcileUnrealizedCastsPass()); + pm.addPass(imex::createBF16ToGPUPass()); + pm.addNestedPass(createConvertFuncToSPIRVPass()); + pm.addNestedPass(createConvertVectorToSPIRVPass()); + pm.addPass(imex::createConvertGPUXToSPIRVPass()); + pm.addNestedPass(spirv::createSPIRVLowerABIAttributesPass()); + pm.addNestedPass(spirv::createSPIRVUpdateVCEPass()); + pm.addNestedPass(LLVM::createRequestCWrappersPass()); + pm.addPass(imex::createSerializeSPIRVPass()); + pm.addPass(createConvertVectorToSCFPass()); + pm.addPass(imex::createConvertGPUToGPUXPass()); + pm.addPass(createConvertSCFToCFPass()); + pm.addPass(createConvertControlFlowToLLVMPass()); + pm.addPass(createConvertVectorToLLVMPass()); + pm.addPass(createConvertIndexToLLVMPass()); + pm.addPass(createArithToLLVMConversionPass()); + pm.addPass(createConvertFuncToLLVMPass()); + pm.addPass(createConvertMathToLLVMPass()); + pm.addPass(imex::createConvertGPUXToLLVMPass()); + pm.addPass(createConvertIndexToLLVMPass()); + pm.addPass(memref::createExpandStridedMetadataPass()); + pm.addPass(createLowerAffinePass()); + pm.addPass(createFinalizeMemRefToLLVMConversionPass()); + pm.addPass(createReconcileUnrealizedCastsPass()); +} + +void registerGPUPipeline() { + PassPipelineRegistration<>("gc-gpu-pipeline", + "The GPU pipeline for Graph Compiler with IMEX", + populateGPUPipeline); +} + +} // namespace mlir::gc diff --git a/src/gc-opt/gc-opt.cpp b/src/gc-opt/gc-opt.cpp index 89bacbdd8..8844ce22f 100644 --- a/src/gc-opt/gc-opt.cpp +++ b/src/gc-opt/gc-opt.cpp @@ -36,6 +36,9 @@ namespace mlir::gc { void registerCPUPipeline(); +#ifdef GC_USE_IMEX +void registerGPUPipeline(); +#endif } // namespace mlir::gc int main(int argc, char *argv[]) { @@ -47,6 +50,7 @@ int main(int argc, char *argv[]) { imex::registerConvertGPUXToSPIRV(); imex::registerConvertXeGPUToVC(); imex::registerConvertXeTileToXeGPU(); + mlir::gc::registerGPUPipeline(); #endif mlir::registerAllPasses(); mlir::gc::registerCPUPipeline(); diff --git a/test/mlir/test/gc/gpu-runner/XeGPU/f16_matmul_32x32.mlir b/test/mlir/test/gc/gpu-runner/XeGPU/f16_matmul_32x32.mlir deleted file mode 100644 index e91a1e7ca..000000000 --- a/test/mlir/test/gc/gpu-runner/XeGPU/f16_matmul_32x32.mlir +++ /dev/null @@ -1,97 +0,0 @@ -// RUN: gc-opt %s --pass-pipeline='builtin.module(func.func(iterative-tiling-and-fusion{use-cost-model=0 default-tile-size=matmul:{16,16}}),eliminate-empty-tensors,empty-tensor-to-alloc-tensor,one-shot-bufferize{bufferize-function-boundaries=1 function-boundary-type-conversion=identity-layout-map},drop-equivalent-buffer-results,func.func(finalizing-bufferize),canonicalize,cse,drop-equivalent-buffer-results,expand-realloc,canonicalize,ownership-based-buffer-deallocation,canonicalize,buffer-deallocation-simplification,bufferization-lower-deallocations,cse,canonicalize,convert-bufferization-to-memref,func.func(scf-forall-to-parallel),func.func(linalg-to-xegpu{stages=1 dpas-tile=8,16,16 k-tile=16}),xegpu-fold-alias-ops,func.func(convert-linalg-to-parallel-loops),func.func(gpu-map-parallel-loops),func.func(convert-parallel-loops-to-gpu),func.func(insert-gpu-allocs),gpu-kernel-outlining,canonicalize,set-spirv-capabilities{client-api=opencl},gpu.module(set-spirv-abi-attrs{client-api=opencl}),lower-affine,imex-vector-linearize,gpu.module(convert-xegpu-to-vc),reconcile-unrealized-casts,bf16-to-gpu,gpu.module(convert-func-to-spirv),gpu.module(convert-vector-to-spirv),imex-convert-gpu-to-spirv,spirv.module(spirv-lower-abi-attrs,spirv-update-vce),func.func(llvm-request-c-wrappers),serialize-spirv,convert-vector-to-scf,convert-gpu-to-gpux,convert-scf-to-cf,convert-cf-to-llvm,convert-vector-to-llvm,convert-index-to-llvm,convert-arith-to-llvm,convert-func-to-llvm,convert-math-to-llvm,convert-gpux-to-llvm,convert-index-to-llvm,expand-strided-metadata,lower-affine,finalize-memref-to-llvm,reconcile-unrealized-casts)' \ -// RUN: | gc-cpu-runner -e main --entry-point-result=void \ -// RUN: --shared-libs=%mlir_runner_utils,%mlir_c_runner_utils,%opencl_runtime | FileCheck %s -module{ - -func.func @linalg_matmul(%arg0: tensor<32x32xf16>, - %arg1: tensor<32x32xf16>, - %arg2: tensor<32x32xf16>) -> tensor<32x32xf16> { - %0 = linalg.matmul ins(%arg0, %arg1 : tensor<32x32xf16>, tensor<32x32xf16>) - outs(%arg2 : tensor<32x32xf16>) -> tensor<32x32xf16> - return %0 : tensor<32x32xf16> -} - -func.func @generate_t(%min : f16, %max : f16) -> tensor<32x32xf16> { - %c32 = arith.constant 32.0 : f16 - %c1023 = arith.constant 1023.0 : f16 - %tmp = arith.subf %max, %min : f16 - %step = arith.divf %tmp, %c1023 : f16 - - // Generate the values - // for i in range(n): - // for j in range(n): - // index = i * n + j - // value = min_value + index * step - %0 = tensor.generate { - ^bb0(%i : index, %j : index): - %cst32 = arith.constant 32.0 : f16 - %int0 = arith.index_cast %i : index to i16 - %int1 = arith.index_cast %j : index to i16 - %fp1 = arith.uitofp %int0 : i16 to f16 - %fp2 = arith.uitofp %int1 : i16 to f16 - - %tmp1 = arith.mulf %fp1, %cst32 : f16 - %res = arith.addf %tmp1, %fp2 : f16 - - %tmp2 = arith.mulf %res, %step : f16 - %val = arith.addf %min, %tmp2 : f16 - tensor.yield %val : f16 - } : tensor<32x32xf16> - return %0 : tensor<32x32xf16> -} - -func.func @main() { - %a0 = arith.constant 0.0 : f16 - %b0 = arith.constant 256.0 : f16 - %0 = call @generate_t(%a0, %b0) : (f16, f16) -> tensor<32x32xf16> - - %a1 = arith.constant 0.0 : f16 - %b1 = arith.constant 10.0 : f16 - %1 = call @generate_t(%a1, %b1) : (f16, f16) -> tensor<32x32xf16> - - %2 = arith.constant dense<0.0> : tensor<32x32xf16> - %gpu_res = call @linalg_matmul(%0, %1, %2) : (tensor<32x32xf16>, tensor<32x32xf16>, tensor<32x32xf16>) -> tensor<32x32xf16> - - %cast = tensor.cast %gpu_res : tensor<32x32xf16> to tensor<*xf16> - call @printMemrefF16(%cast) : (tensor<*xf16>) -> () - return -} - -func.func private @printMemrefF16(%ptr : tensor<*xf16>) -} - -// CHECK: Unranked Memref base@{{(0x)?[-0-9a-fA-F]*}} -// CHECK-SAME: rank = 2 offset = 0 sizes = [32, 32] strides = [32, 1] data = -// Computed using numpy: -// CHECK-NEXT: [815, 816.5, 817.5, 819, 820, 821.5, 822.5, 824, 825, 826, 827, 828.5, 830, 831, 832, 833.5, 834.5, 836, 837, 838.5, 839.5, 840.5, 841.5, 843.5, 844.5, 845.5, 846.5, 848, 849, 850.5, 851.5, 853], -// CHECK-NEXT: [2058, 2062, 2064, 2068, 2072, 2076, 2080, 2084, 2088, 2090, 2094, 2098, 2102, 2106, 2110, 2114, 2116, 2120, 2124, 2128, 2132, 2136, 2138, 2144, 2146, 2150, 2154, 2158, 2162, 2166, 2168, 2172], -// CHECK-NEXT: [3298, 3304, 3310, 3318, 3324, 3330, 3336, 3342, 3348, 3354, 3360, 3368, 3374, 3380, 3386, 3392, 3398, 3404, 3410, 3418, 3424, 3430, 3434, 3442, 3448, 3454, 3460, 3468, 3472, 3478, 3484, 3492], -// CHECK-NEXT: [4544, 4552, 4560, 4568, 4576, 4584, 4592, 4604, 4612, 4620, 4628, 4640, 4648, 4656, 4664, 4672, 4680, 4692, 4700, 4708, 4716, 4724, 4732, 4744, 4752, 4760, 4768, 4780, 4788, 4796, 4804, 4812], -// CHECK-NEXT: [5784, 5796, 5804, 5816, 5828, 5840, 5848, 5864, 5872, 5884, 5896, 5908, 5916, 5928, 5940, 5952, 5964, 5972, 5984, 5996, 6008, 6020, 6028, 6044, 6052, 6064, 6072, 6088, 6096, 6108, 6120, 6132], -// CHECK-NEXT: [7024, 7036, 7052, 7068, 7080, 7092, 7104, 7120, 7136, 7148, 7160, 7176, 7188, 7204, 7216, 7232, 7244, 7256, 7272, 7284, 7300, 7312, 7324, 7340, 7352, 7368, 7380, 7396, 7408, 7420, 7436, 7452], -// CHECK-NEXT: [8272, 8288, 8304, 8320, 8336, 8352, 8368, 8384, 8400, 8416, 8432, 8448, 8464, 8480, 8496, 8512, 8528, 8544, 8560, 8576, 8592, 8608, 8624, 8648, 8656, 8672, 8688, 8712, 8728, 8744, 8752, 8776], -// CHECK-NEXT: [9512, 9528, 9544, 9568, 9584, 9608, 9624, 9640, 9664, 9680, 9696, 9720, 9736, 9752, 9768, 9792, 9808, 9832, 9848, 9872, 9888, 9904, 9920, 9944, 9960, 9976, 10000, 10016, 10032, 10056, 10072, 10096], -// CHECK-NEXT: [10752, 10776, 10792, 10816, 10840, 10856, 10880, 10904, 10920, 10944, 10960, 10984, 11008, 11024, 11048, 11072, 11088, 11112, 11136, 11160, 11176, 11200, 11216, 11240, 11264, 11280, 11304, 11328, 11344, 11368, 11384, 11408], -// CHECK-NEXT: [11992, 12016, 12040, 12064, 12088, 12112, 12136, 12160, 12184, 12208, 12232, 12256, 12280, 12304, 12320, 12352, 12376, 12400, 12416, 12448, 12464, 12488, 12512, 12544, 12560, 12584, 12608, 12632, 12656, 12680, 12704, 12728], -// CHECK-NEXT: [13232, 13256, 13288, 13312, 13336, 13368, 13392, 13416, 13440, 13472, 13496, 13528, 13552, 13576, 13600, 13632, 13656, 13680, 13704, 13736, 13760, 13784, 13808, 13840, 13864, 13888, 13912, 13944, 13968, 13992, 14016, 14048], -// CHECK-NEXT: [14472, 14504, 14528, 14560, 14592, 14616, 14648, 14680, 14704, 14736, 14760, 14792, 14816, 14848, 14872, 14904, 14936, 14960, 14992, 15024, 15048, 15080, 15104, 15136, 15168, 15192, 15216, 15256, 15280, 15304, 15336, 15368], -// CHECK-NEXT: [15728, 15760, 15784, 15824, 15848, 15880, 15912, 15944, 15976, 16008, 16032, 16072, 16104, 16128, 16160, 16200, 16224, 16256, 16288, 16320, 16352, 16384, 16416, 16448, 16480, 16512, 16528, 16576, 16608, 16624, 16656, 16704], -// CHECK-NEXT: [16960, 16992, 17024, 17072, 17104, 17136, 17168, 17200, 17232, 17264, 17296, 17344, 17376, 17408, 17440, 17472, 17504, 17536, 17568, 17616, 17648, 17680, 17712, 17744, 17776, 17808, 17840, 17888, 17904, 17952, 17984, 18016], -// CHECK-NEXT: [18208, 18240, 18272, 18320, 18352, 18384, 18416, 18464, 18496, 18528, 18560, 18608, 18640, 18672, 18720, 18752, 18784, 18816, 18864, 18896, 18928, 18976, 19008, 19040, 19072, 19120, 19152, 19184, 19216, 19264, 19296, 19328], -// CHECK-NEXT: [19456, 19488, 19520, 19568, 19600, 19648, 19680, 19728, 19760, 19792, 19840, 19872, 19920, 19952, 19984, 20032, 20064, 20112, 20144, 20192, 20224, 20256, 20304, 20336, 20384, 20416, 20448, 20496, 20528, 20576, 20608, 20656], -// CHECK-NEXT: [20688, 20736, 20768, 20816, 20848, 20896, 20928, 20976, 21024, 21056, 21104, 21152, 21184, 21232, 21264, 21312, 21344, 21392, 21424, 21472, 21520, 21552, 21600, 21648, 21680, 21728, 21760, 21808, 21840, 21888, 21920, 21968], -// CHECK-NEXT: [21936, 21968, 22016, 22064, 22112, 22144, 22192, 22240, 22288, 22320, 22368, 22416, 22448, 22496, 22544, 22592, 22624, 22672, 22720, 22768, 22800, 22848, 22896, 22944, 22976, 23024, 23072, 23120, 23152, 23200, 23232, 23296], -// CHECK-NEXT: [23168, 23216, 23264, 23312, 23360, 23408, 23440, 23504, 23536, 23584, 23632, 23680, 23728, 23776, 23808, 23872, 23904, 23952, 24000, 24048, 24096, 24144, 24192, 24240, 24288, 24320, 24368, 24416, 24464, 24512, 24560, 24608], -// CHECK-NEXT: [24416, 24464, 24512, 24560, 24608, 24656, 24704, 24752, 24800, 24848, 24896, 24944, 24992, 25040, 25088, 25152, 25200, 25248, 25280, 25344, 25392, 25440, 25488, 25536, 25584, 25632, 25680, 25728, 25776, 25824, 25872, 25920], -// CHECK-NEXT: [25648, 25712, 25760, 25808, 25856, 25904, 25952, 26016, 26064, 26112, 26160, 26224, 26272, 26320, 26368, 26432, 26480, 26528, 26576, 26624, 26672, 26736, 26784, 26832, 26880, 26928, 26976, 27040, 27088, 27136, 27184, 27248], -// CHECK-NEXT: [26896, 26944, 26992, 27056, 27104, 27168, 27216, 27280, 27328, 27376, 27424, 27488, 27536, 27600, 27648, 27712, 27760, 27808, 27856, 27920, 27968, 28016, 28080, 28128, 28192, 28240, 28288, 28352, 28400, 28448, 28496, 28560], -// CHECK-NEXT: [28128, 28192, 28240, 28304, 28368, 28416, 28464, 28528, 28592, 28640, 28688, 28752, 28816, 28864, 28912, 28976, 29040, 29088, 29152, 29216, 29264, 29312, 29376, 29440, 29488, 29536, 29600, 29664, 29712, 29760, 29824, 29888], -// CHECK-NEXT: [29376, 29440, 29488, 29552, 29616, 29664, 29728, 29792, 29840, 29904, 29952, 30032, 30080, 30144, 30192, 30256, 30320, 30368, 30432, 30496, 30544, 30608, 30672, 30736, 30784, 30848, 30896, 30960, 31024, 31072, 31136, 31200], -// CHECK-NEXT: [30640, 30704, 30752, 30832, 30880, 30944, 31008, 31072, 31120, 31184, 31248, 31312, 31376, 31440, 31488, 31568, 31616, 31680, 31728, 31808, 31856, 31920, 31984, 32048, 32112, 32176, 32224, 32288, 32352, 32416, 32464, 32544], -// CHECK-NEXT: [31872, 31936, 32000, 32080, 32128, 32192, 32256, 32336, 32384, 32448, 32512, 32576, 32640, 32704, 32768, 32832, 32896, 32960, 33024, 33088, 33152, 33216, 33280, 33344, 33408, 33472, 33536, 33600, 33664, 33728, 33792, 33856], -// CHECK-NEXT: [33120, 33184, 33248, 33312, 33376, 33440, 33504, 33600, 33664, 33728, 33792, 33856, 33920, 33984, 34048, 34112, 34176, 34240, 34304, 34368, 34432, 34496, 34560, 34656, 34720, 34784, 34848, 34912, 34976, 35040, 35104, 35168], -// CHECK-NEXT: [34368, 34432, 34496, 34560, 34624, 34688, 34752, 34848, 34912, 34976, 35040, 35136, 35200, 35264, 35328, 35392, 35456, 35520, 35584, 35680, 35744, 35808, 35872, 35936, 36000, 36064, 36128, 36224, 36288, 36352, 36416, 36512], -// CHECK-NEXT: [35616, 35680, 35744, 35808, 35872, 35968, 36032, 36096, 36160, 36256, 36320, 36384, 36448, 36512, 36608, 36672, 36736, 36800, 36864, 36960, 37024, 37088, 37152, 37248, 37312, 37376, 37440, 37536, 37600, 37664, 37728, 37824], -// CHECK-NEXT: [36832, 36928, 36992, 37056, 37152, 37216, 37280, 37376, 37440, 37504, 37568, 37664, 37728, 37792, 37856, 37952, 38016, 38080, 38176, 38240, 38304, 38400, 38464, 38560, 38624, 38688, 38752, 38848, 38912, 38976, 39040, 39136], -// CHECK-NEXT: [38080, 38144, 38240, 38304, 38400, 38464, 38528, 38624, 38688, 38784, 38848, 38912, 39008, 39072, 39136, 39232, 39296, 39392, 39456, 39552, 39616, 39680, 39744, 39840, 39904, 40000, 40064, 40160, 40224, 40288, 40352, 40448], -// CHECK-NEXT: [39328, 39392, 39488, 39552, 39648, 39712, 39776, 39872, 39968, 40032, 40096, 40192, 40256, 40352, 40416, 40512, 40576, 40672, 40736, 40832, 40896, 40992, 41056, 41152, 41216, 41280, 41376, 41472, 41536, 41600, 41696, 41760] diff --git a/test/mlir/test/gc/gpu-runner/XeGPU/f16_matmul_64x64.mlir b/test/mlir/test/gc/gpu-runner/XeGPU/f16_matmul_64x64.mlir new file mode 100644 index 000000000..bc43065e3 --- /dev/null +++ b/test/mlir/test/gc/gpu-runner/XeGPU/f16_matmul_64x64.mlir @@ -0,0 +1,129 @@ +// RUN: gc-opt %s --gc-gpu-pipeline \ +// RUN: | gc-cpu-runner -e main --entry-point-result=void \ +// RUN: --shared-libs=%mlir_runner_utils,%mlir_c_runner_utils,%opencl_runtime | FileCheck %s +module{ + +func.func @linalg_matmul(%arg0: tensor<64x64xf16>, + %arg1: tensor<64x64xf16>, + %arg2: tensor<64x64xf16>) -> tensor<64x64xf16> { + %0 = linalg.matmul ins(%arg0, %arg1 : tensor<64x64xf16>, tensor<64x64xf16>) + outs(%arg2 : tensor<64x64xf16>) -> tensor<64x64xf16> + return %0 : tensor<64x64xf16> +} + +func.func @generate_t(%min : f16, %max : f16) -> tensor<64x64xf16> { + %c32 = arith.constant 32.0 : f16 + %c1023 = arith.constant 1023.0 : f16 + %tmp = arith.subf %max, %min : f16 + %step = arith.divf %tmp, %c1023 : f16 + + // Generate the values + // for i in range(n): + // for j in range(n): + // index = i * n + j + // value = min_value + index * step + %0 = tensor.generate { + ^bb0(%i : index, %j : index): + %cst64 = arith.constant 64.0 : f16 + %int0 = arith.index_cast %i : index to i16 + %int1 = arith.index_cast %j : index to i16 + %fp1 = arith.uitofp %int0 : i16 to f16 + %fp2 = arith.uitofp %int1 : i16 to f16 + + %tmp1 = arith.mulf %fp1, %cst64 : f16 + %res = arith.addf %tmp1, %fp2 : f16 + + %tmp2 = arith.mulf %res, %step : f16 + %val = arith.addf %min, %tmp2 : f16 + tensor.yield %val : f16 + } : tensor<64x64xf16> + return %0 : tensor<64x64xf16> +} + +func.func @main() { + %a0 = arith.constant 0.0 : f16 + %b0 = arith.constant 12.0 : f16 + %0 = call @generate_t(%a0, %b0) : (f16, f16) -> tensor<64x64xf16> + + %a1 = arith.constant 0.0 : f16 + %b1 = arith.constant 10.0 : f16 + %1 = call @generate_t(%a1, %b1) : (f16, f16) -> tensor<64x64xf16> + + %2 = arith.constant dense<0.0> : tensor<64x64xf16> + %gpu_res = call @linalg_matmul(%0, %1, %2) : (tensor<64x64xf16>, tensor<64x64xf16>, tensor<64x64xf16>) -> tensor<64x64xf16> + + %cast = tensor.cast %gpu_res : tensor<64x64xf16> to tensor<*xf16> + call @printMemrefF16(%cast) : (tensor<*xf16>) -> () + return +} + +func.func private @printMemrefF16(%ptr : tensor<*xf16>) +} + +// CHECK: Unranked Memref base@{{(0x)?[-0-9a-fA-F]*}} +// CHECK-SAME: rank = 2 offset = 0 sizes = [64, 64] strides = [64, 1] data = +// Computed using numpy: +// CHECK-NEXT: [626.5, 626.5, 627, 627.5, 627.5, 627.5, 628, 628, 628, 628, 628.5, 629.5, 629.5, 629.5, 629.5, 630, 630, 630, 630.5, 631, 631, 631, 631.5, 632, 632, 632, 632.5, 633, 633, 633, 633.5, 634, 634, 634, 634.5, 634.5, 634.5, 635, 635.5, 635.5, 635.5, 635.5, 636, 636.5, 636.5, 637, 637, 637.5, 637.5, 637.5, 638, 638.5, 638.5, 638.5, 639, 639, 639, 639.5, 640, 640.5, 640.5, 640.5, 640.5, 641], +// CHECK-NEXT: [1574, 1574, 1575, 1576, 1576, 1577, 1578, 1579, 1579, 1579, 1581, 1582, 1582, 1582, 1583, 1584, 1585, 1585, 1586, 1587, 1587, 1588, 1589, 1590, 1590, 1590, 1592, 1593, 1593, 1594, 1594, 1596, 1596, 1596, 1597, 1598, 1599, 1599, 1600, 1601, 1601, 1602, 1603, 1604, 1605, 1605, 1606, 1607, 1607, 1607, 1609, 1610, 1610, 1610, 1611, 1612, 1612, 1613, 1614, 1616, 1616, 1616, 1617, 1618], +// CHECK-NEXT: [2520, 2520, 2522, 2524, 2524, 2524, 2526, 2528, 2528, 2530, 2532, 2534, 2534, 2534, 2536, 2538, 2538, 2540, 2540, 2542, 2544, 2544, 2546, 2546, 2548, 2548, 2550, 2552, 2552, 2554, 2554, 2556, 2558, 2558, 2560, 2562, 2562, 2562, 2564, 2566, 2566, 2566, 2568, 2572, 2572, 2572, 2574, 2576, 2576, 2576, 2578, 2580, 2580, 2582, 2584, 2584, 2584, 2586, 2588, 2590, 2590, 2590, 2592, 2594], +// CHECK-NEXT: [3468, 3468, 3472, 3474, 3474, 3476, 3478, 3480, 3480, 3482, 3484, 3488, 3488, 3488, 3490, 3494, 3494, 3494, 3498, 3500, 3500, 3502, 3504, 3506, 3506, 3508, 3510, 3514, 3514, 3514, 3516, 3520, 3520, 3522, 3524, 3526, 3526, 3528, 3530, 3532, 3532, 3534, 3536, 3540, 3540, 3542, 3542, 3546, 3546, 3548, 3550, 3552, 3552, 3554, 3556, 3558, 3558, 3560, 3562, 3566, 3566, 3568, 3570, 3572], +// CHECK-NEXT: [4412, 4416, 4416, 4420, 4420, 4424, 4428, 4428, 4428, 4432, 4436, 4440, 4440, 4440, 4444, 4448, 4448, 4448, 4452, 4456, 4456, 4456, 4460, 4464, 4464, 4464, 4468, 4472, 4472, 4476, 4476, 4480, 4480, 4484, 4484, 4488, 4488, 4492, 4496, 4496, 4496, 4500, 4504, 4508, 4508, 4508, 4512, 4512, 4516, 4516, 4520, 4524, 4524, 4524, 4528, 4528, 4532, 4532, 4536, 4540, 4540, 4540, 4544, 4548], +// CHECK-NEXT: [5360, 5360, 5364, 5368, 5368, 5372, 5376, 5376, 5380, 5380, 5384, 5392, 5392, 5392, 5396, 5400, 5400, 5404, 5408, 5408, 5412, 5412, 5416, 5420, 5420, 5420, 5428, 5432, 5432, 5432, 5436, 5440, 5440, 5444, 5448, 5452, 5452, 5452, 5456, 5460, 5460, 5464, 5468, 5472, 5472, 5476, 5476, 5480, 5484, 5484, 5488, 5492, 5492, 5496, 5500, 5500, 5504, 5504, 5508, 5512, 5516, 5516, 5520, 5524], +// CHECK-NEXT: [6308, 6312, 6316, 6320, 6320, 6324, 6328, 6332, 6332, 6336, 6340, 6348, 6348, 6348, 6352, 6356, 6360, 6360, 6364, 6368, 6372, 6372, 6376, 6380, 6384, 6384, 6388, 6396, 6396, 6396, 6400, 6404, 6408, 6408, 6412, 6420, 6420, 6420, 6428, 6428, 6432, 6432, 6436, 6444, 6444, 6448, 6448, 6456, 6456, 6456, 6464, 6468, 6468, 6468, 6476, 6480, 6480, 6480, 6488, 6492, 6492, 6496, 6500, 6504], +// CHECK-NEXT: [7256, 7256, 7264, 7268, 7268, 7272, 7276, 7280, 7284, 7284, 7292, 7296, 7300, 7300, 7304, 7312, 7312, 7312, 7320, 7324, 7324, 7328, 7332, 7336, 7340, 7340, 7348, 7352, 7356, 7356, 7360, 7368, 7368, 7368, 7376, 7380, 7384, 7384, 7392, 7392, 7396, 7396, 7404, 7412, 7412, 7412, 7416, 7424, 7424, 7428, 7432, 7436, 7440, 7440, 7448, 7448, 7452, 7452, 7460, 7468, 7468, 7468, 7472, 7480], +// CHECK-NEXT: [8200, 8200, 8208, 8216, 8216, 8216, 8224, 8232, 8232, 8232, 8240, 8248, 8248, 8256, 8256, 8264, 8264, 8264, 8272, 8280, 8280, 8280, 8288, 8296, 8296, 8296, 8304, 8312, 8312, 8320, 8320, 8328, 8328, 8328, 8336, 8344, 8344, 8344, 8352, 8360, 8360, 8360, 8368, 8376, 8376, 8384, 8384, 8392, 8392, 8392, 8400, 8408, 8408, 8408, 8416, 8424, 8424, 8424, 8432, 8440, 8440, 8440, 8448, 8456], +// CHECK-NEXT: [9144, 9152, 9160, 9160, 9168, 9168, 9176, 9176, 9184, 9184, 9192, 9200, 9200, 9208, 9208, 9216, 9216, 9224, 9224, 9232, 9232, 9240, 9248, 9248, 9256, 9256, 9264, 9272, 9272, 9272, 9280, 9288, 9288, 9288, 9296, 9304, 9304, 9312, 9320, 9320, 9320, 9328, 9336, 9344, 9344, 9344, 9352, 9360, 9360, 9360, 9368, 9376, 9376, 9384, 9392, 9392, 9392, 9400, 9408, 9416, 9416, 9416, 9424, 9432], +// CHECK-NEXT: [10096, 10096, 10104, 10112, 10112, 10120, 10128, 10128, 10136, 10136, 10144, 10152, 10160, 10160, 10168, 10176, 10176, 10176, 10184, 10192, 10192, 10200, 10208, 10208, 10216, 10216, 10224, 10232, 10232, 10240, 10240, 10248, 10256, 10256, 10264, 10272, 10272, 10280, 10288, 10288, 10288, 10296, 10304, 10312, 10312, 10320, 10320, 10328, 10336, 10336, 10344, 10352, 10352, 10352, 10360, 10368, 10368, 10376, 10384, 10392, 10392, 10392, 10400, 10408], +// CHECK-NEXT: [11040, 11040, 11056, 11064, 11064, 11064, 11072, 11080, 11080, 11088, 11096, 11104, 11104, 11112, 11112, 11128, 11128, 11128, 11136, 11144, 11152, 11152, 11160, 11168, 11168, 11168, 11184, 11192, 11192, 11200, 11200, 11208, 11216, 11216, 11224, 11232, 11232, 11240, 11248, 11256, 11256, 11256, 11264, 11280, 11280, 11280, 11288, 11296, 11304, 11304, 11312, 11320, 11320, 11328, 11336, 11336, 11344, 11344, 11352, 11368, 11368, 11368, 11376, 11384], +// CHECK-NEXT: [11992, 11992, 12008, 12016, 12016, 12016, 12024, 12032, 12040, 12040, 12048, 12064, 12064, 12064, 12072, 12080, 12088, 12088, 12096, 12104, 12112, 12112, 12120, 12128, 12128, 12136, 12144, 12152, 12160, 12160, 12168, 12176, 12176, 12184, 12192, 12200, 12200, 12208, 12216, 12224, 12224, 12224, 12240, 12248, 12248, 12256, 12264, 12272, 12272, 12280, 12288, 12296, 12296, 12296, 12312, 12312, 12320, 12320, 12328, 12344, 12344, 12352, 12352, 12368], +// CHECK-NEXT: [12936, 12944, 12952, 12960, 12960, 12968, 12976, 12984, 12984, 12992, 13000, 13016, 13016, 13016, 13024, 13032, 13040, 13040, 13048, 13064, 13064, 13064, 13080, 13088, 13088, 13088, 13104, 13112, 13120, 13120, 13128, 13136, 13144, 13144, 13152, 13160, 13168, 13168, 13176, 13184, 13192, 13192, 13200, 13216, 13216, 13224, 13224, 13240, 13240, 13248, 13256, 13264, 13264, 13272, 13280, 13288, 13288, 13296, 13304, 13320, 13320, 13320, 13328, 13336], +// CHECK-NEXT: [13880, 13888, 13896, 13904, 13912, 13912, 13928, 13936, 13936, 13936, 13952, 13968, 13968, 13968, 13976, 13992, 13992, 13992, 14008, 14016, 14016, 14024, 14032, 14040, 14048, 14048, 14056, 14072, 14072, 14080, 14088, 14096, 14104, 14104, 14112, 14128, 14128, 14128, 14144, 14152, 14152, 14160, 14168, 14184, 14184, 14192, 14192, 14208, 14208, 14216, 14224, 14232, 14240, 14240, 14248, 14256, 14264, 14264, 14280, 14288, 14296, 14296, 14304, 14312], +// CHECK-NEXT: [14832, 14832, 14848, 14856, 14856, 14864, 14872, 14880, 14888, 14888, 14904, 14912, 14920, 14920, 14928, 14944, 14944, 14952, 14960, 14968, 14976, 14976, 14992, 15000, 15000, 15008, 15016, 15032, 15032, 15040, 15048, 15056, 15064, 15064, 15080, 15088, 15088, 15096, 15104, 15112, 15120, 15120, 15136, 15152, 15152, 15152, 15160, 15176, 15176, 15184, 15192, 15200, 15208, 15208, 15224, 15232, 15232, 15240, 15248, 15264, 15264, 15272, 15280, 15288], +// CHECK-NEXT: [15776, 15784, 15792, 15808, 15808, 15816, 15824, 15832, 15840, 15840, 15856, 15872, 15872, 15880, 15888, 15896, 15904, 15904, 15920, 15928, 15936, 15936, 15952, 15960, 15960, 15968, 15984, 15992, 16000, 16000, 16008, 16024, 16024, 16032, 16040, 16056, 16056, 16064, 16072, 16080, 16088, 16088, 16104, 16120, 16120, 16128, 16136, 16144, 16152, 16152, 16168, 16176, 16184, 16184, 16200, 16208, 16208, 16216, 16232, 16240, 16248, 16248, 16256, 16272], +// CHECK-NEXT: [16720, 16736, 16736, 16752, 16752, 16768, 16784, 16784, 16784, 16800, 16800, 16816, 16832, 16832, 16832, 16848, 16864, 16864, 16880, 16880, 16896, 16896, 16912, 16912, 16912, 16928, 16944, 16960, 16960, 16960, 16976, 16976, 16992, 16992, 17008, 17024, 17024, 17024, 17040, 17040, 17056, 17056, 17072, 17088, 17088, 17088, 17104, 17120, 17120, 17120, 17136, 17152, 17152, 17152, 17168, 17184, 17184, 17184, 17200, 17216, 17216, 17232, 17232, 17248], +// CHECK-NEXT: [17664, 17680, 17696, 17696, 17712, 17712, 17728, 17728, 17744, 17744, 17760, 17776, 17776, 17776, 17792, 17808, 17808, 17808, 17824, 17840, 17840, 17856, 17856, 17872, 17872, 17888, 17904, 17920, 17920, 17920, 17936, 17952, 17952, 17952, 17968, 17984, 17984, 17984, 18000, 18016, 18016, 18016, 18032, 18048, 18048, 18064, 18064, 18080, 18080, 18096, 18112, 18112, 18128, 18128, 18144, 18144, 18160, 18160, 18176, 18192, 18192, 18192, 18208, 18224], +// CHECK-NEXT: [18624, 18624, 18640, 18656, 18656, 18656, 18672, 18688, 18688, 18688, 18704, 18720, 18736, 18736, 18736, 18752, 18768, 18768, 18784, 18800, 18800, 18800, 18816, 18832, 18832, 18832, 18848, 18880, 18880, 18880, 18896, 18912, 18912, 18912, 18928, 18944, 18944, 18944, 18960, 18976, 18976, 18992, 19008, 19024, 19024, 19024, 19040, 19056, 19056, 19056, 19072, 19088, 19088, 19104, 19120, 19120, 19120, 19136, 19152, 19168, 19168, 19168, 19184, 19200], +// CHECK-NEXT: [19568, 19568, 19584, 19600, 19600, 19616, 19632, 19632, 19648, 19648, 19664, 19680, 19680, 19696, 19696, 19712, 19728, 19728, 19744, 19760, 19760, 19760, 19776, 19792, 19792, 19808, 19824, 19840, 19840, 19840, 19856, 19872, 19872, 19888, 19888, 19904, 19920, 19920, 19936, 19952, 19952, 19952, 19968, 19984, 20000, 20000, 20016, 20032, 20032, 20032, 20048, 20064, 20064, 20080, 20096, 20096, 20096, 20112, 20128, 20144, 20144, 20160, 20160, 20176], +// CHECK-NEXT: [20512, 20512, 20528, 20544, 20560, 20560, 20576, 20592, 20592, 20592, 20608, 20640, 20640, 20640, 20656, 20672, 20672, 20688, 20688, 20704, 20720, 20720, 20736, 20752, 20752, 20752, 20768, 20800, 20800, 20800, 20816, 20832, 20832, 20848, 20864, 20880, 20880, 20880, 20896, 20912, 20912, 20912, 20944, 20960, 20960, 20960, 20976, 20992, 20992, 21008, 21024, 21040, 21040, 21040, 21056, 21072, 21072, 21088, 21104, 21120, 21120, 21120, 21136, 21152], +// CHECK-NEXT: [21456, 21472, 21488, 21504, 21504, 21504, 21520, 21536, 21536, 21552, 21568, 21584, 21584, 21600, 21600, 21616, 21632, 21632, 21648, 21664, 21664, 21680, 21696, 21696, 21712, 21712, 21728, 21760, 21760, 21760, 21776, 21792, 21792, 21808, 21824, 21840, 21840, 21840, 21856, 21872, 21872, 21888, 21904, 21920, 21920, 21936, 21936, 21968, 21968, 21968, 21984, 22000, 22000, 22016, 22032, 22048, 22048, 22048, 22064, 22096, 22096, 22096, 22112, 22128], +// CHECK-NEXT: [22400, 22416, 22432, 22448, 22448, 22448, 22480, 22480, 22496, 22496, 22512, 22544, 22544, 22544, 22560, 22576, 22576, 22592, 22608, 22624, 22624, 22624, 22656, 22656, 22672, 22672, 22688, 22720, 22720, 22720, 22736, 22752, 22752, 22768, 22784, 22800, 22800, 22800, 22832, 22832, 22848, 22848, 22864, 22896, 22896, 22896, 22912, 22928, 22928, 22944, 22960, 22976, 22976, 22976, 23008, 23008, 23024, 23024, 23040, 23072, 23072, 23072, 23088, 23104], +// CHECK-NEXT: [23360, 23360, 23376, 23392, 23408, 23408, 23424, 23440, 23440, 23456, 23472, 23488, 23504, 23504, 23520, 23536, 23536, 23552, 23568, 23584, 23584, 23584, 23616, 23616, 23632, 23632, 23648, 23680, 23680, 23680, 23696, 23712, 23728, 23728, 23744, 23760, 23776, 23776, 23792, 23808, 23808, 23824, 23840, 23856, 23872, 23872, 23888, 23904, 23904, 23920, 23936, 23952, 23952, 23952, 23984, 23984, 24000, 24000, 24016, 24048, 24048, 24048, 24064, 24080], +// CHECK-NEXT: [24304, 24304, 24320, 24336, 24352, 24352, 24368, 24384, 24400, 24400, 24416, 24448, 24448, 24448, 24464, 24480, 24496, 24496, 24512, 24528, 24544, 24544, 24560, 24576, 24592, 24592, 24608, 24640, 24640, 24640, 24656, 24672, 24688, 24688, 24704, 24720, 24736, 24736, 24752, 24768, 24768, 24784, 24800, 24832, 24832, 24832, 24848, 24864, 24880, 24880, 24896, 24912, 24928, 24928, 24944, 24960, 24960, 24976, 24992, 25024, 25024, 25024, 25040, 25056], +// CHECK-NEXT: [25248, 25248, 25280, 25296, 25296, 25296, 25328, 25344, 25344, 25344, 25376, 25392, 25392, 25408, 25424, 25440, 25440, 25456, 25472, 25488, 25488, 25504, 25520, 25536, 25536, 25552, 25568, 25600, 25600, 25600, 25616, 25632, 25648, 25648, 25664, 25696, 25696, 25696, 25728, 25728, 25744, 25744, 25776, 25792, 25792, 25808, 25824, 25840, 25840, 25856, 25872, 25888, 25888, 25904, 25920, 25936, 25936, 25952, 25968, 25984, 26000, 26000, 26016, 26032], +// CHECK-NEXT: [26192, 26192, 26224, 26240, 26240, 26256, 26272, 26288, 26288, 26304, 26320, 26352, 26352, 26352, 26368, 26400, 26400, 26400, 26432, 26448, 26448, 26464, 26480, 26496, 26496, 26512, 26528, 26560, 26560, 26560, 26576, 26592, 26608, 26608, 26640, 26656, 26656, 26656, 26688, 26704, 26704, 26704, 26736, 26752, 26768, 26768, 26784, 26800, 26816, 26816, 26832, 26864, 26864, 26864, 26896, 26912, 26912, 26912, 26944, 26960, 26976, 26976, 26992, 27008], +// CHECK-NEXT: [27136, 27152, 27168, 27184, 27200, 27200, 27232, 27232, 27248, 27248, 27280, 27296, 27312, 27312, 27328, 27344, 27360, 27360, 27392, 27408, 27408, 27424, 27440, 27456, 27456, 27472, 27488, 27520, 27520, 27536, 27536, 27568, 27568, 27584, 27600, 27616, 27616, 27632, 27648, 27664, 27680, 27680, 27712, 27728, 27728, 27744, 27760, 27776, 27792, 27792, 27808, 27840, 27840, 27840, 27872, 27888, 27888, 27888, 27920, 27952, 27952, 27952, 27968, 28000], +// CHECK-NEXT: [28096, 28096, 28112, 28144, 28144, 28144, 28176, 28192, 28192, 28208, 28224, 28256, 28256, 28272, 28288, 28304, 28304, 28320, 28336, 28352, 28368, 28368, 28400, 28416, 28416, 28416, 28448, 28480, 28480, 28496, 28496, 28528, 28528, 28544, 28560, 28576, 28592, 28592, 28624, 28624, 28640, 28640, 28672, 28704, 28704, 28704, 28720, 28752, 28752, 28768, 28784, 28800, 28800, 28816, 28832, 28848, 28864, 28864, 28896, 28912, 28928, 28928, 28944, 28976], +// CHECK-NEXT: [29040, 29040, 29072, 29088, 29088, 29104, 29120, 29136, 29152, 29152, 29184, 29200, 29216, 29216, 29232, 29264, 29264, 29264, 29296, 29312, 29328, 29328, 29360, 29360, 29376, 29376, 29408, 29440, 29440, 29440, 29456, 29488, 29488, 29504, 29520, 29536, 29552, 29552, 29584, 29600, 29600, 29616, 29632, 29664, 29664, 29680, 29696, 29712, 29728, 29728, 29744, 29776, 29776, 29792, 29808, 29824, 29824, 29840, 29872, 29888, 29904, 29904, 29920, 29936], +// CHECK-NEXT: [29984, 29984, 30016, 30032, 30032, 30048, 30064, 30080, 30096, 30096, 30128, 30160, 30160, 30176, 30192, 30208, 30224, 30224, 30240, 30272, 30272, 30288, 30304, 30320, 30336, 30336, 30368, 30400, 30400, 30400, 30416, 30448, 30448, 30464, 30480, 30512, 30512, 30512, 30544, 30560, 30560, 30576, 30608, 30624, 30640, 30640, 30656, 30688, 30688, 30704, 30720, 30736, 30752, 30752, 30784, 30800, 30800, 30816, 30832, 30864, 30864, 30880, 30896, 30912], +// CHECK-NEXT: [30928, 30944, 30960, 30992, 30992, 31008, 31024, 31040, 31056, 31056, 31088, 31120, 31120, 31120, 31136, 31168, 31168, 31184, 31200, 31232, 31232, 31248, 31264, 31280, 31296, 31296, 31328, 31360, 31360, 31376, 31392, 31408, 31424, 31424, 31456, 31472, 31472, 31488, 31520, 31536, 31536, 31552, 31568, 31600, 31600, 31616, 31632, 31648, 31664, 31664, 31696, 31712, 31728, 31728, 31760, 31776, 31776, 31792, 31808, 31840, 31856, 31856, 31872, 31904], +// CHECK-NEXT: [31872, 31888, 31904, 31936, 31936, 31952, 31968, 31984, 32000, 32000, 32032, 32064, 32064, 32080, 32096, 32128, 32128, 32144, 32160, 32192, 32192, 32192, 32224, 32240, 32256, 32256, 32288, 32320, 32320, 32336, 32352, 32368, 32384, 32384, 32416, 32432, 32448, 32448, 32480, 32496, 32496, 32512, 32544, 32560, 32576, 32576, 32592, 32624, 32640, 32640, 32672, 32688, 32688, 32704, 32736, 32752, 32752, 32768, 32800, 32832, 32832, 32832, 32864, 32864], +// CHECK-NEXT: [32832, 32832, 32864, 32896, 32896, 32896, 32928, 32928, 32960, 32960, 32992, 33024, 33024, 33024, 33056, 33088, 33088, 33088, 33120, 33152, 33152, 33152, 33184, 33184, 33216, 33216, 33248, 33280, 33280, 33280, 33312, 33344, 33344, 33344, 33376, 33408, 33408, 33408, 33440, 33472, 33472, 33472, 33504, 33536, 33536, 33536, 33568, 33600, 33600, 33600, 33632, 33664, 33664, 33664, 33696, 33728, 33728, 33728, 33760, 33792, 33792, 33792, 33824, 33856], +// CHECK-NEXT: [33760, 33792, 33792, 33824, 33824, 33856, 33856, 33888, 33888, 33920, 33920, 33952, 33984, 33984, 33984, 34016, 34048, 34048, 34080, 34080, 34112, 34112, 34144, 34144, 34176, 34176, 34208, 34240, 34240, 34240, 34272, 34304, 34304, 34304, 34336, 34368, 34368, 34368, 34400, 34432, 34432, 34432, 34464, 34496, 34496, 34528, 34528, 34560, 34560, 34592, 34592, 34624, 34624, 34656, 34656, 34688, 34688, 34720, 34720, 34752, 34784, 34784, 34784, 34816], +// CHECK-NEXT: [34720, 34720, 34752, 34784, 34784, 34784, 34816, 34848, 34848, 34848, 34880, 34912, 34912, 34944, 34944, 34976, 34976, 35008, 35008, 35040, 35040, 35072, 35104, 35104, 35136, 35136, 35168, 35200, 35200, 35200, 35232, 35264, 35264, 35264, 35296, 35328, 35328, 35328, 35360, 35392, 35392, 35392, 35424, 35456, 35488, 35488, 35488, 35520, 35552, 35552, 35584, 35584, 35616, 35616, 35648, 35648, 35680, 35680, 35712, 35744, 35744, 35744, 35776, 35808], +// CHECK-NEXT: [35648, 35680, 35712, 35712, 35744, 35744, 35776, 35776, 35808, 35808, 35840, 35872, 35872, 35872, 35904, 35936, 35936, 35936, 35968, 36000, 36000, 36032, 36064, 36064, 36064, 36096, 36128, 36160, 36160, 36160, 36192, 36224, 36224, 36224, 36256, 36288, 36288, 36288, 36320, 36352, 36352, 36352, 36384, 36448, 36448, 36448, 36480, 36480, 36512, 36512, 36544, 36576, 36576, 36576, 36608, 36640, 36640, 36640, 36672, 36704, 36736, 36736, 36736, 36768], +// CHECK-NEXT: [36608, 36608, 36640, 36672, 36672, 36672, 36704, 36736, 36736, 36768, 36800, 36832, 36832, 36832, 36864, 36896, 36896, 36896, 36928, 36960, 36960, 36992, 36992, 37024, 37024, 37056, 37088, 37120, 37120, 37120, 37152, 37184, 37184, 37184, 37216, 37248, 37248, 37280, 37312, 37312, 37312, 37344, 37376, 37408, 37408, 37408, 37440, 37472, 37472, 37472, 37504, 37536, 37536, 37568, 37600, 37600, 37600, 37632, 37664, 37696, 37696, 37696, 37728, 37760], +// CHECK-NEXT: [37536, 37568, 37600, 37632, 37632, 37632, 37664, 37696, 37696, 37696, 37728, 37760, 37792, 37792, 37824, 37824, 37856, 37856, 37888, 37920, 37920, 37920, 37952, 37984, 37984, 38016, 38048, 38080, 38080, 38080, 38112, 38144, 38144, 38144, 38176, 38208, 38208, 38240, 38272, 38272, 38272, 38304, 38336, 38368, 38368, 38368, 38400, 38432, 38432, 38464, 38464, 38496, 38528, 38528, 38560, 38560, 38592, 38592, 38624, 38656, 38656, 38688, 38688, 38720], +// CHECK-NEXT: [38528, 38528, 38560, 38592, 38592, 38592, 38624, 38656, 38656, 38656, 38688, 38752, 38752, 38752, 38784, 38816, 38816, 38816, 38848, 38880, 38880, 38912, 38944, 38944, 38976, 38976, 39008, 39040, 39040, 39072, 39072, 39104, 39136, 39136, 39168, 39200, 39200, 39200, 39232, 39264, 39264, 39264, 39296, 39360, 39360, 39360, 39392, 39424, 39424, 39424, 39456, 39488, 39488, 39520, 39552, 39552, 39584, 39584, 39616, 39648, 39648, 39680, 39680, 39712], +// CHECK-NEXT: [39456, 39456, 39488, 39520, 39520, 39552, 39584, 39584, 39616, 39616, 39648, 39680, 39712, 39712, 39744, 39744, 39776, 39776, 39808, 39840, 39840, 39872, 39904, 39904, 39904, 39936, 39968, 40000, 40000, 40032, 40032, 40064, 40096, 40096, 40128, 40160, 40160, 40160, 40192, 40224, 40224, 40256, 40288, 40320, 40320, 40320, 40352, 40384, 40384, 40416, 40448, 40448, 40480, 40480, 40512, 40544, 40544, 40544, 40576, 40640, 40640, 40640, 40672, 40704], +// CHECK-NEXT: [40416, 40416, 40448, 40480, 40480, 40480, 40512, 40544, 40544, 40576, 40608, 40640, 40640, 40672, 40672, 40704, 40704, 40736, 40768, 40800, 40800, 40800, 40832, 40864, 40864, 40896, 40928, 40960, 40960, 40960, 40992, 41024, 41024, 41056, 41088, 41120, 41120, 41120, 41152, 41184, 41184, 41216, 41248, 41280, 41280, 41280, 41312, 41344, 41344, 41376, 41408, 41440, 41440, 41440, 41472, 41504, 41504, 41536, 41568, 41600, 41600, 41600, 41632, 41664], +// CHECK-NEXT: [41344, 41344, 41376, 41408, 41440, 41440, 41472, 41504, 41504, 41504, 41536, 41600, 41600, 41600, 41632, 41664, 41664, 41696, 41728, 41760, 41760, 41760, 41792, 41824, 41824, 41824, 41888, 41920, 41920, 41920, 41952, 41984, 41984, 42016, 42048, 42080, 42080, 42080, 42112, 42144, 42144, 42176, 42208, 42240, 42240, 42272, 42272, 42304, 42336, 42336, 42368, 42400, 42400, 42432, 42464, 42464, 42496, 42496, 42528, 42560, 42560, 42592, 42592, 42656], +// CHECK-NEXT: [42304, 42304, 42336, 42368, 42368, 42400, 42432, 42432, 42464, 42464, 42496, 42528, 42560, 42560, 42592, 42624, 42624, 42624, 42656, 42688, 42720, 42720, 42752, 42784, 42784, 42784, 42848, 42880, 42880, 42880, 42912, 42944, 42944, 42976, 43008, 43040, 43040, 43040, 43104, 43104, 43104, 43136, 43168, 43200, 43200, 43232, 43264, 43296, 43296, 43296, 43328, 43360, 43360, 43392, 43424, 43456, 43456, 43456, 43488, 43552, 43552, 43552, 43584, 43616], +// CHECK-NEXT: [43232, 43232, 43296, 43328, 43328, 43328, 43360, 43392, 43392, 43424, 43456, 43488, 43488, 43520, 43520, 43552, 43584, 43584, 43616, 43648, 43648, 43680, 43712, 43744, 43744, 43744, 43776, 43840, 43840, 43840, 43872, 43904, 43904, 43936, 43968, 44000, 44000, 44000, 44064, 44064, 44096, 44096, 44128, 44160, 44192, 44192, 44224, 44256, 44256, 44288, 44320, 44352, 44352, 44352, 44384, 44416, 44416, 44448, 44480, 44512, 44512, 44544, 44544, 44608], +// CHECK-NEXT: [44192, 44192, 44224, 44256, 44256, 44288, 44320, 44352, 44352, 44352, 44416, 44448, 44448, 44448, 44480, 44512, 44544, 44544, 44576, 44608, 44608, 44640, 44672, 44672, 44704, 44704, 44736, 44800, 44800, 44800, 44832, 44864, 44896, 44896, 44928, 44960, 44960, 44992, 45024, 45024, 45056, 45056, 45088, 45152, 45152, 45152, 45184, 45216, 45216, 45248, 45280, 45312, 45312, 45312, 45376, 45376, 45408, 45408, 45440, 45504, 45504, 45504, 45536, 45568], +// CHECK-NEXT: [45120, 45152, 45184, 45216, 45216, 45216, 45280, 45280, 45312, 45312, 45344, 45408, 45408, 45408, 45440, 45472, 45472, 45504, 45536, 45568, 45568, 45600, 45632, 45632, 45664, 45664, 45696, 45760, 45760, 45760, 45792, 45824, 45856, 45856, 45888, 45920, 45920, 45952, 45984, 46016, 46016, 46016, 46080, 46112, 46112, 46144, 46144, 46176, 46208, 46208, 46240, 46272, 46272, 46304, 46336, 46368, 46368, 46368, 46432, 46464, 46464, 46496, 46496, 46560], +// CHECK-NEXT: [46080, 46112, 46144, 46176, 46176, 46176, 46240, 46240, 46272, 46272, 46304, 46368, 46368, 46368, 46400, 46432, 46464, 46464, 46496, 46528, 46528, 46560, 46592, 46624, 46624, 46624, 46688, 46720, 46720, 46752, 46752, 46816, 46816, 46816, 46848, 46912, 46912, 46912, 46944, 46976, 46976, 47008, 47040, 47072, 47104, 47104, 47136, 47168, 47168, 47200, 47232, 47264, 47264, 47296, 47328, 47328, 47360, 47360, 47424, 47456, 47456, 47488, 47488, 47520], +// CHECK-NEXT: [47040, 47040, 47072, 47104, 47136, 47136, 47168, 47200, 47200, 47232, 47264, 47296, 47328, 47328, 47360, 47392, 47392, 47424, 47456, 47488, 47488, 47520, 47552, 47584, 47584, 47584, 47648, 47680, 47680, 47712, 47712, 47776, 47776, 47776, 47840, 47872, 47872, 47872, 47936, 47936, 47968, 47968, 48000, 48064, 48064, 48064, 48096, 48128, 48160, 48160, 48192, 48224, 48256, 48256, 48288, 48320, 48320, 48352, 48384, 48416, 48448, 48448, 48480, 48512], +// CHECK-NEXT: [47968, 48000, 48032, 48064, 48064, 48096, 48128, 48160, 48160, 48160, 48224, 48256, 48256, 48288, 48320, 48352, 48352, 48384, 48416, 48448, 48448, 48480, 48512, 48544, 48544, 48544, 48608, 48640, 48640, 48672, 48672, 48736, 48736, 48736, 48800, 48832, 48832, 48832, 48896, 48896, 48928, 48928, 48960, 49024, 49024, 49056, 49056, 49120, 49120, 49120, 49152, 49216, 49216, 49216, 49280, 49280, 49312, 49312, 49344, 49408, 49408, 49408, 49440, 49472], +// CHECK-NEXT: [48928, 48928, 48960, 49024, 49024, 49024, 49088, 49088, 49120, 49120, 49152, 49216, 49216, 49248, 49248, 49312, 49312, 49312, 49376, 49408, 49408, 49408, 49472, 49472, 49504, 49504, 49568, 49600, 49600, 49632, 49632, 49696, 49696, 49696, 49760, 49792, 49792, 49792, 49856, 49856, 49888, 49888, 49952, 49984, 49984, 50016, 50048, 50080, 50080, 50112, 50144, 50176, 50176, 50208, 50240, 50272, 50272, 50272, 50336, 50368, 50368, 50400, 50432, 50464], +// CHECK-NEXT: [49856, 49888, 49920, 49952, 49952, 49984, 50016, 50048, 50048, 50080, 50112, 50176, 50176, 50176, 50208, 50240, 50272, 50272, 50304, 50368, 50368, 50368, 50432, 50432, 50464, 50464, 50496, 50560, 50560, 50592, 50592, 50656, 50656, 50688, 50720, 50752, 50752, 50784, 50816, 50848, 50848, 50848, 50912, 50944, 50976, 50976, 51008, 51040, 51040, 51072, 51104, 51136, 51136, 51168, 51200, 51232, 51232, 51264, 51296, 51360, 51360, 51360, 51392, 51424], +// CHECK-NEXT: [50816, 50816, 50880, 50912, 50912, 50944, 50976, 51008, 51008, 51008, 51072, 51104, 51136, 51136, 51168, 51200, 51232, 51232, 51264, 51296, 51328, 51328, 51360, 51392, 51424, 51424, 51456, 51520, 51520, 51552, 51552, 51616, 51616, 51648, 51680, 51712, 51712, 51744, 51776, 51808, 51808, 51840, 51872, 51904, 51936, 51936, 51968, 52000, 52032, 52032, 52064, 52096, 52128, 52128, 52192, 52192, 52224, 52224, 52288, 52320, 52320, 52352, 52384, 52416], +// CHECK-NEXT: [51776, 51776, 51808, 51840, 51872, 51872, 51936, 51936, 51968, 51968, 52032, 52064, 52064, 52096, 52128, 52160, 52160, 52192, 52224, 52256, 52288, 52288, 52320, 52352, 52384, 52384, 52416, 52480, 52480, 52512, 52512, 52576, 52576, 52608, 52640, 52672, 52672, 52704, 52736, 52768, 52768, 52800, 52832, 52896, 52896, 52896, 52928, 52992, 52992, 52992, 53056, 53088, 53088, 53120, 53152, 53184, 53184, 53184, 53248, 53280, 53312, 53312, 53344, 53376], +// CHECK-NEXT: [52704, 52736, 52768, 52800, 52800, 52832, 52864, 52896, 52896, 52928, 52960, 53024, 53024, 53056, 53056, 53120, 53120, 53152, 53184, 53216, 53216, 53248, 53280, 53312, 53312, 53344, 53376, 53440, 53440, 53472, 53472, 53536, 53536, 53568, 53600, 53632, 53632, 53664, 53696, 53728, 53728, 53760, 53792, 53856, 53856, 53888, 53888, 53952, 53952, 53984, 54016, 54048, 54048, 54080, 54112, 54144, 54144, 54176, 54208, 54272, 54272, 54304, 54304, 54368], +// CHECK-NEXT: [53664, 53664, 53728, 53760, 53760, 53792, 53824, 53856, 53856, 53888, 53920, 53984, 53984, 53984, 54016, 54080, 54080, 54112, 54144, 54176, 54176, 54208, 54240, 54272, 54272, 54304, 54336, 54400, 54400, 54432, 54464, 54496, 54496, 54528, 54560, 54592, 54624, 54624, 54656, 54688, 54720, 54720, 54784, 54816, 54848, 54848, 54880, 54912, 54944, 54944, 54976, 55040, 55040, 55040, 55104, 55136, 55136, 55136, 55200, 55232, 55264, 55264, 55296, 55328], +// CHECK-NEXT: [54592, 54624, 54656, 54688, 54720, 54720, 54784, 54784, 54816, 54816, 54880, 54912, 54944, 54944, 54976, 55008, 55040, 55040, 55104, 55136, 55136, 55168, 55200, 55232, 55232, 55264, 55296, 55360, 55360, 55392, 55424, 55456, 55456, 55488, 55520, 55552, 55584, 55584, 55648, 55648, 55680, 55680, 55744, 55776, 55808, 55808, 55840, 55872, 55904, 55904, 55968, 56000, 56000, 56032, 56064, 56096, 56096, 56128, 56160, 56224, 56224, 56256, 56288, 56320], +// CHECK-NEXT: [55552, 55552, 55616, 55648, 55648, 55680, 55712, 55744, 55776, 55776, 55840, 55872, 55872, 55904, 55936, 55968, 56000, 56000, 56032, 56096, 56096, 56128, 56160, 56192, 56192, 56224, 56256, 56320, 56320, 56352, 56384, 56416, 56416, 56448, 56480, 56512, 56544, 56544, 56608, 56640, 56640, 56640, 56704, 56768, 56768, 56768, 56800, 56864, 56864, 56896, 56928, 56960, 56960, 56992, 57024, 57056, 57088, 57088, 57152, 57184, 57216, 57216, 57248, 57280], +// CHECK-NEXT: [56512, 56512, 56544, 56608, 56608, 56608, 56672, 56704, 56704, 56736, 56768, 56832, 56832, 56864, 56896, 56928, 56928, 56960, 56992, 57056, 57056, 57056, 57120, 57152, 57152, 57184, 57216, 57280, 57280, 57312, 57344, 57376, 57376, 57408, 57440, 57504, 57504, 57504, 57568, 57600, 57600, 57632, 57664, 57728, 57728, 57760, 57792, 57824, 57824, 57856, 57888, 57920, 57952, 57952, 58016, 58048, 58048, 58080, 58112, 58176, 58176, 58208, 58208, 58272], +// CHECK-NEXT: [57440, 57472, 57504, 57536, 57568, 57568, 57632, 57632, 57664, 57664, 57728, 57792, 57792, 57792, 57824, 57888, 57888, 57920, 57952, 57984, 58016, 58016, 58080, 58112, 58112, 58144, 58176, 58240, 58240, 58272, 58304, 58336, 58336, 58368, 58400, 58464, 58464, 58464, 58528, 58560, 58560, 58592, 58624, 58688, 58688, 58720, 58752, 58784, 58816, 58816, 58848, 58912, 58912, 58944, 58976, 59008, 59008, 59040, 59072, 59136, 59168, 59168, 59200, 59232], +// CHECK-NEXT: [58400, 58400, 58432, 58496, 58496, 58528, 58560, 58592, 58624, 58624, 58688, 58720, 58752, 58752, 58784, 58848, 58848, 58880, 58912, 58944, 58976, 58976, 59040, 59040, 59072, 59072, 59136, 59200, 59200, 59232, 59264, 59296, 59296, 59328, 59360, 59424, 59424, 59456, 59488, 59520, 59520, 59552, 59584, 59648, 59680, 59680, 59712, 59744, 59776, 59776, 59840, 59872, 59872, 59904, 59936, 59968, 60000, 60000, 60064, 60128, 60128, 60128, 60160, 60224], +// CHECK-NEXT: [59328, 59360, 59392, 59424, 59456, 59456, 59520, 59552, 59552, 59584, 59616, 59680, 59680, 59712, 59744, 59776, 59808, 59808, 59872, 59904, 59904, 59936, 60000, 60000, 60032, 60032, 60096, 60160, 60160, 60192, 60224, 60256, 60288, 60288, 60320, 60384, 60384, 60416, 60448, 60480, 60512, 60512, 60576, 60608, 60640, 60640, 60672, 60736, 60736, 60768, 60800, 60832, 60864, 60864, 60928, 60960, 60960, 60992, 61024, 61088, 61088, 61120, 61152, 61184], +// CHECK-NEXT: [60288, 60288, 60352, 60384, 60384, 60416, 60448, 60480, 60512, 60512, 60576, 60640, 60640, 60672, 60704, 60736, 60768, 60768, 60832, 60864, 60864, 60896, 60928, 60960, 60992, 60992, 61056, 61120, 61120, 61152, 61184, 61216, 61248, 61248, 61280, 61344, 61344, 61376, 61408, 61440, 61472, 61472, 61536, 61600, 61600, 61600, 61632, 61696, 61696, 61728, 61760, 61824, 61824, 61856, 61888, 61920, 61952, 61952, 62016, 62048, 62080, 62080, 62112, 62176] diff --git a/test/mlir/test/gc/gpu-runner/XeGPU/f16_mlp_32x4096x4096x4096.mlir b/test/mlir/test/gc/gpu-runner/XeGPU/f16_mlp_32x4096x4096x4096.mlir index b6d31092a..51888aa45 100644 --- a/test/mlir/test/gc/gpu-runner/XeGPU/f16_mlp_32x4096x4096x4096.mlir +++ b/test/mlir/test/gc/gpu-runner/XeGPU/f16_mlp_32x4096x4096x4096.mlir @@ -1,4 +1,4 @@ -// RUN: gc-opt %s --pass-pipeline='builtin.module(func.func(iterative-tiling-and-fusion{use-cost-model=0 default-tile-size=matmul:{16,16}}),eliminate-empty-tensors,empty-tensor-to-alloc-tensor,one-shot-bufferize{bufferize-function-boundaries=1 function-boundary-type-conversion=identity-layout-map},drop-equivalent-buffer-results,func.func(finalizing-bufferize),canonicalize,cse,drop-equivalent-buffer-results,expand-realloc,canonicalize,ownership-based-buffer-deallocation,canonicalize,buffer-deallocation-simplification,bufferization-lower-deallocations,cse,canonicalize,convert-bufferization-to-memref,func.func(scf-forall-to-parallel),func.func(linalg-to-xegpu{stages=1 dpas-tile=8,16,16 k-tile=16}),xegpu-fold-alias-ops,func.func(convert-linalg-to-parallel-loops),func.func(gpu-map-parallel-loops),func.func(convert-parallel-loops-to-gpu),func.func(insert-gpu-allocs),gpu-kernel-outlining,canonicalize,set-spirv-capabilities{client-api=opencl},gpu.module(set-spirv-abi-attrs{client-api=opencl}),lower-affine,imex-vector-linearize,gpu.module(convert-xegpu-to-vc),reconcile-unrealized-casts,bf16-to-gpu,gpu.module(convert-func-to-spirv),gpu.module(convert-vector-to-spirv),imex-convert-gpu-to-spirv,spirv.module(spirv-lower-abi-attrs,spirv-update-vce),func.func(llvm-request-c-wrappers),serialize-spirv,convert-vector-to-scf,convert-gpu-to-gpux,convert-scf-to-cf,convert-cf-to-llvm,convert-vector-to-llvm,convert-index-to-llvm,convert-arith-to-llvm,convert-func-to-llvm,convert-math-to-llvm,convert-gpux-to-llvm,convert-index-to-llvm,expand-strided-metadata,lower-affine,finalize-memref-to-llvm,reconcile-unrealized-casts)' \ +// RUN: gc-opt %s --gc-gpu-pipeline \ // RUN: | gc-cpu-runner -e main --entry-point-result=void \ // RUN: --shared-libs=%mlir_runner_utils,%mlir_c_runner_utils,%opencl_runtime | FileCheck %s diff --git a/test/mlir/test/gc/gpu-runner/mlp.mlir b/test/mlir/test/gc/gpu-runner/mlp.mlir index 29dad1c8a..2ce26deed 100644 --- a/test/mlir/test/gc/gpu-runner/mlp.mlir +++ b/test/mlir/test/gc/gpu-runner/mlp.mlir @@ -1,4 +1,4 @@ -// RUN: gc-opt %s --pass-pipeline='builtin.module(convert-tensor-to-linalg,func.func(empty-tensor-to-alloc-tensor),one-shot-bufferize{unknown-type-conversion=identity-layout-map function-boundary-type-conversion=identity-layout-map bufferize-function-boundaries},func.func(convert-linalg-to-parallel-loops,imex-add-outer-parallel-loop,gpu-map-parallel-loops,convert-parallel-loops-to-gpu),func.func(insert-gpu-allocs{client-api=opencl}),canonicalize,normalize-memrefs,func.func(lower-affine),gpu-kernel-outlining,canonicalize,cse,set-spirv-capabilities{client-api=opencl},gpu.module(set-spirv-abi-attrs{client-api=opencl}),canonicalize,fold-memref-alias-ops,imex-convert-gpu-to-spirv,spirv.module(spirv-lower-abi-attrs,spirv-update-vce),func.func(llvm-request-c-wrappers),serialize-spirv,convert-gpu-to-gpux,convert-func-to-llvm,convert-math-to-llvm,convert-gpux-to-llvm,expand-strided-metadata,lower-affine,finalize-memref-to-llvm,reconcile-unrealized-casts)' | gc-cpu-runner -e main -entry-point-result=void --shared-libs=%mlir_runner_utils,%mlir_c_runner_utils,%opencl_runtime | FileCheck %s +// RUN: gc-opt %s --gc-gpu-pipeline | gc-cpu-runner -e main -entry-point-result=void --shared-libs=%mlir_runner_utils,%mlir_c_runner_utils,%opencl_runtime | FileCheck %s #map0 = affine_map<(d0, d1) -> (d1)> #map1 = affine_map<(d0, d1) -> (d0, d1)> #map2 = affine_map<(d0, d1, d2) -> (d0, d2)>