Skip to content

cleanup include ze_api.h #525

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
merged 1 commit into from
Jun 3, 2024

Conversation

bratpiorka
Copy link
Contributor

@bratpiorka bratpiorka commented May 28, 2024

Description

ze_api.h should be always:

  • included from the deps (build/_deps/level-zero-loader-***) for all internal code including tests
  • included from the system paths in the examples

Checklist

  • Code compiles without errors locally
  • All tests pass locally
  • CI workflows execute properly

@bratpiorka bratpiorka force-pushed the rrudnick_cleanup_ze_headers branch 4 times, most recently from 26219ae to 9100067 Compare May 28, 2024 11:06
@bratpiorka bratpiorka force-pushed the rrudnick_cleanup_ze_headers branch from 9100067 to 1de6066 Compare May 28, 2024 12:03
@bratpiorka bratpiorka marked this pull request as ready for review May 28, 2024 14:42
@bratpiorka bratpiorka requested a review from a team as a code owner May 28, 2024 14:42
Copy link
Contributor

@KFilipek KFilipek left a comment

Choose a reason for hiding this comment

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

If you plan to reorder headers, please, use Coding style guidelines.
As I remember, external headers should be in a separate block. Currently, they are mixed.
E.g. ze_api.h or mutex

@bratpiorka
Copy link
Contributor Author

If you plan to reorder headers, please, use Coding style guidelines. As I remember, external headers should be in a separate block. Currently, they are mixed. E.g. ze_api.h or mutex

We don't have strict coding style rules - we only have what's here: https://github.com/oneapi-src/unified-memory-framework/blob/main/CONTRIBUTING.md#code-style
But regarding the order - I keep the "standard" includes fist (), then UMF interface that is supposed to be installed (<umf/*>) and local includes at the end. In "test/providers/provider_level_zero.cpp" I threat "ze_api.h" as a local header, because it is downloaded by UMF to the _deps folder and I intentionally keep it with the other local files

@kswiecicki
Copy link
Contributor

If you plan to reorder headers, please, use Coding style guidelines. As I remember, external headers should be in a separate block. Currently, they are mixed. E.g. ze_api.h or mutex

From what I see, the ze_api.h header is treated as external in examples, and as internal in umf sources/tests. In case of examples, @bratpiorka mentioned it should come from system paths from the user.

@KFilipek KFilipek merged commit 5efb153 into oneapi-src:main Jun 3, 2024
69 checks passed
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.

4 participants