@@ -74,6 +74,7 @@ def ConvertMemRefToCPURuntime : Pass<"convert-memref-to-cpuruntime", "func::Func
7474 "cpuruntime::CPURuntimeDialect"
7575 ];
7676}
77+ #ifdef GC_USE_GPU
7778
7879#ifdef GC_USE_IMEX
7980def LinalgToXeGPU : Pass<"linalg-to-xegpu", "func::FuncOp"> {
@@ -93,6 +94,20 @@ def LinalgToXeGPU : Pass<"linalg-to-xegpu", "func::FuncOp"> {
9394 "DPAS register block sizes MxNxK">,
9495 ];
9596}
97+ #endif
98+
99+ def GpuToGpuOcl : Pass<"gpu-to-gpuocl", "ModuleOp"> {
100+ let summary = "Convert the GPU operations to GpuOclRuntime calls.";
101+ let description = [{
102+ Convert the gpu alloc, dealloc, memcpy and launch operations to GpuOclRuntime calls.
103+ }];
104+ let options = [
105+ Option<"callFinish", "call-finish", "bool",
106+ /*default=*/"false",
107+ "Call finish() after each kernel launch.">
108+ ];
109+ }
110+ #endif // GC_USE_GPU
96111
97112def AddContextArg : Pass<"add-ctx-arg", "func::FuncOp"> {
98113 let summary = "Add a context argument.";
@@ -109,17 +124,6 @@ def AllocsToSLM : Pass<"allocs-to-slm", "func::FuncOp"> {
109124 ];
110125}
111126
112- def GpuToGpuOcl : Pass<"gpu-to-gpuocl", "ModuleOp"> {
113- let summary = "Convert the GPU operations to GpuOclRuntime calls.";
114- let description = [{
115- Convert the gpu alloc, dealloc, memcpy and launch operations to GpuOclRuntime calls.
116- }];
117- let options = [
118- Option<"callFinish", "call-finish", "bool",
119- /*default=*/"false",
120- "Call finish() after each kernel launch.">
121- ];
122- }
123127
124128def GpuTilingAndFusion : Pass<"gpu-tiling", "func::FuncOp"> {
125129 let summary = "GPU tiling and fusion path.";
@@ -185,7 +189,6 @@ def GpuXeVMAttachTarget: Pass<"xevm-attach-target", ""> {
185189 ];
186190}
187191
188- #endif // GC_USE_IMEX
189192
190193def IterativeTilingAndFusion : Pass<"iterative-tiling-and-fusion",
191194 "func::FuncOp"> {
0 commit comments