Skip to content

[BUG]: pow_complex_complex.pass.cpp fails in unoptimized builds #2741

Closed

Description

@Artem-B

Is this a duplicate?

Type of Bug

Runtime Error

Component

libcu++

Describe the bug

The test uses exact FP comparison for the operation results, and it fails in unoptimized builds where exp/log operations are not optimized away, and we accumulate some errors.

How to Reproduce

Compile the test w/o optimizations. Run. Observe it failing on double tests on a GPU (tested on sm_60, 80, 89)

On GPU:

third_party/gpus/cccl/v2_6_0/libcudacxx/test/libcudacxx/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp:62: void test_edges() [T = double]: block: [0,0,0], thread: [0,0,0] Assertion `imag(r) == imag(z)` failed.
CUDA devices found: 1
Device 0: "NVIDIA A100-SXM4-40GB", Selected, SM80, 42298834944 [bytes]
CUDA ERROR, line 110: cudaErrorAssert: device-side assert triggered

Expected behavior

Tests should not use exact FP comparison unless there's a very good reason to expect precise result.

Reproduction link

No response

Operating System

No response

nvidia-smi output

No response

NVCC version

No response

Activity

  1. miscco commented on Nov 7, 2024

    @miscco
    Contributor

    I am not sure about it. There are actually a ton of requirements that certain identities hold. I can check that but we do know that our implementation is not fully conformant

  2. Artem-B commented on Nov 7, 2024

    @Artem-B
    ContributorAuthor

    Full list of the failed test cases: https://gist.github.com/Artem-B/19807d5e4f2e3efb0e3d6319ebed1809

    It appears that the issue only affects double tests on a GPU.

  3. moved this from Todo to Done in CCCLon Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions