Issue 146974
Summary [DirectX] Validation failure: Invalid record
Labels new issue
Assignees
Reporter Icohedron
    157 DML shaders are failing to validate due to a validation error simply reported as "Invalid record" with no additional details

```
Invalid record
Validation failed.
```

One such DML shader failing to validate is `CumulativeOperationProduct_256_int64_native_8.hlsl`
```bash
clang-dxc /DirectML/Product/Shaders/Generated/CumulativeOperationProduct_256_int64_native_8.hlsl -E CSMain -T cs_6_0   -O3 -D DXC_COMPILER=1 -D __SHADER_TARGET_MAJOR=6 -D __SHADER_TARGET_MINOR=0 -I /DirectML/Product/Shaders/ -Fo validation/CumulativeOperationProduct_256_int64_native_8.dat
```

A small test shader that can reproduce the "Invalid record" validation error is shown below, but it may or may not be due to the same reason(s).
```hlsl 
uint2 Foo(uint2 a[2], uint i) {
  return a[i];
}
cbuffer Constants {
 uint2 arr[2];
}
RWStructuredBuffer<uint> output;
[numthreads(1, 1, 1)]
void CSMain(uint3 Tid : SV_DispatchThreadID) {
  output[0] = Foo(arr, Tid.x).x;
}
```

https://godbolt.org/z/3Wx8zsn1e 
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to