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;
24
24
class TensorDescType ;
25
25
} // namespace xegpu
26
26
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
-
43
27
namespace xegpu {
44
28
45
29
// / Flatten a set of ValueRange into a single SmallVector<Value>
Original file line number Diff line number Diff line change 8
8
9
9
#include " mlir/Dialect/Utils/IndexingUtils.h"
10
10
#include " mlir/Dialect/XeGPU/IR/XeGPU.h"
11
- #include " mlir/Dialect/XeGPU/Utils/XeGPUUtils .h"
11
+ #include " mlir/Dialect/XeGPU/IR/XeGPUTargetInfo .h"
12
12
#include " mlir/IR/Builders.h"
13
13
#include " mlir/IR/DialectImplementation.h"
14
14
#include " llvm/ADT/TypeSwitch.h"
Original file line number Diff line number Diff line change 15
15
#include " mlir/Dialect/MemRef/IR/MemRef.h"
16
16
#include " mlir/Dialect/Vector/IR/VectorOps.h"
17
17
#include " mlir/Dialect/XeGPU/IR/XeGPU.h"
18
+ #include " mlir/Dialect/XeGPU/IR/XeGPUTargetInfo.h"
18
19
#include " mlir/Dialect/XeGPU/Transforms/Passes.h"
19
20
#include " mlir/Dialect/XeGPU/Utils/XeGPUUtils.h"
20
21
#include " mlir/IR/Attributes.h"
Original file line number Diff line number Diff line change 11
11
#include " mlir/Dialect/Vector/IR/VectorOps.h"
12
12
#include " mlir/Dialect/Vector/Transforms/VectorDistribution.h"
13
13
#include " mlir/Dialect/XeGPU/IR/XeGPU.h"
14
+ #include " mlir/Dialect/XeGPU/IR/XeGPUTargetInfo.h"
14
15
#include " mlir/Dialect/XeGPU/Transforms/Passes.h"
15
16
#include " mlir/Dialect/XeGPU/Transforms/Transforms.h"
16
17
#include " mlir/Dialect/XeGPU/Utils/XeGPUUtils.h"
Original file line number Diff line number Diff line change @@ -3519,11 +3519,8 @@ gentbl_cc_library(
3519
3519
3520
3520
cc_library (
3521
3521
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" ]),
3527
3524
includes = ["include" ],
3528
3525
deps = [
3529
3526
":ArithDialect" ,
@@ -4845,7 +4842,8 @@ cc_library(
4845
4842
]),
4846
4843
hdrs = glob (["include/mlir/Support/*.h" ]),
4847
4844
includes = ["include" ],
4848
- deps = ["//llvm:Support" ],)
4845
+ deps = ["//llvm:Support" ],
4846
+ )
4849
4847
4850
4848
cc_library (
4851
4849
name = "Debug" ,
You can’t perform that action at this time.
0 commit comments