llvm / llvm/offload-test-suite
[Metal] The Metal shader converter is unable to handle the new DXIL vectorized dot product instruction
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 18
- Forks
- 39
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 40
Description
Filed a bug with Apple here: https://feedbackassistant.apple.com/feedback/24450317
The following code:
```hlsl
StructuredBuffer X : register(t0);
StructuredBuffer Y : register(t1);
RWStructuredBuffer Out : register(u2);
[numthreads(1,1,1)]
void main() {
vector X5;
vector Y5;
for (uint I = 0; I < 5; ++I) {
X5[I] = X[I];
Y5[I] = Y[I];
}
Out[0] = dot(X5, Y5);
}
```
Causes an abort when compiled with shader model 6.9 (`dxc -T cs_6_9 ...`):
Failed to compile and link DXIL to Metal IR: IRErrorCodeUnsupportedInstruction
This is presumably because of long vector versions of `dx.op.dot`.
Nothing we can do but xfail until this is fixed in the shader converter. This is not technically not a driver bug but does block all Metal runtimes until it is fixed so in practice it is.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the offload test that compiles the provided HLSL with dxc -T cs_6_9 and identify how unsupported Metal shader-converter cases are recorded. Reproduce the abort, then mark this vectorized dot-product case as expected to fail until the converter supports the long dx.op.dot instruction; verify that the suite reports the expected failure.
Written by the indexing model from the issue text.
Assessment
- Domain
- computer-graphics, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100