Skip to content

[SYCL][NFC] Avoid warnings in SYCLSpecConstMaterializer and program_manager #14770

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

Merged

Conversation

steffenlarsen
Copy link
Contributor

@steffenlarsen steffenlarsen commented Jul 25, 2024

This commit avoids the following warnings in post-commit testing:

  • SYCLSpecConstMaterializer had a loop purely for debug printing. If NDEBUG is defined, the loop variable is unused, which causes a warning. To address this, the use of LLVM_DEBUG is moved to outside the full debug printing body.
  • In program_manager, debug printing now checks whether debug printing is enabled using if constexpr. This now means that getFormatStr is unused, which in turn causes a warning. This commit marks it as potentially unused to avoid this warning.

…anager

This commit avoids the following warnings in post-commit testing:
 * SYCLSpecConstMaterializer had a loop purely for debug printing. If
 NDEBUG is defined, the loop variable is unused, which causes a warning.
 To address this, we mask the debug printing with ifndef NDEBUG.
 * In program_manager, debug printing now checks whether debug printing
 is enabled using if constexpr. This now means that getFormatStr is
 unused, which in turn causes a warning. This commit marks it as
 potentially unused to avoid this warning.

Signed-off-by: Larsen, Steffen <[email protected]>
Signed-off-by: Larsen, Steffen <[email protected]>
Copy link
Contributor

@maarquitos14 maarquitos14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@steffenlarsen
Copy link
Contributor Author

steffenlarsen commented Jul 25, 2024

AMD failure appears to be an infrastructural issue. @intel/dpcpp-kernel-fusion-reviewers - Please have a look ASAP.

@jchlanda
Copy link
Contributor

@steffenlarsen steffenlarsen merged commit 47ea32a into intel:sycl Jul 25, 2024
14 of 15 checks passed
hdelan pushed a commit to hdelan/llvm that referenced this pull request Jul 26, 2024
…anager (intel#14770)

This commit avoids the following warnings in post-commit testing:
* SYCLSpecConstMaterializer had a loop purely for debug printing. If
`NDEBUG` is defined, the loop variable is unused, which causes a
warning. To address this, the use of `LLVM_DEBUG` is moved to outside
the full debug printing body.
* In program_manager, debug printing now checks whether debug printing
is enabled using `if constexpr`. This now means that `getFormatStr` is
unused, which in turn causes a warning. This commit marks it as
potentially unused to avoid this warning.

---------

Signed-off-by: Larsen, Steffen <[email protected]>
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.

5 participants