|
1 | 1 | #include "mlir/Dialect/XeGPU/uArch/IntelGpuXe2.h"
|
2 | 2 | #include "mlir/IR/BuiltinTypes.h"
|
3 |
| -#include "llvm/Support/YAMLTraits.h" |
| 3 | +#include "llvm/Support/DebugLog.h" |
4 | 4 | #include <algorithm>
|
5 |
| -#include <iostream> |
6 |
| -#include <string> |
7 | 5 | #include <vector>
|
8 | 6 |
|
| 7 | +#define DEBUG_TYPE "xegpu-uarch" |
| 8 | + |
9 | 9 | using namespace mlir::xegpu::uArch;
|
10 | 10 | using namespace mlir::xegpu::uArch::Xe2Plus;
|
11 | 11 |
|
@@ -80,51 +80,26 @@ bool DPASInstruction::checkSupportedTypes(mlir::Type AType, mlir::Type BType,
|
80 | 80 | if (AType.isF16() || BType.isF16()) {
|
81 | 81 | if (AType != BType || (CType && (!CType.isF32() && !CType.isF16())) ||
|
82 | 82 | (!DType.isF32() && !DType.isF16())) {
|
83 |
| - llvm::errs() |
84 |
| - << "Unsupported dpas combinations of Dst, Acc, A and B matrices, " |
85 |
| - << "Supported types are:\n" |
86 |
| - << " Dst | Acc | A | B \n" |
87 |
| - << " f, hf | f, hf | hf | hf \n" |
88 |
| - << "AType: " << AType << " BType: " << BType << " CType: " << CType |
89 |
| - << " DType: " << DType; |
| 83 | + LDBG() << "Unsupported dpas combinations of Dst, Acc, A and B matrices."; |
90 | 84 | return false;
|
91 | 85 | }
|
92 | 86 | } else if (AType.isBF16() || BType.isBF16()) {
|
93 | 87 | if (AType != BType || (CType && (!CType.isF32() && !CType.isBF16())) ||
|
94 | 88 | (!DType.isF32() && !DType.isBF16())) {
|
95 |
| - llvm::errs() |
96 |
| - << "Unsupported dpas combinations of Dst, Acc, A and B matrices, " |
97 |
| - << "Supported types are:\n" |
98 |
| - << " Dst | Acc | A | B \n" |
99 |
| - << " f, bf | f, bf | bf | bf \n" |
100 |
| - << "AType: " << AType << " BType: " << BType << " CType: " << CType |
101 |
| - << " DType: " << DType; |
| 89 | + LDBG() << "Unsupported dpas combinations of Dst, Acc, A and B matrices."; |
102 | 90 | return false;
|
103 | 91 | }
|
104 | 92 | } else if (AType.isTF32() || BType.isTF32()) {
|
105 | 93 | if (AType != BType || (CType && (!CType.isF32() && !DType.isF32())) ||
|
106 | 94 | (!DType.isF32())) {
|
107 |
| - llvm::errs() |
108 |
| - << "Unsupported dpas combinations of Dst, Acc, A and B matrices, " |
109 |
| - << "Supported types are:\n" |
110 |
| - << " Dst | Acc | A | B \n" |
111 |
| - << " f | f | tf32 | tf32 \n" |
112 |
| - << "AType: " << AType << " BType: " << BType << " CType: " << CType |
113 |
| - << " DType: " << DType; |
| 95 | + LDBG() << "Unsupported dpas combinations of Dst, Acc, A and B matrices."; |
114 | 96 | return false;
|
115 | 97 | }
|
116 | 98 | } else if (!(AType.isInteger(2) || AType.isInteger(4) ||
|
117 | 99 | AType.isInteger(8)) &&
|
118 | 100 | !(BType.isInteger(2) || BType.isInteger(4) ||
|
119 | 101 | BType.isInteger(8))) {
|
120 |
| - llvm::errs() |
121 |
| - << "Unsupported dpas combinations of Dst, Acc, A and B matrices, " |
122 |
| - << "Supported types are:\n" |
123 |
| - << " Dst | Acc | A | B " |
124 |
| - " \n" |
125 |
| - << " ud, d | ud,d | ub,b,u4,s4,u2,s2 | ub,b,u4,s4,u2,s2 " |
126 |
| - << "AType: " << AType << " BType: " << BType << " CType: " << CType |
127 |
| - << " DType: " << DType; |
| 102 | + LDBG() << "Unsupported dpas combinations of Dst, Acc, A and B matrices."; |
128 | 103 | return false;
|
129 | 104 | }
|
130 | 105 |
|
|
0 commit comments