Skip to content

Conversation

@mdtoguchi
Copy link
Contributor

Move the ability to add the SYCL headers into the SYCLInstallation class to better conform to existing usage for other toolchains. Also improve the toolchain access for adding the headers using a virtual function.

Move the ability to add the SYCL headers into the SYCLInstallation class
to better conform to existing usage for other toolchains.  Also improve
the toolchain access for adding the headers using a virtual function.
@mdtoguchi mdtoguchi requested a review from a team as a code owner September 5, 2024 16:19
Comment on lines 49 to 51
// ../include/sycl
// ../include/sycl/stl_wrappers
// ../include
Copy link
Contributor

Choose a reason for hiding this comment

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

@intel/llvm-reviewers-runtime, I suggest we remove the need for the driver to add 3 different locations for SYCL headers restricted by specific order. Considering that we expose only one header to the user API - sycl/sycl.hpp, the driver can include only one location and runtime library project can put everything into a single location or include from other locations. Right?

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 know about include/sycl vs include/, but the stl_wrappers path has to be added in the driver.

Copy link
Contributor

Choose a reason for hiding this comment

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

Are there any conflicts between the files in ../include/sycl/stl_wrappers and ../include?

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe maintainability benefits of having these headers in a separate dedicated folder outweigh the costs of having driver add one extra include path, if that's where you're going with your question.

Copy link
Contributor

Choose a reason for hiding this comment

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

What exactly is "maintainability benefits"? Note, these are directories of deployed compiler. We can still have separate directories in the sources code.

Copy link
Contributor

Choose a reason for hiding this comment

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

First, "smart" deploy is extra maintainability burden. Second, I want to be able to remove stl_wrappers from search path via manually modifying clang -cc1, merging them together with other includes would prevent that. I'm sure there are "third"/"fourth" if I were to think about it just a bit more.

@mdtoguchi
Copy link
Contributor Author

@intel/dpcpp-clang-driver-reviewers, please take a look - thanks!

@mdtoguchi
Copy link
Contributor Author

@intel/llvm-gatekeepers, this should be ready for merge - thanks!

CC1Args.push_back("-internal-isystem");
CC1Args.push_back(DriverArgs.MakeArgString(IncludePath));
void SYCLToolChain::AddSYCLIncludeArgs(const ArgList &DriverArgs,
ArgStringList &CC1Args) const {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this have the 'override' specifier?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AFAIK, the override is not needed for the function definition of the derived class, as the declaration states the override.

@mdtoguchi
Copy link
Contributor Author

Had to fix some conflicts, after update things are clean. @intel/llvm-gatekeepers can this be merged?

@martygrant martygrant merged commit fd229c2 into intel:sycl Oct 11, 2024
12 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.

6 participants