Skip to content

[Vulkan][Intel] boolean matrix and() intrinsic in compute shader is producing garbage results. #704

@farzonl

Description

@farzonl

Summary

Intel Vulkan matrix_bool_and_operator produces incorrect results. This is different than #703 because the same pipeline completes successfully (no validation-layer errors), but the results are wrong.

offloader.exe fails

Test case

d:\repos\llvm-build\bin\offloader.exe -debug-layer -adapter-regex="intel" D:\repos\llvm-build\tools\OffloadTest\test\clang-vk\Basic\Matrix\Output\matrix_bool_and_operator.test.tmp/pipeline.yaml D:\repos\llvm-build\tools\OffloadTest\test\clang-vk\Basic\Matrix\Output\matrix_bool_and_operator.test.tmp.o
# executed command: 'd:\repos\llvm-build\bin\offloader.exe' -debug-layer -adapter-regex=intel 'D:\repos\llvm-build\tools\OffloadTest\test\clang-vk\Basic\Matrix\Output\matrix_bool_and_operator.test.tmp/pipeline.yaml' 'D:\repos\llvm-build\tools\OffloadTest\test\clang-vk\Basic\Matrix\Output\matrix_bool_and_operator.test.tmp.o'
# .---command stdout------------
# | Using Vulkan API
# | Physical device created.
# | Shader module created.
# | Copy command buffer created.
# | Memory buffers created.
# | Executed copy command buffer.
# | Execute command buffer created.
# | Descriptors: { type = 5, count = 5 }
# | Descriptor pool created.
# | Binding 5 descriptors.
# | Num Descriptor sets: 1
# | Updating Descriptor [0] { 0, 0 }
# | Updating Descriptor [1] { 0, 1 }
# | Updating Descriptor [2] { 0, 2 }
# | Updating Descriptor [3] { 0, 3 }
# | Updating Descriptor [4] { 0, 4 }
# | WriteDescriptors: 5
# | Descriptor sets created.
# | Compute pipeline created.
# | Dispatched compute shader: { 1, 1, 1 }
# | Commands created.
# | Executed compute command buffer.
# | Compute pipeline created.
# | Cleanup complete.
# `-----------------------------
# .---command stderr------------
# | Test failed: AndTrueTrueOut
# | Comparison Rule: BufferExact
# | Expected:
# | ---
# | Name:            AndTrueTrueExpectedOut
# | Format:          Int32
# | Data:            [ 1, 1, 1, 1, 1, 1 ]
# | OutputProps:
# |   Height:          0
# |   Width:           0
# |   Depth:           0
# | ...
# | Got:
# | ---
# | Name:            AndTrueTrueOut
# | Format:          Int32
# | Data:            [ 1, 1, 0, 0, 0, 0 ]
# | OutputProps:
# |   Height:          0
# |   Width:           0
# |   Depth:           0
# | ...
# | Full Hex 64bit representation of Expected Buffer Values:
# | [ 0x1, 0x1, 0x1, 0x1, 0x1, 0x1 ]
# | Full Hex 64bit representation of Actual Buffer Values:
# | [ 0x1, 0x1, 0x0, 0x0, 0x0, 0x0 ]
# |
# | Test failed: AndTrueMixOut
# | Comparison Rule: BufferExact
# | Expected:
# | ---
# | Name:            AndTrueMixExpectedOut
# | Format:          Int32
# | Data:            [ 0, 0, 0, 1, 1, 1 ]
# | OutputProps:
# |   Height:          0
# |   Width:           0
# |   Depth:           0
# | ...
# | Got:
# | ---
# | Name:            AndTrueMixOut
# | Format:          Int32
# | Data:            [ 0, 0, 0, 0, 0, 0 ]
# | OutputProps:
# |   Height:          0
# |   Width:           0
# |   Depth:           0
# | ...
# | Full Hex 64bit representation of Expected Buffer Values:
# | [ 0x0, 0x0, 0x0, 0x1, 0x1, 0x1 ]
# | Full Hex 64bit representation of Actual Buffer Values:
# | [ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 ]
# |
# | Test failed: AndTrueMix2Out
# | Comparison Rule: BufferExact
# | Expected:
# | ---
# | Name:            AndTrueMix2ExpectedOut
# | Format:          Int32
# | Data:            [ 1, 1, 1, 0, 0, 0 ]
# | OutputProps:
# |   Height:          0
# |   Width:           0
# |   Depth:           0
# | ...
# | Got:
# | ---
# | Name:            AndTrueMix2Out
# | Format:          Int32
# | Data:            [ 1, 1, 0, 0, 0, 0 ]
# | OutputProps:
# |   Height:          0
# |   Width:           0
# |   Depth:           0
# | ...
# | Full Hex 64bit representation of Expected Buffer Values:
# | [ 0x1, 0x1, 0x1, 0x0, 0x0, 0x0 ]
# | Full Hex 64bit representation of Actual Buffer Values:
# | [ 0x1, 0x1, 0x0, 0x0, 0x0, 0x0 ]
# |
# `-----------------------------
# error: command failed with exit status: 1

--

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions