intel / pti-gpu

Profiling Tools Interfaces for GPU (PTI for GPU) is a set of Getting Started Documentation and Tools Library to start performance analysis on Intel(R) Processor Graphics easily
MIT License
202 stars 57 forks source link

trouble building with intel/llvm #12

Closed cperkinsintel closed 3 years ago

cperkinsintel commented 3 years ago

I have the intel/llvm SYCL compiler setup, complete with its environment. It pulls down a LevelZeroLoader, so I was hoping to use that to build ze_tracer rather than a new installation of the Loader.

But despite putting my sycl_workspace/build/include/sycl on CPATH, or CMAKE_REQUIRE_INCLUDES, (and a few other options) the cmake setup for ze_tracer would never complete. It found the level_zero loader library easily enough, but the FindL0Headers macro always failed.

I finally just make sure the required path was on CPATH and then I commented out the body of FindL0Headers in the CMakeLists.txt file. It built fine after that and is running.

anton-v-gorshkov commented 3 years ago

Hi Chris, Preferable way to provide libs and headers to cmake is to use CMAKE_LIBRARY_PATH and CMAKE_INCLUDE_PATH variables. I've checked this with intel llvm compiler and it works fine for me:

$ cmake -DCMAKE_LIBRARY_PATH=<sycl_workspace>/build/lib/ -DCMAKE_INCLUDE_PATH=<sycl_workspace>/build/include/sycl/ ..

Please try this out.