llvm / llvm/offload-test-suite

[Metal] Wrong results for 16 bit countbits on M2 mac

Open
#1,507 1 comment 0 reactions 1 assignee View on GitHub

@bogner is already working on this.

Since Sep 14, 2026.

driver-bug
Dominant language
C++
Stars
18
Forks
39
Avg merge
2d 18h
Merged PRs (30d)
40

Description

countbits.16.test is failing on the bot we have set up for HLSL Tests in the LLVM pre-checkin CI (See https://github.com/llvm/wg-hlsl/issues/477). This appears to be AppleM2 specific, as the offload test CI (M4) and locally (M3) are both passing. See the error output below.

# .---command stderr------------
# | Test failed: Test1
# | Comparison Rule: BufferExact
# | Expected:
# | ---
# | Name:            ExpectedOut
# | Format:          UInt32
# | Stride:          16
# | Data:            [ 3, 0, 8, 16, 0, 8, 16, 16, 3, 0, 0, 0 ]
# | OutputProps:
# |   Height:          0
# |   Width:           0
# |   Depth:           0
# | ...
# | Got:
# | ---
# | Name:            OutInt
# | Format:          UInt32
# | Stride:          16
# | Data:            [ 393219, 393216, 393224, 393232, 2363555840, 2363555848, 
# |                    2363555856, 2363555856, 3, 36065, 0, 0 ]
# | OutputProps:
# |   Height:          0
# |   Width:           0
# |   Depth:           0
# | ...
# | Full Hex representation of Expected Buffer Values:
# | [ 0x3, 0x0, 0x8, 0x10, 0x0, 0x8, 0x10, 0x10, 0x3, 0x0, 0x0, 0x0 ]
# | Full Hex representation of Actual Buffer Values:
# | [ 0x60003, 0x60000, 0x60008, 0x60010, 0x8ce10000, 0x8ce10008, 0x8ce10010, 0x8ce10010, 0x3, 0x8ce1, 0x0, 0x0 ]
# | 
# | Test failed: Test2
# | Comparison Rule: BufferExact
# | Expected:
# | ---
# | Name:            ExpectedOut
# | Format:          UInt32
# | Stride:          16
# | Data:            [ 3, 0, 8, 16, 0, 8, 16, 16, 3, 0, 0, 0 ]
# | OutputProps:
# |   Height:          0
# |   Width:           0
# |   Depth:           0
# | ...
# | Got:
# | ---
# | Name:            OutUInt
# | Format:          UInt32
# | Stride:          16
# | Data:            [ 2363555843, 2363555840, 2363555848, 2363555856, 2363555840, 
# |                    2363555848, 2363555856, 2363555856, 3, 36065, 0, 0 ]
# | OutputProps:
# |   Height:          0
# |   Width:           0
# |   Depth:           0
# | ...
# | Full Hex representation of Expected Buffer Values:
# | [ 0x3, 0x0, 0x8, 0x10, 0x0, 0x8, 0x10, 0x10, 0x3, 0x0, 0x0, 0x0 ]
# | Full Hex representation of Actual Buffer Values:
# | [ 0x8ce10003, 0x8ce10000, 0x8ce10008, 0x8ce10010, 0x8ce10000, 0x8ce10008, 0x8ce10010, 0x8ce10010, 0x3, 0x8ce1, 0x0, 0x0 ]
# | 
# `-----------------------------

Contributor guide

No contributing guide indexed for this repository

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.