Skip to content

Commit 6323a7a

Browse files
committed
disable linalg-to-xegpu in cpu builds
Signed-off-by: dchigarev <[email protected]>
1 parent 0cc6165 commit 6323a7a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

include/gc/Transforms/Passes.td

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def ConvertOneDNNGraphToLinalg : Pass<"convert-onednn-graph-to-linalg"> {
3232
];
3333
}
3434

35-
35+
#ifdef GC_USE_GPU
3636
def LinalgToXeGPU : Pass<"linalg-to-xegpu", "func::FuncOp"> {
3737
let summary = "Convert linalg dialect to XeGPU dialect.";
3838
let description = [{
@@ -57,5 +57,6 @@ def LinalgToXeGPU : Pass<"linalg-to-xegpu", "func::FuncOp"> {
5757
"DPAS register block sizes MxNxK">,
5858
];
5959
}
60+
#endif // GC_USE_GPU
6061

6162
#endif // GC_DIALECT_GC_PASSES

lib/gc/Transforms/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,6 @@ add_mlir_library(GCPasses
2828
)
2929

3030
set_property(GLOBAL APPEND PROPERTY GC_PASS_LIBS GCPasses)
31-
add_subdirectory(GPU)
31+
if(GC_USE_GPU)
32+
add_subdirectory(GPU)
33+
endif()

0 commit comments

Comments
 (0)