Skip to content

[SYCL] Fix compilation of joint_matrix_apply_two_matrices.cpp #13242

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 2 commits into from
Apr 2, 2024

Conversation

bader
Copy link
Contributor

@bader bader commented Apr 2, 2024

7fb3b20 replaces #include <sycl/sycl.hpp> to #include <sycl/detail/core.hpp> in common.hpp. core.hpp doesn't include usm.hpp, used in the header file modified by this patch.

intel@7fb3b20
replaces `#include <sycl/sycl.hpp>` to `#include <sycl/detail/core.hpp>`
in common.hpp. core.hpp doesn't include usm.hpp, used in the header file
modified by this patch.
@bader bader requested a review from a team as a code owner April 2, 2024 00:00
@bader bader temporarily deployed to WindowsCILock April 2, 2024 00:01 — with GitHub Actions Inactive
@bader bader temporarily deployed to WindowsCILock April 2, 2024 01:05 — with GitHub Actions Inactive
@bader
Copy link
Contributor Author

bader commented Apr 2, 2024

@intel/sycl-matrix-reviewers, please, review ASAP. The test this patch fixes fails in pre-commit check!

@@ -5,6 +5,9 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include <sycl/detail/core.hpp>
#include <sycl/usm.hpp>
Copy link
Contributor

@dkhaldi dkhaldi Apr 2, 2024

Choose a reason for hiding this comment

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

Matrix/joint_matrix_apply_two_matrices.cpp includes common.hpp that already has these definitions:
#include <sycl/detail/core.hpp>
#include <sycl/ext/oneapi/matrix/matrix.hpp>

I thought core.hpp includes usm.hpp
If not, please add `#include <sycl/usm.hpp> in common.hpp instead of this file.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it would be a good fix. The whole idea behind using fine-grained includes is not to spend time compiling code that isn't being used in the test. The fact that only a few tests fail without this include means that all the other tests don't need it and shouldn't spend time processing code in them.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree, usm.hpp include can be left in the test.
So you just need to remove the core.hpp include.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll remove core.hpp from this header, but it must include core.hpp as it uses "core" SYCL API as well.

The way matrix tests use common.hpp creates implicit dependency on "common.hpp", which is considered a bad practice. Please, fix this issue in a separate PR.

Copy link
Contributor

@dkhaldi dkhaldi left a comment

Choose a reason for hiding this comment

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

LGTM

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