Skip to content

xla_ops/remainder.mlir test failing for NVIDIA GPUs #2500

Closed

Description

@antiagainst
125 - iree/test/e2e/xla_ops:check_vulkan-spirv_vulkan_remainder.mlir (Failed)

This is the only failing test if running on NVIDIA GPUs. The problem is that we use OpSRem when converting to SPIR-V. According to the Vulkan's SPIR-V environment spec, it has undefined behavior if either operand is negative:

For the OpSRem and OpSMod instructions, if either operand is negative the result is undefined.
While the OpSRem and OpSMod instructions are supported by the Vulkan environment, they require non-negative values and thus do not enable additional functionality beyond what OpUMod provides.

So we need to emulate OpSRem with OpUMod and handle the sign by ourselves.

Activity

  1. self-assigned this
    on Jul 13, 2020
  2. antiagainst commented on Jul 13, 2020

    @antiagainst
    MemberAuthor
  3. antiagainst commented on Jul 13, 2020

    @antiagainst
    MemberAuthor

    Ooh, didn't notice #1995 before creating this one. Sorry about that! :)

  4. antiagainst commented on Jul 15, 2020

    @antiagainst
    MemberAuthor

    The fix is now propagated to main. Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions