Skip to content

wgsl: ldexp tests might now be incorrectly failing SwiftShader #1791

Closed

Description

@zoddicus

I have recently been fixing up some of the logic in the fullF32Range and fullI32Range functions, so that they generate correct/interesting values. This has uncovered cases for ldexp where SwiftShader is now being failed that I think maybe incorrect.

Specifically:

  • EXPECTATION FAILED: (-1.1754942106924411e-38 (0x807fffff subnormal), 1 (0x00000001))
    returned: -2.3509885615147286e-38
    expected: [-2.3509884213848822e-38,0]
    ...

This smells like a off by 1ULP issue, i.e. something is getting rounded early/late. I will have to investigate what Vulkan CTS is doing, etc.

Activity

  1. self-assigned this
    on Aug 24, 2022
  2. added a commit that references this issue on Aug 24, 2022
  3. zoddicus commented on Aug 25, 2022

    @zoddicus
    ContributorAuthor

    Lots of discussion internally with @dneto0 about this.
    This is likely actually a bug in SwiftShader's implementation and a missing areas of coverage in Vulkan CTS.
    So the test as-is is correct.

    That being said, given that Vulkan CTS has been approving drivers with missing coverage in this corner case, WebGPU may need a spec change to say something like "if input is subnormal and result is normal then ldexp isn't defined" to deal with real world devices.

  4. dneto0 commented on Aug 25, 2022

    @dneto0
    Contributor

    I'd like to

    • clarify WGSL to better explain what's intended
    • avoid loosening the spec for now, with expectation that SwiftShader will be fixed.
    • wait for further experience with more WebGPU targets
  5. added a commit that references this issue on Aug 31, 2022
  6. added this to CTSon Sep 20, 2022
  7. moved this to Open (no TODO) in CTSon Sep 21, 2022
  8. zoddicus commented on Nov 29, 2022

    @zoddicus
    ContributorAuthor

    Looks like the SwiftShader change has landed and propagated, and the spec has been updated.

  9. moved this from Open (no TODO) to Complete in CTSon Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

  • Status
    Complete

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions