Skip to content

Fix test_correctness_abs_float64#4853

Closed
zasdfgbnm wants to merge 1 commit intomainfrom
zasdfgbnm-patch-5
Closed

Fix test_correctness_abs_float64#4853
zasdfgbnm wants to merge 1 commit intomainfrom
zasdfgbnm-patch-5

Conversation

@zasdfgbnm
Copy link
Collaborator

@zasdfgbnm zasdfgbnm commented Jul 25, 2025

Fixes #4852

@zasdfgbnm
Copy link
Collaborator Author

!test

@github-actions
Copy link

Description

  • Added abs function for double precision

  • Ensured consistent absolute value computation


Changes walkthrough 📝

Relevant files
Enhancement
helpers.cu
Added double precision `abs` function                                       

runtime/helpers.cu

  • Added abs function for double precision
  • Ensured consistent absolute value computation
  • +4/-0     

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    🧪 No relevant tests
    ⚡ Recommended focus areas for review

    Possible Issue

    The abs function for double type is implemented manually instead of using the standard library function fabs. This could lead to inconsistencies or potential issues with precision and performance.

    __device__ double abs(double a) {
      return a < 0 ? -a : a;
    }

    @naoyam
    Copy link
    Collaborator

    naoyam commented Jul 28, 2025

    Not sure why this was closed (just accidentally?). @zasdfgbnm, could you please finish fixing the issue?

    @zasdfgbnm zasdfgbnm closed this Jul 30, 2025
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Labels

    None yet

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    test_correctness_abs_float64 - AssertionError: Tensor-likes are not close!

    2 participants