Skip to content

Commit 01a4a6e

Browse files
Disabled the path and test
1 parent 443ff0e commit 01a4a6e

File tree

4 files changed

+33
-28
lines changed

4 files changed

+33
-28
lines changed

lib/gc/Transforms/GPU/Pipeline.cpp

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,42 +6,49 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include <string>
10-
11-
#include "gc/Transforms/Passes.h"
12-
13-
#include "imex/Conversion/Passes.h"
14-
#include "imex/Transforms/Passes.h"
15-
169
#include "mlir/Conversion/Passes.h"
10+
#include "mlir/Dialect/Arith/Transforms/Passes.h"
1711
#include "mlir/Dialect/Bufferization/Transforms/OneShotAnalysis.h"
1812
#include "mlir/Dialect/Bufferization/Transforms/Passes.h"
19-
#include "mlir/Dialect/GPU/IR/GPUDialect.h"
20-
#include "mlir/Dialect/GPU/Transforms/Passes.h"
13+
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
2114
#include "mlir/Dialect/LLVMIR/Transforms/Passes.h"
2215
#include "mlir/Dialect/Linalg/Passes.h"
16+
#include "mlir/Dialect/Math/Transforms/Passes.h"
17+
#include "mlir/Dialect/MemRef/IR/MemRef.h"
2318
#include "mlir/Dialect/MemRef/Transforms/Passes.h"
24-
#include "mlir/Dialect/SPIRV/Transforms/Passes.h"
19+
#include "mlir/Dialect/SCF/IR/SCF.h"
20+
#include "mlir/Dialect/Tensor/IR/Tensor.h"
21+
#include "mlir/IR/DialectRegistry.h"
2522
#include "mlir/InitAllPasses.h"
2623
#include "mlir/Pass/PassManager.h"
24+
#include "mlir/Support/LogicalResult.h"
2725
#include "mlir/Transforms/Passes.h"
26+
#include <iostream>
27+
28+
#include "mlir/Dialect/GPU/IR/GPUDialect.h"
29+
#include "mlir/Dialect/GPU/Transforms/Passes.h"
30+
#include "mlir/Dialect/SPIRV/Transforms/Passes.h"
31+
32+
#include <imex/Conversion/Passes.h>
33+
#include <imex/Transforms/Passes.h>
34+
35+
#include <string>
36+
37+
#include "gc/Transforms/Passes.h"
2838

2939
namespace mlir::gc {
3040

3141
struct GPUPipelineOption : PassPipelineOptions<GPUPipelineOption> {
32-
Option<bool> isUsmArgs{
42+
PassOptions::Option<bool> isUsmArgs{
3343
*this, "is-usm-args",
34-
desc("Whether to use USM(unified shared memory) func args, in "
35-
"which the host and device could access the same buffer "
36-
"and there is no need to add memcpy explicitly"),
37-
init(true)};
44+
llvm::cl::desc("Whether to use USM(unified shared memory) func args, in "
45+
"which the host and device could access the same buffer "
46+
"and there is no need to add memcpy explicitly"),
47+
llvm::cl::init(true)};
3848
};
3949

40-
void populateGPUPipeline(OpPassManager &pm,
50+
void populateGPUPipeline(mlir::OpPassManager &pm,
4151
const GPUPipelineOption &pipelineOption) {
42-
// Add an argument for the GPU context
43-
pm.addNestedPass<func::FuncOp>(createAddContextArg());
44-
4552
pm.addNestedPass<func::FuncOp>(createIterativeTilingAndFusion());
4653

4754
pm.addPass(bufferization::createEmptyTensorEliminationPass());
@@ -84,7 +91,6 @@ void populateGPUPipeline(OpPassManager &pm,
8491
/*isUsmArgs*/ pipelineOption.isUsmArgs.getValue()};
8592
pm.addNestedPass<func::FuncOp>(
8693
imex::createInsertGPUAllocsPass(insertGPUAllocsOption));
87-
8894
pm.addPass(createGpuKernelOutliningPass());
8995
pm.addPass(createCanonicalizerPass());
9096
pm.addPass(imex::createSetSPIRVCapabilitiesPass());
@@ -103,14 +109,15 @@ void populateGPUPipeline(OpPassManager &pm,
103109
pm.addNestedPass<func::FuncOp>(LLVM::createRequestCWrappersPass());
104110
pm.addPass(imex::createSerializeSPIRVPass());
105111
pm.addPass(createConvertVectorToSCFPass());
112+
pm.addPass(imex::createConvertGPUToGPUXPass());
106113
pm.addPass(createConvertSCFToCFPass());
107114
pm.addPass(createConvertControlFlowToLLVMPass());
108115
pm.addPass(createConvertVectorToLLVMPass());
109116
pm.addPass(createConvertIndexToLLVMPass());
110117
pm.addPass(createArithToLLVMConversionPass());
111118
pm.addPass(createConvertFuncToLLVMPass());
112119
pm.addPass(createConvertMathToLLVMPass());
113-
pm.addPass(createGpuToGpuOcl());
120+
pm.addPass(imex::createConvertGPUXToLLVMPass());
114121
pm.addPass(createConvertIndexToLLVMPass());
115122
pm.addPass(memref::createExpandStridedMetadataPass());
116123
pm.addPass(createLowerAffinePass());
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
if not config.gc_use_imex:
2-
config.unsupported = True
2+
config.unsupported = True
3+
else:
4+
# FIXME: Enable when #343 is merged.
5+
config.excludes = ['gpu-to-gpuocl.mlir']

test/mlir/test/gc/gpu-runner/XeGPU/lit.local.cfg

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
if not config.gc_use_imex:
2-
config.unsupported = True
3-
else:
4-
# FIXME: Enable when the GPU runner is implemented.
5-
config.excludes = ['mlp.mlir']
2+
config.unsupported = True

0 commit comments

Comments
 (0)