This repository was archived by the owner on Nov 27, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 9 files changed +32
-14
lines changed
test/Conversion/VectorToXeGPU Expand file tree Collapse file tree 9 files changed +32
-14
lines changed Original file line number Diff line number Diff line change @@ -7,4 +7,10 @@ add_public_tablegen_target(MLIRConversionPassIncGen)
77
88add_mlir_doc(Passes ConversionPasses ./ -gen-pass-doc )
99
10+ if (MLIR_CONVERSION_TOSATOTENSOR_ENABLE)
11+ add_subdirectory (TosaToTensor)
12+ endif ()
13+ if (MLIR_DIALECT_XEGPU_ENABLE)
14+ add_subdirectory (VectorToXeGPU)
15+ endif ()
1016add_subdirectory (ConvertToLLVM)
Original file line number Diff line number Diff line change 7979#include " mlir/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.h"
8080#include " mlir/Conversion/VectorToSCF/VectorToSCF.h"
8181#include " mlir/Conversion/VectorToSPIRV/VectorToSPIRVPass.h"
82+ #ifdef MLIR_DIALECT_XEGPU_ENABLE
8283#include " mlir/Conversion/VectorToXeGPU/VectorToXeGPU.h"
84+ #endif
8385
8486namespace mlir {
8587
Original file line number Diff line number Diff line change @@ -1464,6 +1464,7 @@ def ConvertVectorToSPIRV : Pass<"convert-vector-to-spirv"> {
14641464// VectorToXeGPU
14651465//===----------------------------------------------------------------------===//
14661466
1467+ #ifdef MLIR_DIALECT_XEGPU_ENABLE
14671468def ConvertVectorToXeGPU : Pass<"convert-vector-to-xegpu"> {
14681469 let summary = "Lower the operations from the vector dialect into the XeGPU "
14691470 "dialect";
@@ -1473,5 +1474,6 @@ def ConvertVectorToXeGPU : Pass<"convert-vector-to-xegpu"> {
14731474 "vector::VectorDialect", "xegpu::XeGPUDialect"
14741475 ];
14751476}
1477+ #endif
14761478
14771479#endif // MLIR_CONVERSION_PASSES
Original file line number Diff line number Diff line change @@ -70,4 +70,6 @@ add_subdirectory(VectorToGPU)
7070add_subdirectory (VectorToLLVM)
7171add_subdirectory (VectorToSCF)
7272add_subdirectory (VectorToSPIRV)
73- add_subdirectory (VectorToXeGPU)
73+ if (MLIR_DIALECT_XEGPU_ENABLE)
74+ add_subdirectory (VectorToXeGPU)
75+ endif ()
Original file line number Diff line number Diff line change 1- add_mlir_conversion_library(MLIRVectorToXeGPU
2- VectorToXeGPU.cpp
1+ if (MLIR_DIALECT_XEGPU_ENABLE)
2+ add_mlir_conversion_library(MLIRVectorToXeGPU
3+ VectorToXeGPU.cpp
34
4- ADDITIONAL_HEADER_DIRS
5- ${MLIR_MAIN_INCLUDE_DIR} /mlir/Conversion/VectorToXeGPU
5+ ADDITIONAL_HEADER_DIRS
6+ ${MLIR_MAIN_INCLUDE_DIR} /mlir/Conversion/VectorToXeGPU
67
7- DEPENDS
8- MLIRConversionPassIncGen
8+ DEPENDS
9+ MLIRConversionPassIncGen
910
10- LINK_LIBS PUBLIC
11- MLIRArithDialect
12- MLIRMemRefDialect
13- MLIRTransforms
14- MLIRVectorDialect
15- MLIRXeGPUDialect
16- )
11+ LINK_LIBS PUBLIC
12+ MLIRArithDialect
13+ MLIRMemRefDialect
14+ MLIRTransforms
15+ MLIRVectorDialect
16+ MLIRXeGPUDialect
17+ )
18+ endif ()
Original file line number Diff line number Diff line change 1+ // REQUIRES: xegpu-dialect-enabled
12// RUN: mlir-opt %s -convert-vector-to-xegpu -split-input-file | FileCheck %s
23
34func.func @load_1D_vector (%source: memref <8 x16 x32 xf32 >, %offset: index ) -> vector <8 xf32 > {
Original file line number Diff line number Diff line change 1+ // REQUIRES: xegpu-dialect-enabled
12// RUN: mlir-opt %s -convert-vector-to-xegpu -split-input-file | FileCheck %s
23
34func.func @store_1D_vector (%vec: vector <8 xf32 >,
Original file line number Diff line number Diff line change 1+ // REQUIRES: xegpu-dialect-enabled
12// RUN: mlir-opt %s -convert-vector-to-xegpu -split-input-file | FileCheck %s
23
34func.func @load_1D_vector (%source: memref <8 x16 x32 xf32 >, %offset: index ) -> vector <8 xf32 > {
Original file line number Diff line number Diff line change 1+ // REQUIRES: xegpu-dialect-enabled
12// RUN: mlir-opt %s -convert-vector-to-xegpu -split-input-file | FileCheck %s
23
34func.func @store_1D_vector (%vec: vector <8 xf32 >,
You can’t perform that action at this time.
0 commit comments