Skip to content

Conversation

aelovikov-intel
Copy link
Contributor

No description provided.

@aelovikov-intel
Copy link
Contributor Author

This is a follow-up for the discussion in #15437 (comment).

@@ -172,7 +172,7 @@ namespace __spirv {
// Helper function templates to initialize and get vector component from SPIR-V
// built-in variables
#define __SPIRV_DEFINE_INIT_AND_GET_HELPERS(POSTFIX) \
template <int ID> static size_t get##POSTFIX(); \
template <int ID> size_t get##POSTFIX(); \
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not related to the move, therefore should go in a separate PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is - if I move without this, the build fails. I'm not sure why warning isn't emitted without the move but that's not that important.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is a functional change.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure why warning isn't emitted without the move but that's not that important.

Kind of disagree. To see different diagnostics by just renaming the file sounds important to investigate.

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 think that would be a waste of time, so if that investigation is required for making the change in this PR, I'd rather focus on other things to do.

Copy link
Contributor

Choose a reason for hiding this comment

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

I checked it myself and it seems like a bug in sycl/test/warnings/warnings.cpp checks warnings only in sycl directory and ignores warnings from the headers located in other directories. Adding --no-system-header-prefix=CL to https://github.com/intel/llvm/blob/sycl/sycl/test/warnings/warnings.cpp#L1 reproduces the problem with existing file location.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In that case, the warning is legit and we have to fix it here. I don't think adding the option to the test is desirable because we want to move our headers out of CL/ instead. Also, we don't have control over OpenCL headers that reside there.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is a loophole in logic that defeats the purpose of the test. Headers from sycl/ include headers from CL/ and std/ directories, whereas test only checks for warnings in sycl/ directory. We can pass this test, but still have warnings in the code.

@aelovikov-intel
Copy link
Contributor Author

Reviewers, ping.

Copy link
Contributor

@PietroGhg PietroGhg left a comment

Choose a reason for hiding this comment

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

Native CPU lgtm, thank you

@aelovikov-intel
Copy link
Contributor Author

Reviewers ping: @intel/dpcpp-esimd-reviewers @intel/llvm-reviewers-cuda @intel/llvm-reviewers-runtime

@aelovikov-intel
Copy link
Contributor Author

Reviewers ping x3: @intel/llvm-reviewers-cuda @intel/llvm-reviewers-runtime

Copy link
Contributor

@uditagarwal97 uditagarwal97 left a comment

Choose a reason for hiding this comment

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

SYCL changes LGTM

Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me!

@aelovikov-intel aelovikov-intel merged commit b5f0191 into intel:sycl Oct 11, 2024
12 checks passed
@aelovikov-intel aelovikov-intel deleted the move__spirv branch October 11, 2024 14:30
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.

8 participants