Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
Artem-B opened this issue Nov 7, 2024 · 2 comments · May be fixed by #2742
Open
1 task done

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

Artem-B opened this issue Nov 7, 2024 · 2 comments · May be fixed by #2742
Labels
bug Something isn't working right.

Comments

@Artem-B
Copy link
Contributor

Artem-B commented Nov 7, 2024

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

@Artem-B Artem-B added the bug Something isn't working right. label Nov 7, 2024
@Artem-B Artem-B linked a pull request Nov 7, 2024 that will close this issue
2 tasks
@miscco
Copy link
Collaborator

miscco commented Nov 7, 2024

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

@Artem-B
Copy link
Contributor Author

Artem-B commented Nov 7, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right.
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

2 participants