sycl-blas icon indicating copy to clipboard operation
sycl-blas copied to clipboard

Autotuner Build fails

Open chsasank opened this issue 1 year ago • 3 comments

Hi,

I have been trying to build autotuner but CMake fails with following error.

Command I used:

cmake -GNinja .. -DSYCL_COMPILER=dpcpp -DDPCPP_SYCL_TARGET=spir64 -DTUNING_TARGET=INTEL_GPU -DCMAKE_BUILD_TYPE=Release

Error:

CMake Error in tools/auto_tuner/CMakeLists.txt:                                                                                                                                                                    
  Imported target "DPCPP::DPCPP" includes non-existent path                                                                                                                                                        
                                                                                                                                                                                                                   
    "/opt/intel/oneapi/2024.0/bin/compiler/../include/sycl"                                                                                                                                                        

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in tools/auto_tuner/CMakeLists.txt:
  Imported target "DPCPP::DPCPP" includes non-existent path

    "/opt/intel/oneapi/2024.0/bin/compiler/../include/sycl"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.

sycl headers are at /opt/intel/oneapi/2024.0/include/sycl/ in my system.

I got response on discourse (https://support.codeplay.com/t/how-to-build-portblas-for-intel-gpus/667/7) that this is an issue with portBLAS cmake with oneapi changes b/w 2023.x and 2024.x

chsasank avatar Feb 27 '24 13:02 chsasank

Hi @chsasank Thank you for your interest in using portBLAS. Could you please try and see if the following changes work for you or not? Thanks.

diff --git a/cmake/Modules/FindDPCPP.cmake b/cmake/Modules/FindDPCPP.cmake
index f8eec16..78175ad 100644
--- a/cmake/Modules/FindDPCPP.cmake
+++ b/cmake/Modules/FindDPCPP.cmake
@@ -58,12 +58,14 @@ if(UNIX)
     INTERFACE_COMPILE_OPTIONS "${DPCPP_FLAGS}"
     INTERFACE_LINK_OPTIONS "${DPCPP_FLAGS}"
     INTERFACE_LINK_LIBRARIES ${DPCPP_LIB_DIR}
-    INTERFACE_INCLUDE_DIRECTORIES "${DPCPP_BIN_DIR}/../include/sycl")
+    INTERFACE_INCLUDE_DIRECTORIES "${DPCPP_BIN_DIR}/../include/sycl"
+    INTERFACE_INCLUDE_DIRECTORIES "${DPCPP_BIN_DIR}/../../include/sycl")
 else()
   set_target_properties(DPCPP::DPCPP PROPERTIES
     INTERFACE_COMPILE_OPTIONS "${DPCPP_FLAGS}"
     INTERFACE_LINK_LIBRARIES ${DPCPP_LIB_DIR}
-    INTERFACE_INCLUDE_DIRECTORIES "${DPCPP_BIN_DIR}/../include/sycl")
+    INTERFACE_INCLUDE_DIRECTORIES "${DPCPP_BIN_DIR}/../include/sycl"
+    INTERFACE_INCLUDE_DIRECTORIES "${DPCPP_BIN_DIR}/../../include/sycl")
 endif()
 
 if (${DPCPP_SYCL_TARGET} STREQUAL "nvptx64-nvidia-cuda")

Side note: clang++ is going to get deprecated soon in the future oneAPI toolkit releases, for more information you can check the README file inside /opt/intel/oneapi/2024.0/bin/compiler/README.txt on your system.

muhammad-tanvir-1211 avatar Feb 27 '24 17:02 muhammad-tanvir-1211

It works with your patch!

Side note: clang++ is going to get deprecated soon in the future oneAPI toolkit releases, for more information you can check the README file inside /opt/intel/oneapi/2024.0/bin/compiler/README.txt on your system.

I just followed your readme. Happy to make a PR with change to icpx if that's the recommended way to build.

chsasank avatar Feb 29 '24 02:02 chsasank

We would rather not update the readme, for now, to change the preferred compiler to icpx instead of clang++. icpx is a closed source release compiler shipped with the oneAPI toolkit, whereas clang++ is available with the nightly releases and when compiling llvm from source. So the preference would still be clang++ as it is opensource.

muhammad-tanvir-1211 avatar Mar 04 '24 09:03 muhammad-tanvir-1211

Hi @chsasank, it looks like we solved this issue. Is it ok to you if I close it? Thank you.

s-Nick avatar Apr 22 '24 14:04 s-Nick

Sure thanks

chsasank avatar Apr 22 '24 14:04 chsasank