You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Building with oneAPI for non-standard compiler installation #480
For the default value of --sycl-compiler-prefix option to develop/install setup commands we require ONEAPI_ROOT and do not set DPCTL_CUSTOM_DPCPP_INSTALL_DIR.
The logic is all built assuming that setting DPCTL_CUSTOM_DPCPP_INSTALL_DIR signals use of custom-built DPC++ toolchain.
When oneAPI compiler bits are installed into Python environment, we can not use ONEAPI_ROOT, since compiler's location is no longer ${ONEAPI_ROOT}/compiler/latest/linux but ${CONDA_PREFIX} instead, and must rely on --sycl-compiler-prefix which sets DPCTL_CUSTOM_DPCPP_INSTALL_DIR and CMake script starts assuming that we build with OS DPC++ toolchain.
I propose the following: in FindIntelSycl.cmake the option DPCTL_CUSTOM_DPCPP_INSTALL_DIR should only indicate the compiler root that may or may not be a oneAPI installation. We rename it to DPCTL_DPCPP_HOME_DIR
Next we add another CMake option: DPCTL_DPCPP_FROM_ONEAPI=ON that will indicate that the DPCTL_DPCPP_HOME_DIR is a oneAPI install. For using a truly custom Intel Sycl compiler, we will need to set DPCTL_DPCPP_FROM_ONEAPI=OFF.
Activity
[-]Building with oneAPI without ONEAPI_ROOT[/-][+]Building with oneAPI for non-standard compiler installation[/+]diptorupd commentedon May 27, 2021
I propose the following: in
FindIntelSycl.cmakethe optionDPCTL_CUSTOM_DPCPP_INSTALL_DIRshould only indicate the compiler root that may or may not be a oneAPI installation. We rename it toDPCTL_DPCPP_HOME_DIRNext we add another CMake option:
DPCTL_DPCPP_FROM_ONEAPI=ONthat will indicate that theDPCTL_DPCPP_HOME_DIRis a oneAPI install. For using a truly custom Intel Sycl compiler, we will need to setDPCTL_DPCPP_FROM_ONEAPI=OFF.oleksandr-pavlyk commentedon May 27, 2021
I like the renaming idea. In #481 I implemented detection of oneAPI by matching for "dpcpp" in
${CMAKE_CXX_COMPILER}.diptorupd commentedon May 27, 2021
We will need to add a setup.py option too to setup the flag to indicate we use custom compiler.
oleksandr-pavlyk commentedon May 27, 2021
In FindIntelSycl we query clang or dpcpp to query version. We can drop this branching.
clang --versionwill give the right version. In oneAPI:In DPC++ toolchain:
oleksandr-pavlyk commentedon May 27, 2021
The only other branching is the minimum version we require.
oleksandr-pavlyk commentedon May 27, 2021
Implemented in both
DPCTL_DPCPP_HOME_DIRandDPCTL_DPCPP_FROM_ONEAPIin #481