Skip to content

Comments

[DFT] Add more warning flags #290

Merged
anantsrivastava30 merged 6 commits intouxlfoundation:developfrom
Rbiessy:dev/warnings
Apr 20, 2023
Merged

[DFT] Add more warning flags #290
anantsrivastava30 merged 6 commits intouxlfoundation:developfrom
Rbiessy:dev/warnings

Conversation

@Rbiessy
Copy link
Contributor

@Rbiessy Rbiessy commented Mar 7, 2023

Description

This PR builds on #259.

Fix warnings when compiling the DFT domain with some warning flags:
-Wall -Wextra -Wshadow -Wconversion -Wpedantic.
The same warnings can be added to more domains if desired.

As part of fixes the warnings this also splits the DFT descriptor tests
as the device was not needed for some of them.

Checklist

All Submissions

  • Do all unit tests pass locally? Attach a log.
  • Have you formatted the code using clang-format?

New interfaces

  • Have you provided motivation for adding a new feature as part of RFC and
    it was accepted? # (RFC)
  • What version of oneAPI spec the interface is targeted?
  • Complete New features checklist

New features

  • Have you provided motivation for adding a new feature?
  • Have you added relevant tests?

Bug fixes

  • Have you added relevant regression tests?
  • Have you included information on how to reproduce the issue (either in a
    GitHub issue or in this PR)?

@Rbiessy
Copy link
Contributor Author

Rbiessy commented Mar 7, 2023

Tests log: tests_log.txt
Specific DFT test logs with the descriptor tests split: test_dft_log.txt
Note the lapack failures are not related to these changes and the DFT example is expected to fail with the CPU backend with #259 as it is not supported yet.

Copy link
Contributor

@FMarno FMarno left a comment

Choose a reason for hiding this comment

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

Looks pretty good.

@Rbiessy
Copy link
Contributor Author

Rbiessy commented Mar 8, 2023

I have reworded the first commit description.
Logs after re-running the descriptor tests: test_dft_descriptor_log.txt

Rbiessy and others added 6 commits March 17, 2023 10:57
Fix warnings when compiling the DFT domain with some warning flags:
-Wall -Wextra -Wshadow -Wconversion -Wpedantic
The same warnings can be added to more domains if desired.
Co-authored-by: HJA Bird <9040797+hjabird@users.noreply.github.com>
@lhuot
Copy link
Contributor

lhuot commented Apr 19, 2023

Tests log: tests_log.txt Specific DFT test logs with the descriptor tests split: test_dft_log.txt Note the lapack failures are not related to these changes and the DFT example is expected to fail with the CPU backend with #259 as it is not supported yet.

I see 5952 - dft/EXAMPLE/RT/real_fwd_usm/cpu (Failed)
in the test log. I thought we disabled the DFT test on CPU. Why is this still running?

@lhuot
Copy link
Contributor

lhuot commented Apr 19, 2023

I think it would be good to be consistent across all domains for the warning flag used. It can be done in separate PR though.
@mkrainiuk @aelizaro @mmeterel do you agree with the general idea of using those warning flag?

@Rbiessy
Copy link
Contributor Author

Rbiessy commented Apr 19, 2023

Tests log: tests_log.txt Specific DFT test logs with the descriptor tests split: test_dft_log.txt Note the lapack failures are not related to these changes and the DFT example is expected to fail with the CPU backend with #259 as it is not supported yet.

I see 5952 - dft/EXAMPLE/RT/real_fwd_usm/cpu (Failed) in the test log. I thought we disabled the DFT test on CPU. Why is this still running?

The log is older, we only recently disabled the DFT tests for the CPU backend. It's not a risk here anyway.

@mkrainiuk
Copy link
Contributor

I think it would be good to be consistent across all domains for the warning flag used. It can be done in separate PR though. @mkrainiuk @aelizaro @mmeterel do you agree with the general idea of using those warning flag?

I think it's a good practice to build without any warnings, so I agree with this idea. And we can add this flags to other domains after fixing all problems if we have any.

@lhuot
Copy link
Contributor

lhuot commented Apr 20, 2023

@Rbiessy please let me know if you'd still like to make some changes here or if I can merge this PR. Thanks!

@Rbiessy
Copy link
Contributor Author

Rbiessy commented Apr 20, 2023

@Rbiessy please let me know if you'd still like to make some changes here or if I can merge this PR. Thanks!

Yes I am happy to see this merged once all the conversations are resolved, thanks!

Note that we should make sure future PRs in the DFT domain don't create warnings.

@anantsrivastava30 anantsrivastava30 merged commit dc22279 into uxlfoundation:develop Apr 20, 2023
@Rbiessy Rbiessy deleted the dev/warnings branch April 20, 2023 10:25
normallytangent pushed a commit to normallytangent/oneMKL that referenced this pull request Aug 6, 2024
* [DFT] Add more warning flags

Fix warnings when compiling the DFT domain with some warning flags:
-Wall -Wextra -Wshadow -Wconversion -Wpedantic
The same warnings can be added to more domains if desired.

* Revert descriptor test changes

* Remove copyright date

Co-authored-by: HJA Bird <9040797+hjabird@users.noreply.github.com>

* Fix recent warnings

* Fix reference

---------

Co-authored-by: HJA Bird <9040797+hjabird@users.noreply.github.com>
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.

6 participants