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

Fix compiler warning: this use of defined may not be portable #842

Closed
wants to merge 1 commit into from

Conversation

li-plus
Copy link
Contributor

@li-plus li-plus commented May 28, 2024

I compile GGML library with -Wpedantic flag and get this warning (https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wexpansion-to-defined):

warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
  373 | #if FP16_AVAILABLE
      |     ^~~~~~~~~~~~~~

Fixed in this PR.

@ggerganov ggerganov requested a review from slaren May 28, 2024 11:45
@slaren
Copy link
Collaborator

slaren commented May 28, 2024

__CUDA_ARCH__ is only defined in device code, so this wouldn't work.

@li-plus
Copy link
Contributor Author

li-plus commented May 28, 2024

That's true. Is there another way to silence this warning?

@slaren
Copy link
Collaborator

slaren commented Jun 30, 2024

This should be fixed now.

@slaren slaren closed this Jun 30, 2024
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.

None yet

2 participants