oneapi-src / level-zero

oneAPI Level Zero Specification Headers and Loader
https://spec.oneapi.com/versions/latest/elements/l0/source/index.html
MIT License
208 stars 90 forks source link

v1.15.1: Debs Prefix/Install Paths Appear to Be Wrong in Release Artifacts #128

Closed mschilling0 closed 9 months ago

mschilling0 commented 10 months ago

I tried using the provided debs, and they install in a strange place.

Using this: https://github.com/oneapi-src/level-zero/releases/download/v1.15.1/level-zero-devel_1.15.1+u22.04_amd64.deb dpkg-deb -c level-zero-devel_1.15.1+u22.04_amd64.deb

drwxrwxr-x root/root         0 2023-10-24 14:35 ./home/
drwxrwxr-x root/root         0 2023-10-24 14:35 ./home/********/
drwxrwxr-x root/root         0 2023-10-24 14:35 ./home/********/level-zero-loader/
drwxrwxr-x root/root         0 2023-10-24 14:35 ./home/********/level-zero-loader/build/
drwxrwxr-x root/root         0 2023-10-24 14:35 ./home/********/level-zero-loader/build/output/
drwxrwxr-x root/root         0 2023-10-24 14:35 ./home/********/level-zero-loader/build/output/include/
drwxrwxr-x root/root         0 2023-10-24 14:35 ./home/********/level-zero-loader/build/output/include/level_zero/
drwxrwxr-x root/root         0 2023-10-24 14:35 ./home/********/level-zero-loader/build/output/include/level_zero/layers/
-rw-r--r-- root/root      7485 2023-09-13 14:58 ./home/********/level-zero-loader/build/output/include/level_zero/layers/zel_tracing_api.h
-rw-r--r-- root/root      3411 2023-09-13 14:58 ./home/********/level-zero-loader/build/output/include/level_zero/layers/zel_tracing_ddi.h
-rw-r--r-- root/root     86895 2023-09-13 14:58 ./home/********/level-zero-loader/build/output/include/level_zero/layers/zel_tracing_register_cb.h
drwxrwxr-x root/root         0 2023-10-24 14:35 ./home/********/level-zero-loader/build/output/include/level_zero/loader/
-rw-r--r-- root/root      2070 2023-09-13 14:58 ./home/********/level-zero-loader/build/output/include/level_zero/loader/ze_loader.h
-rw-r--r-- root/root    731007 2023-10-24 14:34 ./home/********/level-zero-loader/build/output/include/level_zero/ze_api.h
-rw-r--r-- root/root     94452 2023-10-24 14:34 ./home/********/level-zero-loader/build/output/include/level_zero/ze_ddi.h
-rw-r--r-- root/root    416317 2023-10-24 14:34 ./home/********/level-zero-loader/build/output/include/level_zero/zes_api.h
-rw-r--r-- root/root     71286 2023-10-24 14:34 ./home/********/level-zero-loader/build/output/include/level_zero/zes_ddi.h
-rw-r--r-- root/root    116589 2023-10-24 14:34 ./home/********/level-zero-loader/build/output/include/level_zero/zet_api.h
-rw-r--r-- root/root     32618 2023-10-24 14:34 ./home/********/level-zero-loader/build/output/include/level_zero/zet_ddi.h
drwxrwxr-x root/root         0 2023-10-24 14:35 ./home/********/level-zero-loader/build/output/lib/
lrwxrwxrwx root/root         0 2023-10-24 14:35 ./home/********/level-zero-loader/build/output/lib/libze_loader.so -> libze_loader.so.1
lrwxrwxrwx root/root         0 2023-10-24 14:35 ./home/********/level-zero-loader/build/output/lib/libze_tracing_layer.so -> libze_tracing_layer.so.1
lrwxrwxrwx root/root         0 2023-10-24 14:35 ./home/********/level-zero-loader/build/output/lib/libze_validation_layer.so -> libze_validation_layer.so.1
drwxrwxr-x root/root         0 2023-10-24 14:35 ./home/********/level-zero-loader/build/output/lib/pkgconfig/
-rw-r--r-- root/root       284 2023-10-24 14:34 ./home/********/level-zero-loader/build/output/lib/pkgconfig/level-zero.pc
-rw-r--r-- root/root       309 2023-10-24 14:34 ./home/********/level-zero-loader/build/output/lib/pkgconfig/libze_loader.pc

However, installing and packaging from source seems to work inside my Docker container.

Thanks, Matt

eero-t commented 10 months ago

Indeed:

$ wget https://github.com/oneapi-src/level-zero/releases/download/v1.15.1/level-zero-devel_1.15.1+u22.04_amd64.deb
$ ar x level-zero-devel_1.15.1+u22.04_amd64.deb 
$ tar tvf data.tar.gz 
drwxrwxr-x root/root         0 2023-10-25 00:35 ./home/
drwxrwxr-x root/root         0 2023-10-25 00:35 ./home/scss_dev/
drwxrwxr-x root/root         0 2023-10-25 00:35 ./home/scss_dev/level-zero-loader/
drwxrwxr-x root/root         0 2023-10-25 00:35 ./home/scss_dev/level-zero-loader/build/
drwxrwxr-x root/root         0 2023-10-25 00:35 ./home/scss_dev/level-zero-loader/build/output/
drwxrwxr-x root/root         0 2023-10-25 00:35 ./home/scss_dev/level-zero-loader/build/output/include/
...

This appears to be a regression, as package for previous release is fine:

$ wget https://github.com/oneapi-src/level-zero/releases/download/v1.14.0/level-zero-devel_1.14.0+u22.04_amd64.deb
$ ar x level-zero-devel_1.14.0+u22.04_amd64.deb
$ tar tvf data.tar.gz 
drwxr-xr-x root/root         0 2023-08-30 20:56 ./usr/
drwxr-xr-x root/root         0 2023-08-30 20:56 ./usr/include/
drwxr-xr-x root/root         0 2023-08-30 20:56 ./usr/include/level_zero/
drwxr-xr-x root/root         0 2023-08-30 20:56 ./usr/include/level_zero/layers/
...

@nrspruit ?

nrspruit commented 9 months ago

Hello @eero-t ,

I have fixed the official artifacts posted to the release, please confirm. There was an issue in the CI infrastructure generating the files which has been addressed. Thank you for your time!

eero-t commented 9 months ago

Verified, file paths for packages attached to release notes are now fine: https://github.com/oneapi-src/level-zero/releases/tag/v1.15.1

@mschilling0 could you verify that the new packages work for you, and close this if they do?

PS. @nrspruit Please add some note about that to the release notes, e.g. something like this:

Update: File paths in the linked .deb packages have been corrected! (Earlier .deb packages used incorrect file paths, which could cause Level-Zero library loading failures.)

eero-t commented 9 months ago

@nrspruit I would also suggest some additional CI test for the produced packages, to catch issues like this.

Test could e.g. install produced packages in a non-cached container build (to avoid relying on pre-existing packages) and test that some minimal L0 tool from another project, can be built and run successfully with them.

mschilling0 commented 9 months ago

I changed my usage, but I tested this and it works.

Changed my Dockerfile (temporarily):

-    libigfxcmrt-dev \
-    level-zero-dev && \
-    rm -rf /var/apt/lists/*
+    libigfxcmrt-dev && \
+#    level-zero-dev && \
+    rm -rf /var/apt/lists/* && \
+    wget https://github.com/oneapi-src/level-zero/releases/download/v1.15.1/level-zero-devel_1.15.1+u22.04_amd64.deb && \
+    wget https://github.com/oneapi-src/level-zero/releases/download/v1.15.1/level-zero_1.15.1+u22.04_amd64.deb && \
+    dpkg -i *.deb

CMake configure results for PTI-SDK project...

-- Build type: Release
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Found Xpti: /opt/intel/oneapi/compiler/2024.0/lib/libxpti.a
-- Level Zero loader is found at /usr/lib/x86_64-linux-gnu/libze_loader.so
-- Looking for C++ include level_zero/ze_api.h
-- Looking for C++ include level_zero/ze_api.h - found
-- Looking for C++ include level_zero/zet_api.h
-- Looking for C++ include level_zero/zet_api.h - found
-- Looking for C++ include level_zero/zes_api.h
-- Looking for C++ include level_zero/zes_api.h - found
-- Looking for C++ include level_zero/layers/zel_tracing_api.h
-- Looking for C++ include level_zero/layers/zel_tracing_api.h - found
-- Found Python: /usr/bin/python3.10 (found version "3.10.12") found components: Interpreter
-- Level Zero headers are found at /usr/include
-- Level Zero headers are found at /usr/include
eero-t commented 9 months ago

Unless you need specific L0 version, I would suggest getting L0 packages from the same repo you get driver packages.

If you're using e.g. latest Fedora, Ubuntu or Debian testing, you should get (somewhat older) L0 packages from distro: https://github.com/oneapi-src/level-zero/issues/73#issuecomment-1357956650

Otherwise you can get them from Intel driver repositories: https://dgpu-docs.intel.com/installation-guides/index.html

(Package names differ between them though.)

mschilling0 commented 9 months ago

Unless you need specific L0 version, I would suggest getting L0 packages from the same repo you get driver packages.

If you're using e.g. latest Fedora, Ubuntu or Debian testing, you should get (somewhat older) L0 packages from distro: #73 (comment)

Otherwise you can get them from Intel driver repositories: https://dgpu-docs.intel.com/installation-guides/index.html

(Package names differ between them though.)

Understood. That's what I am doing now. I was attempting a minimal install of our build dependencies when I found this issue.