Skip to content
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

Add sycl headers to bazel toolchain config for DPCPP through icx #2905

Merged

Conversation

david-cortes-intel
Copy link
Contributor

@david-cortes-intel david-cortes-intel commented Sep 19, 2024

Description

There is a step in the bazel test pipeline for //cpp/oneapi/dal:tests in which it probes the compiler for include paths of headers to add to the toolchain config:

def _preapre_builtin_include_directory_paths(repo_ctx, tools):

It does so by requesting the default paths from the compiler with this command:

<compiler> -E -xc++ - -v

In the case of DPCPP, this resolves to:

icx -E -xc++ - -v

By default, icx doesn't include sycl linkage, thus the command above does not return the paths of SYCL headers. Under the default icx factory settings, that leads to observing an error:

the source file 'cpp/oneapi/dal/algo/pca/test/serialization.cpp' includes the following non-builtin files with absolute paths (if these are builtin files, make sure these paths are in your toolchain):
  '/opt/intel/oneapi/compiler/2024.2/include/sycl/sycl.hpp'

This PR should address it by adding the necessary -fsycl flag when probing the compiler for its header paths.

@Alexandr-Solovev
Copy link
Contributor

/intelci: run

Copy link
Contributor

@Alexandr-Solovev Alexandr-Solovev left a comment

Choose a reason for hiding this comment

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

Overall looks good to me, I started private ci job with extended number of test cases via /intelci:run , lets wait the private job before merging

@david-cortes-intel david-cortes-intel merged commit f8a3953 into oneapi-src:main Sep 25, 2024
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dpc++ Issue/PR related to DPC++ functionality infra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants