[dxsa][mlir] Port LIT tests from dxilconv#196
Conversation
dxilconv tool has a LIT test suite that covers most instructions. These original tests are DXBC container binaries, but the current mlir-translate tool cannot translate from them directly - it needs only the content of SHEX section. The tests are generated by extracting shader binaries from DXBC containers. LIT checks are auto-generated by MLIR utils/generate-test-checks.py script. The checks reflect the current state of the compiler, and it is expected they will change once we enable more instructions. Tests in hlsl directory are from: https://github.com/microsoft/DirectXShaderCompiler/tree/main/projects/dxilconv/test/dxbc2dxil Tests in asm directory are from: https://github.com/microsoft/DirectXShaderCompiler/tree/main/projects/dxilconv/test/dxbc2dxil-asm
9616520 to
f46e042
Compare
|
Are you intending to merge this, or is this for reference? Asking because the tests all include the standard disclaimer that these tests may be bad. If you're wanting to merge this, is there any way to change the automation to use hex and intermix the instructions with the |
|
@asavonic maybe worth to use .shex extension instead of bin to make an accent on the internal content of the file? |
Yeah, that disclaimer is generated by
In order to intermix instructions with CHECK lines we need a custom generator - Let's keep these as separate binaries for now, and rename them to |
Yes, I think we can merge this PR, so we don't need to cherry-pick it all the time. |
Can you include details of how to update the tests when other PRs change how things get printed? It's not as simple as just running |
dxilconvtool has a LIT test suite that covers most instructions. These original tests are DXBC container binaries, but the currentmlir-translatetool cannot translate from them directly - it needs only the content of SHEX section.The tests are generated by extracting shader binaries from DXBC containers. LIT checks are auto-generated by MLIR
utils/generate-test-checks.pyscript. The checks reflect the current state of the compiler, and it is expected they will change once we enable more instructions.Tests in
hlsldirectory are from:https://github.com/microsoft/DirectXShaderCompiler/tree/main/projects/dxilconv/test/dxbc2dxil
Tests in
asmdirectory are from:https://github.com/microsoft/DirectXShaderCompiler/tree/main/projects/dxilconv/test/dxbc2dxil-asm