C28 intrinsic, __iexp2(float), uses TMU1 instruction IEXP2F32 which has accuracy issues when base/exponent are outside specified ranges

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • Code Generation Tools
    • CODEGEN-13346
    • Hide
      C2000_22.6.0.LTS
      C2000_21.6.0.LTS
      C2000_18.12.0.LTS
      C2000_20.2.0.LTS
      Show
      C2000_22.6.0.LTS C2000_21.6.0.LTS C2000_18.12.0.LTS C2000_20.2.0.LTS
    • Hide
      C2000_25.3.0.LTS*
      C2000_22.6.3.LTS*
      C2000_21.6.2.LTS*
      Show
      C2000_25.3.0.LTS* C2000_22.6.3.LTS* C2000_21.6.2.LTS*
    • default
    • Hide
      Do not use --fp_mode=relaxed and instead use --fp_mode=strict
      Avoid using intrinsic __iexp2(float x) which expands to use IEXP2F32 instruction
      Show
      Do not use --fp_mode=relaxed and instead use --fp_mode=strict Avoid using intrinsic __iexp2(float x) which expands to use IEXP2F32 instruction

      With --fp_mode=relaxed, the compiler converts expf(), exp2f(), powf() to use intrinsic __iexp2(float) which uses TMU1 instruction IEXP2F32.

      However, IEXP2F32 is accurate when the base is (Base between -1.0 and +1.0, Exponent between -2 and +2), not otherwise. 

      Hence, this conversion in --fp_mode=relaxed should be removed.

      Users can use the intrinsic if they wish to. We should add a prominent note in the compiler user guide indicating this removal - since there may be customers in production with the RTS library calls and --fp_mode=relaxed and it may have been working well for them based on their input data ranges. They would need to switch to the intrinsic to get the same level of performance they were getting earlier. 

      See attached email for details.

            Assignee:
            TI User
            Reporter:
            TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Connection: Intermediate to External PROD System
                EXTSYNC-5224 - C28 intrinsic, __iexp2(float), uses...
                SYNCHRONIZED
                • Last Sync Date: