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

Make -DENABLE_FP8 conditional on CMake option #607

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

martin-ueding
Copy link

The definition -DENABLE_FP8 is added only conditional on the used CUDA version. There is an additional CMake option ENABLE_FP8 which is supposed to control whether FP8 is used. The option only controlled the message, but not the actual definition.

This change makes the compile option dependent on the CMake option like the message suggests it should be.

Signed-off-by: Martin Ueding [email protected]

The definition `-DENABLE_FP8` is added only conditional on the used CUDA version. There is an additional CMake option `ENABLE_FP8` which is supposed to control whether FP8 is used. The option only controlled the message, but not the actual definition.

This change makes the compile option dependent on the CMake option like the message suggests it should be.
@comaniac
Copy link

Upvote for this PR. I got the following build failure with CUDA 11.8 without this PR:

/tmp/FasterTransformer/src/fastertransformer/kernels/decoder_masked_multihead_attention_utils.h(1743): error: identifier "printf" is undefined

/tmp/workspace/FasterTransformer/src/fastertransformer/kernels/decoder_masked_multihead_attention_utils.h(1852): error: identifier "printf" is undefined

2 errors detected in the compilation of "/tmp/workspace/FasterTransformer/src/fastertransformer/kernels/unfused_attention_kernels.cu".

@maxhgerlach
Copy link

build failure with CUDA 11.8

Somehow the header isn't included in the .cu files to provide printf. A Work around to build with ENABLE_FP8: CUDAFLAGS="-include stdio.h" cmake ...

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.

3 participants