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]: FP8 support introduced new GCC 6 / CUB warnings #1129

Closed
1 task done
gevtushenko opened this issue Nov 20, 2023 · 0 comments · Fixed by #1130
Closed
1 task done

[BUG]: FP8 support introduced new GCC 6 / CUB warnings #1129

gevtushenko opened this issue Nov 20, 2023 · 0 comments · Fixed by #1130
Assignees
Labels
bug Something isn't working right.

Comments

@gevtushenko
Copy link
Collaborator

Is this a duplicate?

Type of Bug

Compile-time Error

Component

CUB

Describe the bug

GCC 6 emits warnings on the following code (nvbug 4384865):

unsigned char max_word = 0x7EU;
return reinterpret_cast<__nv_fp8_e4m3&>(max_word);

This affects only our tests. For users, the code is under system header.

How to Reproduce

#include <cub/util_type.cuh>

int main() { } 

When compiled with:

nvcc main.cu -ccbin=g++-6 -D_CCCL_NO_SYSTEM_HEADER -O3 -std=c++14 "--generate-code=arch=compute_89,code=[compute_89,sm_89]" -Xcompiler=-Werror -Xcompiler=-Wall -Xcompiler=-Wextra

Emits:

cccl/cub/cub/util_type.cuh:1187:51: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
         return reinterpret_cast<__nv_fp8_e4m3&>(max_word);

Expected behavior

Compilation emits no warnings

Reproduction link

No response

Operating System

No response

nvidia-smi output

No response

NVCC version

No response

@gevtushenko gevtushenko added the bug Something isn't working right. label Nov 20, 2023
@github-project-automation github-project-automation bot moved this to Todo in CCCL Nov 20, 2023
@gevtushenko gevtushenko self-assigned this Nov 20, 2023
@gevtushenko gevtushenko moved this from Todo to In Progress in CCCL Nov 20, 2023
@cccl-authenticator-app cccl-authenticator-app bot moved this from In Progress to In Review in CCCL Nov 20, 2023
@github-project-automation github-project-automation bot moved this from In Review to Done in CCCL Nov 21, 2023
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
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant