File tree Expand file tree Collapse file tree 6 files changed +37
-23
lines changed
include/mlir/Dialect/XeGPU
utils/bazel/llvm-project-overlay/mlir Expand file tree Collapse file tree 6 files changed +37
-23
lines changed Original file line number Diff line number Diff line change 1+ // ===- XeGPUTargetInfo.h - Target constants ---------------------*- C++ -*-===//
2+ //
3+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+ // See https://llvm.org/LICENSE.txt for license information.
5+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+ //
7+ // ===----------------------------------------------------------------------===//
8+
9+ #ifndef MLIR_DIALECT_XEGPU_IR_XEGPUTARGETINFO_H_
10+ #define MLIR_DIALECT_XEGPU_IR_XEGPUTARGETINFO_H_
11+
12+ namespace mlir {
13+ namespace xegpu {
14+ // / HW dependent constants.
15+ // / TODO: These constants should be queried from the target information.
16+ namespace targetinfo {
17+ constexpr unsigned subgroupSize = 16 ; // How many lanes in a subgroup.
18+ // / If DPAS A or B operands have low precision element types they must be packed
19+ // / according to the following sizes.
20+ constexpr unsigned packedSizeInBitsForDefault =
21+ 16 ; // Minimum packing size per register for DPAS A.
22+ constexpr unsigned packedSizeInBitsForDpasB =
23+ 32 ; // Minimum packing size per register for DPAS B.
24+ constexpr unsigned packedSizeInBitsForGatherScatter =
25+ 32 ; // Minimum packing size per register for Gather and Scatter ops.
26+ } // namespace targetinfo
27+ } // namespace xegpu
28+ } // namespace mlir
29+
30+ #endif // MLIR_DIALECT_XEGPU_IR_XEGPUTARGETINFO_H_
Original file line number Diff line number Diff line change @@ -24,22 +24,6 @@ class LayoutAttr;
2424class TensorDescType ;
2525} // namespace xegpu
2626
27- namespace xegpu {
28- // / HW dependent constants.
29- // / TODO: These constants should be queried from the target information.
30- namespace targetinfo {
31- constexpr unsigned subgroupSize = 16 ; // How many lanes in a subgroup.
32- // / If DPAS A or B operands have low precision element types they must be packed
33- // / according to the following sizes.
34- constexpr unsigned packedSizeInBitsForDefault =
35- 16 ; // Minimum packing size per register for DPAS A.
36- constexpr unsigned packedSizeInBitsForDpasB =
37- 32 ; // Minimum packing size per register for DPAS B.
38- constexpr unsigned packedSizeInBitsForGatherScatter =
39- 32 ; // Minimum packing size per register for Gather and Scatter ops.
40- } // namespace targetinfo
41- } // namespace xegpu
42-
4327namespace xegpu {
4428
4529// / Flatten a set of ValueRange into a single SmallVector<Value>
Original file line number Diff line number Diff line change 88
99#include " mlir/Dialect/Utils/IndexingUtils.h"
1010#include " mlir/Dialect/XeGPU/IR/XeGPU.h"
11- #include " mlir/Dialect/XeGPU/Utils/XeGPUUtils .h"
11+ #include " mlir/Dialect/XeGPU/IR/XeGPUTargetInfo .h"
1212#include " mlir/IR/Builders.h"
1313#include " mlir/IR/DialectImplementation.h"
1414#include " llvm/ADT/TypeSwitch.h"
Original file line number Diff line number Diff line change 1515#include " mlir/Dialect/MemRef/IR/MemRef.h"
1616#include " mlir/Dialect/Vector/IR/VectorOps.h"
1717#include " mlir/Dialect/XeGPU/IR/XeGPU.h"
18+ #include " mlir/Dialect/XeGPU/IR/XeGPUTargetInfo.h"
1819#include " mlir/Dialect/XeGPU/Transforms/Passes.h"
1920#include " mlir/Dialect/XeGPU/Utils/XeGPUUtils.h"
2021#include " mlir/IR/Attributes.h"
Original file line number Diff line number Diff line change 1111#include " mlir/Dialect/Vector/IR/VectorOps.h"
1212#include " mlir/Dialect/Vector/Transforms/VectorDistribution.h"
1313#include " mlir/Dialect/XeGPU/IR/XeGPU.h"
14+ #include " mlir/Dialect/XeGPU/IR/XeGPUTargetInfo.h"
1415#include " mlir/Dialect/XeGPU/Transforms/Passes.h"
1516#include " mlir/Dialect/XeGPU/Transforms/Transforms.h"
1617#include " mlir/Dialect/XeGPU/Utils/XeGPUUtils.h"
Original file line number Diff line number Diff line change @@ -3519,11 +3519,8 @@ gentbl_cc_library(
35193519
35203520cc_library (
35213521 name = "XeGPUDialect" ,
3522- srcs = [
3523- "lib/Dialect/XeGPU/IR/XeGPUDialect.cpp" ,
3524- "lib/Dialect/XeGPU/IR/XeGPUOps.cpp" ,
3525- ],
3526- hdrs = ["include/mlir/Dialect/XeGPU/IR/XeGPU.h" ],
3522+ srcs = glob (["lib/Dialect/XeGPU/IR/*.cpp" ]),
3523+ hdrs = glob (["include/mlir/Dialect/XeGPU/IR/*.h" ]),
35273524 includes = ["include" ],
35283525 deps = [
35293526 ":ArithDialect" ,
@@ -4845,7 +4842,8 @@ cc_library(
48454842 ]),
48464843 hdrs = glob (["include/mlir/Support/*.h" ]),
48474844 includes = ["include" ],
4848- deps = ["//llvm:Support" ],)
4845+ deps = ["//llvm:Support" ],
4846+ )
48494847
48504848cc_library (
48514849 name = "Debug" ,
You can’t perform that action at this time.
0 commit comments