compute-runtime
compute-runtime copied to clipboard
IGSC detection
Adding IGSC (Intel(R) Graphics System Controller Firmware Update Library (IGSC FU)) (https://github.com/intel/igsc) sources to the same directory level as compute runtime, results in CMake picking up config from the sources instead of install location which results in this error.
CMake Error at /tmp/intel-gpu-umd/driver/igsc/lib/cmake/igscConfig.cmake:3 (include):
include could not find requested file:
/tmp/intel-gpu-umd/driver/igsc/lib/cmake/igscTargets.cmake
Call Stack (most recent call first):
level_zero/CMakeLists.txt:82 (find_package)
It also seems the IGSC include directory is hardcoded in level_zero/CMakeLists.txt making it non-configurable.
How can one specify the location of the IGSC install directory?
@servesh it seems we haven't documented this properly and there's something missing in igsc. NEO assumes dependencies to be in the same workspace as compute-runtime repo. Please see if following steps help:
# create workspace
mkdir ~/compute-runtime-workspace
cd ~/compute-runtime-workspace
# Instructions from https://github.com/intel/igsc
git clone https://github.com/intel/igsc.git
cd igsc
cmake -DSYSLOG:BOOL=OFF -DCMAKE_BUILD_TYPE=Release -G Ninja -S . -B build
meson setup build
meson configure -Dsyslog=true build
ninja -v -C build/
# this is the step that seems to be missing in igsc repo
find ../ -name "igscTargets.cmake" -type f | head -n 1 | xargs -IFILE cp FILE ./lib/cmake/
# download/install other dependencies
# now compute-runtime
cd ../
git clone https://github.com/intel/compute-runtime.git
cd compute-runtime
mkdir build
cd build
cmake ../
# and you should see the igsc found
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
...
-- igsc Library headers directory: /home/user/compute-runtime-workspace/igsc/include
-- igsc version:
-- Prebuilt kernels are linked to Level Zero.
-- default igsc version:
-- default igsc version:
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/compute-runtime-workspace/compute-runtime/build
@jandres742 It still looks like in your configure igsc version isn't detected. I find that if someone installs igsc, then the above would basically still not work.
This is what I do,
git clone https://github.com/intel/igsc.git
cd igsc
cmake -DCMAKE_BUILD_TYPE=$BUILDTYP -DCMAKE_INSTALL_PREFIX=$DEPLOY_DIR/driver -S . -B $DRIVER_BUILD_DIR -G Ninja -Wno-dev
cmake --build $DRIVER_BUILD_DIR --parallel $NPROC
cmake --install $DRIVER_BUILD_DIR
Then set appropriate env for auto detection of pkgconfig/lib path.
export INCLUDE=$DEPLOY_DIR/driver/include:$INCLUDE
export CMAKE_PREFIX_PATH=$DEPLOY_DIR/driver/share/cmake:$DEPLOY_DIR/driver/share:$DEPLOY_DIR/driver/lib/cmake:$DEPLOY_DIR/driver/lib:$DEPLOY_DIR/driver/lib64/cmake:$DEPLOY_DIR/driver/lib64:$CMAKE_PREFIX_PATH
export LD_LIBRARY_PATH=$DEPLOY_DIR/driver/lib64:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=$DEPLOY_DIR/driver/lib64/pkgconfig:$PKG_CONFIG_PATH
Finally, build the driver,
cmake -DCMAKE_BUILD_TYPE=$BUILDTYP -DCMAKE_INSTALL_PREFIX=$DEPLOY_DIR/driver -DIGC_DIR=$DEPLOY_DIR/compiler -DLEVEL_ZERO_ROOT=$DEPLOY_DIR/driver -DLevelZero_INCLUDE_DIR=$DEPLOY_DIR/driver/include -DMETRICS_DISCOVERY_DIR=$DEPLOY_DIR/driver -DMETRICS_LIBRARY_DIR=$DEPLOY_DIR/driver -DGMM_DIR=$DEPLOY_DIR/driver -DIGSC_DIR=$DEPLOY_DIR/driver -DOCL_ICD_VENDORDIR=$DEPLOY_DIR/OpenCL/vendor -DNEO_ENABLE_i915_PRELIM_DETECTION=ON -DSUPPORT_XE_HP_CORE=ON -DSUPPORT_XE_HP_SDV=ON -DSUPPORT_PVC=ON -DNEO_SKIP_UNIT_TESTS=OFF -S ./intel-compute-runtime -B $DRIVER_BUILD_DIR -G Ninja -Wno-dev
cmake --build $DRIVER_BUILD_DIR --parallel $NPROC
cmake --install $DRIVER_BUILD_DIR
I also have this patch to add IGSC detection. 0001-Propose-fixes-for-missing-IGSC-detection.txt
I was expecting something similar to other third_party dependency detection that NEO does.