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

Avoid -fsycl being added to non-SYCL code #777

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

thilinarmtb
Copy link
Collaborator

@thilinarmtb thilinarmtb commented Nov 21, 2024

Description

In the current development version, FindDPCPP.cmake adds -fsycl to the
host (one that is being used to compile OCCA) compiler. This results in compilation
errors if the host compiler doesn't support SYCL. There is no need for the host
compiler to support SYCL to use the OCCA SYCL backend. Users simply has to
set the following variables:

export OCCA_DPCPP_COMPILER=clang++
export OCCA_DPCPP_COMPILER_FLAGS="-fsycl -fsycl-targets=nvptx64-nvidia-cuda"

@thilinarmtb thilinarmtb changed the title Remove -fsycl getting added to non-SYCL code Avoid -fsycl being added to non-SYCL code Nov 21, 2024
@thilinarmtb thilinarmtb force-pushed the remove-sycl-flags-when-compiling-sycl branch from 04eb8d1 to ebfd9fb Compare November 21, 2024 20:15
@thilinarmtb thilinarmtb force-pushed the remove-sycl-flags-when-compiling-sycl branch from ebfd9fb to 20714a6 Compare November 21, 2024 20:54
set_target_properties(OCCA::depends::DPCPP PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${SYCL_INCLUDE_DIRS}"
INTERFACE_INCLUDE_DIRECTORIES "${SYCL_INCLUDE_DIR};${SYCL_INCLUDE_DIR}/sycl"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should we add ${SYCL_INCLUDE_DIR}/CL here as well?

@thilinarmtb thilinarmtb mentioned this pull request Nov 22, 2024
2 tasks
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.

1 participant