From 0cd7b350b3ef574f0fdfa9355d8bbe34cc52e78c Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Tue, 9 Nov 2021 14:29:36 -0600 Subject: [PATCH] Replaced uses of clang compiler with icx executable (#665) --- README.md | 2 +- docs/docfiles/user_guides/QuickStart.rst | 4 ++-- dpctl-capi/cmake/modules/FindIntelSycl.cmake | 2 +- dpctl-capi/dbg_build.bat | 2 +- dpctl-capi/dbg_build.sh | 2 +- examples/cython/sycl_buffer/README.md | 2 +- examples/cython/usm_memory/README.md | 2 +- scripts/build_backend.py | 4 ++-- scripts/build_for_develop.bat | 4 ++-- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 8f80dda7d2..ffe86c24ee 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ Examples of building Cython extensions with DPC++ compiler, that interoperate with `dpctl` can be found in folder `cython`. Each example in `cython` folder can be built using -`CC=clang CXX=dpcpp python setup.py build_ext --inplace`. +`CC=icx CXX=dpcpp python setup.py build_ext --inplace`. Please refer to `run.py` script in respective folders to execute extensions. Running Tests diff --git a/docs/docfiles/user_guides/QuickStart.rst b/docs/docfiles/user_guides/QuickStart.rst index f19af4d527..dcfede3bba 100644 --- a/docs/docfiles/user_guides/QuickStart.rst +++ b/docs/docfiles/user_guides/QuickStart.rst @@ -208,7 +208,7 @@ After setting up dpctl you can try out the Python examples as follows: The dpctl repository also provides a set of examples of building Cython extensions with DPC++ compiler, that interoperate with dpctl. These examples are located under *examples/cython*. Each example in the folder can be built using -``CC=clang CXX=dpcpp python setup.py build_ext --inplace``. Please refer to +``CC=icx CXX=dpcpp python setup.py build_ext --inplace``. Please refer to ``run.py`` script in respective folders to execute the Cython extension examples. @@ -252,7 +252,7 @@ library. -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \ -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} \ -DDPCPP_INSTALL_DIR=${DPCPP_ROOT} \ - -DCMAKE_C_COMPILER:PATH=${DPCPP_ROOT}/bin/clang \ + -DCMAKE_C_COMPILER:PATH=${DPCPP_ROOT}/bin/icx \ -DCMAKE_CXX_COMPILER:PATH=${DPCPP_ROOT}/bin/dpcpp \ -DDPCTL_ENABLE_LO_PROGRAM_CREATION=ON \ -DDPCTL_BUILD_CAPI_TESTS=ON \ diff --git a/dpctl-capi/cmake/modules/FindIntelSycl.cmake b/dpctl-capi/cmake/modules/FindIntelSycl.cmake index dfc093de44..639e5c4328 100644 --- a/dpctl-capi/cmake/modules/FindIntelSycl.cmake +++ b/dpctl-capi/cmake/modules/FindIntelSycl.cmake @@ -63,7 +63,7 @@ else() endif() # We will extract the version information from the compiler -set(clangxx_cmd "${IntelSycl_ROOT}/bin/clang++") +set(clangxx_cmd "${CMAKE_CXX_COMPILER}") set(clangxx_arg "--version") # Check if dpcpp is available diff --git a/dpctl-capi/dbg_build.bat b/dpctl-capi/dbg_build.bat index 23e8a97097..8149088ed9 100644 --- a/dpctl-capi/dbg_build.bat +++ b/dpctl-capi/dbg_build.bat @@ -26,7 +26,7 @@ cmake -G Ninja ^ "-DCMAKE_INSTALL_PREFIX=%INSTALL_PREFIX%" ^ "-DCMAKE_PREFIX_PATH=%INSTALL_PREFIX%" ^ "-DDPCPP_INSTALL_DIR=%DPCPP_HOME%" ^ - "-DCMAKE_C_COMPILER:PATH=%DPCPP_HOME%\bin\clang-cl.exe" ^ + "-DCMAKE_C_COMPILER:PATH=%DPCPP_HOME%\bin\icx.exe" ^ "-DCMAKE_CXX_COMPILER:PATH=%DPCPP_HOME%\bin\dpcpp.exe" ^ "-DCMAKE_LINKER:PATH=%DPCPP_HOME%\bin\lld-link.exe" ^ "-DDPCTL_BUILD_CAPI_TESTS=ON" ^ diff --git a/dpctl-capi/dbg_build.sh b/dpctl-capi/dbg_build.sh index 958a4f8ee3..5b91001240 100755 --- a/dpctl-capi/dbg_build.sh +++ b/dpctl-capi/dbg_build.sh @@ -9,7 +9,7 @@ rm -rf ${INSTALL_PREFIX} cmake \ -DCMAKE_BUILD_TYPE=Debug \ - -DCMAKE_C_COMPILER=clang \ + -DCMAKE_C_COMPILER=icx \ -DCMAKE_CXX_COMPILER=dpcpp \ -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \ -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} \ diff --git a/examples/cython/sycl_buffer/README.md b/examples/cython/sycl_buffer/README.md index 870303bcec..f02b58d1c3 100644 --- a/examples/cython/sycl_buffer/README.md +++ b/examples/cython/sycl_buffer/README.md @@ -14,7 +14,7 @@ Example illustrates compiling SYCL extension, linking to oneMKL. ``` # make sure oneAPI is activated, $ONEAPI_ROOT must be set -CC=clang CXX=dpcpp python setup.py build_ext --inplace +CC=icx CXX=dpcpp python setup.py build_ext --inplace ``` diff --git a/examples/cython/usm_memory/README.md b/examples/cython/usm_memory/README.md index 0f17a77dba..300e4464a8 100644 --- a/examples/cython/usm_memory/README.md +++ b/examples/cython/usm_memory/README.md @@ -8,7 +8,7 @@ Make sure oneAPI is activated. Environment variable `$ONEAPI_ROOT` must be set. ``` -$ CC=clang CXX=dpcpp LD_SHARED="dpcpp -shared" \ +$ CC=icx CXX=dpcpp LD_SHARED="dpcpp -shared" \ CXXFLAGS=-fno-sycl-early-optimizations python setup.py build_ext --inplace ``` diff --git a/scripts/build_backend.py b/scripts/build_backend.py index 4f26951d5b..6b705a4341 100644 --- a/scripts/build_backend.py +++ b/scripts/build_backend.py @@ -86,7 +86,7 @@ def build_backend( "-DDPCTL_DPCPP_HOME_DIR=" + DPCPP_ROOT, "-DDPCTL_DPCPP_FROM_ONEAPI=ON", "-DCMAKE_C_COMPILER:PATH=" - + os.path.join(DPCPP_ROOT, "bin", "clang"), + + os.path.join(DPCPP_ROOT, "bin", "icx"), "-DCMAKE_CXX_COMPILER:PATH=" + os.path.join(DPCPP_ROOT, "bin", "dpcpp"), ] @@ -164,7 +164,7 @@ def build_backend( "-DDPCTL_DPCPP_HOME_DIR=" + DPCPP_ROOT, "-DDPCTL_DPCPP_FROM_ONEAPI=ON", "-DCMAKE_C_COMPILER:PATH=" - + os.path.join(DPCPP_ROOT, "bin", "clang-cl.exe"), + + os.path.join(DPCPP_ROOT, "bin", "icx.exe"), "-DCMAKE_CXX_COMPILER:PATH=" + os.path.join(DPCPP_ROOT, "bin", "dpcpp.exe"), ] diff --git a/scripts/build_for_develop.bat b/scripts/build_for_develop.bat index 17c4fe1e70..0273a9d62a 100644 --- a/scripts/build_for_develop.bat +++ b/scripts/build_for_develop.bat @@ -31,7 +31,7 @@ cmake -G Ninja ^ "-DCMAKE_INSTALL_PREFIX=%INSTALL_PREFIX%" ^ "-DCMAKE_PREFIX_PATH=%INSTALL_PREFIX%" ^ "-DDPCPP_ROOT=%DPCPP_ROOT%" ^ - "-DCMAKE_C_COMPILER:PATH=%DPCPP_ROOT%\bin\clang-cl.exe" ^ + "-DCMAKE_C_COMPILER:PATH=%DPCPP_ROOT%\bin\icx.exe" ^ "-DCMAKE_CXX_COMPILER:PATH=%DPCPP_ROOT%\bin\dpcpp.exe" ^ "-DBUILD_CAPI_TESTS=%_BUILD_CAPI_TEST%" ^ "%cd%\..\dpctl-capi" @@ -57,7 +57,7 @@ xcopy dpctl-capi\include dpctl\include /E /Y REM required by _sycl_core(dpctl) set "DPCTL_SYCL_INTERFACE_LIBDIR=dpctl" set "DPCTL_SYCL_INTERFACE_INCLDIR=dpctl\include" -set "CC=clang-cl.exe" +set "CC=icx.exe" set "CXX=dpcpp.exe" python setup.py clean --all