Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-47088

Utilize BigDecimal to calculate the GPU resource

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 4.0.0
    • None
    • Spark Core

    Description

      To prevent precision errors, the current method of calculating GPU resources involves multiplying by 1E16 to convert doubles to Longs. If needed, it will also convert Longs back to doubles. This approach introduces redundancy in the code, especially for test code.

      More details can be found at https://github.com/apache/spark/pull/44690#discussion_r1482301112

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              wbo4958 Bobby Wang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: