Skip to content

tosa.rescale calls roundevenf(), failing to compile some programs #12778

Open

Description

@okkwon

89a1af74@llvm-project introduces the use of math::RoundEvenOp which is lowered into a call to roundevenf() in libm, which causes an undefined symbol issue.

To work around the issue, the following tests in iree_tfl_tests are marked as XFAIL for now.

  • mobilenet_v3
  • person_detect
  • llvmcpu_mobilenet_v3-large_uint8
  • llvmcpu_posenet_i8
  • llvmcpu_resnet_50_int8

Additionally, several user programs are now failing to compile - see #12836.

Activity

  1. benvanik commented on Mar 27, 2023

    @benvanik
    Collaborator

    that's real bad - that means we aren't vectorizing these at all - we could add the libm function as a workaround but someone should look into ensuring this gets vectorized and properly lowered.

  2. rsuderman commented on Mar 27, 2023

    @rsuderman
    Collaborator

    I can look into the lowering. Its a little tricky where it should live but I can probably find a home for it. Implementation is the bigger question.

  3. moved this from Not Started to Inbox in (Deprecated) IREEon Apr 5, 2023
  4. allieculp commented on Apr 5, 2023

    @allieculp

    @jpienaar P1 or no?

  5. ScottTodd commented on Apr 5, 2023

    @ScottTodd
    Member

    Oh, this is a duplicate of #12836, with a more descriptive issue title. I did some digging on the other issue. Which should we keep and which should we close?

  6. ScottTodd commented on Apr 5, 2023

    @ScottTodd
    Member

    To work around the issue, the following tests in iree_tfl_tests are marked as XFAIL for now.
    mobilenet_v3
    person_detect
    llvmcpu_mobilenet_v3-large_uint8
    llvmcpu_posenet_i8
    llvmcpu_resnet_50_int8

    Oooh... that's why our CI was passing when downstream reported failures... yeah... that's really bad :/

  7. ScottTodd commented on Apr 5, 2023

    @ScottTodd
    Member

    Definitely at least P1. We can't be regressing compilation correctness on real programs. I'd have advocated for blocking the LLVM integrate on that and not disabling tests. This is not a good state to be in.

  8. allieculp commented on Apr 5, 2023

    @allieculp

    @rsuderman Let us know if you are looking into this? Marked as P1, can update the status as you see fit.

  9. 12 remaining items

  10. moved this from Inbox to In Progress in (Deprecated) IREEon Apr 11, 2023
  11. added
    integrations/stablehlo
    on Apr 17, 2023
  12. ramiro050 commented on Apr 20, 2023

    @ramiro050
    Member

    The expand pattern for roundeven has landed: llvm/llvm-project@8d2bae9

  13. jpienaar commented on Apr 21, 2023

    @jpienaar
    Member

    Rollback upstream due to failure on M2, is it something you can reproduce or would need help finding place to run it?

  14. ramiro050 commented on Apr 21, 2023

    @ramiro050
    Member

    Rollback upstream due to failure on M2, is it something you can reproduce or would need help finding place to run it?

    I can try reproducing on my M1 Macbook. Although the issue seems to be that it is perfectly valid to print a negative nan value as nan without the sign.

    For reference, rollback of rollback: https://reviews.llvm.org/D148941

  15. ramiro050 commented on Apr 24, 2023

    @ramiro050
    Member

    Issues leading to rollback of roundeven patch have been fixed: llvm/llvm-project@44baa65

  16. moved this from In Progress to No status in (Deprecated) IREEon Apr 26, 2023
  17. moved this to In Progress in (Deprecated) IREEon Apr 26, 2023
  18. jpienaar commented on Apr 27, 2023

    @jpienaar
    Member

    This LLVM version has now been integrated, is next step adding that populate method in?

  19. added 2 commits that reference this issue on Apr 28, 2023
    8053593
    4bd6b92
  20. jpienaar commented on Apr 28, 2023

    @jpienaar
    Member

    llvmcpu_posenet_i8.run fails with numerical difference.

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

Metadata

Metadata

Assignees

Labels

codegen/llvmintegrations/stablehlointegrations/tosallvm-integrate

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions