Commit adffd31
authored
Implement HLSL Diagnostics for LinAlg operations (#7430)
This PR implements checks to validate the linalg builtin functions:
__builtin_MatVecMul, __builtin_MatVecMulAdd,
__builtin_OuterProductAccumulate and __builtin_VectorAccumulate. This
includes:
- verify valid types for input and output vectors
- const checks for compile-time const parameters
- value checks for interpretation and layout (enum) parameters
- min/max checks for matrix dimensions
- verify input-output vector are the right dimensions for the given
matrix (dimM and dimK) : packed and unpacked cases
- verify matrix layout, transpose and stride rules
- incorrect shader model warning
Adds tests for all the above error checks.
Implements
#73361 parent f9c2d5d commit adffd31
File tree
21 files changed
+4271
-126
lines changed- include/dxc
- tools/clang
- include/clang/Basic
- lib
- Headers/hlsl/dx
- Sema
- test
- CodeGenDXIL/hlsl
- intrinsics/linalg_builtins
- linalg
- SemaHLSL/hlsl/linalg
- builtins
- utils/hct
21 files changed
+4271
-126
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
136 | 140 | | |
137 | | - | |
138 | | - | |
| 141 | + | |
| 142 | + | |
139 | 143 | | |
140 | | - | |
| 144 | + | |
141 | 145 | | |
142 | 146 | | |
143 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8018 | 8018 | | |
8019 | 8019 | | |
8020 | 8020 | | |
| 8021 | + | |
| 8022 | + | |
| 8023 | + | |
| 8024 | + | |
| 8025 | + | |
| 8026 | + | |
| 8027 | + | |
| 8028 | + | |
| 8029 | + | |
| 8030 | + | |
| 8031 | + | |
| 8032 | + | |
| 8033 | + | |
| 8034 | + | |
| 8035 | + | |
| 8036 | + | |
| 8037 | + | |
| 8038 | + | |
| 8039 | + | |
| 8040 | + | |
| 8041 | + | |
| 8042 | + | |
| 8043 | + | |
| 8044 | + | |
| 8045 | + | |
| 8046 | + | |
| 8047 | + | |
| 8048 | + | |
| 8049 | + | |
| 8050 | + | |
| 8051 | + | |
| 8052 | + | |
| 8053 | + | |
| 8054 | + | |
| 8055 | + | |
| 8056 | + | |
| 8057 | + | |
8021 | 8058 | | |
8022 | 8059 | | |
8023 | 8060 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
47 | 59 | | |
48 | 60 | | |
49 | | - | |
50 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
51 | 69 | | |
52 | | - | |
53 | | - | |
54 | 70 | | |
55 | 71 | | |
56 | 72 | | |
| |||
116 | 132 | | |
117 | 133 | | |
118 | 134 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
123 | 139 | | |
124 | 140 | | |
125 | 141 | | |
| |||
143 | 159 | | |
144 | 160 | | |
145 | 161 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
151 | 167 | | |
152 | 168 | | |
153 | 169 | | |
| |||
0 commit comments