microsoft / microsoft/DirectXShaderCompiler

[SPIR-V] Implement matrix comparisons

Open
#8,796 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-triage spirv
Dominant language
C++
Stars
3.7k
Forks
900
Avg merge
2d 11h
Merged PRs (30d)
44

Description

The offload test suite is adding matrix comparison tests. unfortunately DXC did not implement theses for SPIR-V
so we need to track the lack of support

# executed command: 'E:\project\DXC_Release_BUILD\bin\dxc.exe' -spirv -fspv-target-env=vulkan1.3 -T cs_6_0 -Fo 'E:\project\llvm-build\tools\OffloadTest\test\vk\Basic\Matrix\Output\matrix_comparison_operators.uint32.test.tmp.o' 'E:\project\llvm-build\tools\OffloadTest\test\vk\Basic\Matrix\Output\matrix_comparison_operators.uint32.test.tmp/source.hlsl'
# .---command stderr------------
# | E:\project\llvm-build\tools\OffloadTest\test\vk\Basic\Matrix\Output\matrix_comparison_operators.uint32.test.tmp/source.hlsl:13:20: error: binary operator '<' over matrix type unimplemented
# |   bool2x3 UintLT = UintLTLHS < UintLTRHS;
# |                    ^~~~~~~~~~~~~~~~~~~~~
# | E:\project\llvm-build\tools\OffloadTest\test\vk\Basic\Matrix\Output\matrix_comparison_operators.uint32.test.tmp/source.hlsl:14:20: error: binary operator '>' over matrix type unimplemented
# |   bool4x2 UintGT = UintGTLHS > UintGTRHS;
# |                    ^~~~~~~~~~~~~~~~~~~~~
# | E:\project\llvm-build\tools\OffloadTest\test\vk\Basic\Matrix\Output\matrix_comparison_operators.uint32.test.tmp/source.hlsl:15:20: error: binary operator '<=' over matrix type unimplemented
# |   bool3x3 UintLE = UintLELHS <= UintLERHS;
# |                    ^~~~~~~~~~~~~~~~~~~~~~
# | E:\project\llvm-build\tools\OffloadTest\test\vk\Basic\Matrix\Output\matrix_comparison_operators.uint32.test.tmp/source.hlsl:16:20: error: binary operator '>=' over matrix type unimplemented
# |   bool3x4 UintGE = UintGELHS >= UintGERHS;
# |                    ^~~~~~~~~~~~~~~~~~~~~~
# | E:\project\llvm-build\tools\OffloadTest\test\vk\Basic\Matrix\Output\matrix_comparison_operators.uint32.test.tmp/source.hlsl:17:20: error: binary operator '==' over matrix type unimplemented
# |   bool4x3 UintEQ = UintEQLHS == UintEQRHS;
# |                    ^~~~~~~~~~~~~~~~~~~~~~
# | E:\project\llvm-build\tools\OffloadTest\test\vk\Basic\Matrix\Output\matrix_comparison_operators.uint32.test.tmp/source.hlsl:18:20: error: binary operator '!=' over matrix type unimplemented
# |   bool4x4 UintNE = UintNELHS != UintNERHS;
# |                    ^~~~~~~~~~~~~~~~~~~~~~
# | 
# `-----------------------------
# error: command failed with exit status: 0x80004005

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the offload test suite and the generated matrix_comparison_operators.uint32.test.tmp/source.hlsl shown in the report. Trace the SPIR-V compilation path for matrix binary operators and the existing matrix-operation tests. Done means the listed comparison operators compile successfully for SPIR-V and the relevant offload tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers, testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.