Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[unitrace] Do not fetch for 3rd party projects 1) at build stage, 2) if they are already installed

Aperta
#122 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cmake, git, python
Ambito
build-system

Direzione di ricerca

The fetch happens during the build step, and the reporter links tools/unitrace/CMakeLists.txt lines 96-97 as the place where it is triggered. Start there, then reproduce with the Dockerfile from the issue and watch for the 'Cloning into' lines. Done means third-party sources are fetched at configure time, existing system installs such as libze-dev are picked up first, and an option turns the fallback fetch off. The maintainers have not yet chosen the option name or the default behaviour.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

On:

Build stage fetches some 3rd party projects. For configuration I made (see below), these are:

  1. L0
  2. compute-runtime
#9 [6/7] RUN cd /opt/pti-gpu && cmake --build _build
<...>
#9 3.228 Cloning into '/opt/pti-gpu/_build/level-zero'...
#9 3.228 Note: switching to 'v1.32.0'.
#9 3.228
#9 3.228 You are in 'detached HEAD' state. You can look around, make experimental
#9 3.228 changes and commit them, and you can discard any commits you make in this
#9 3.228 state without impacting any branches by switching back to a branch.
#9 3.228
#9 3.228 If you want to create a new branch to retain commits you create, you may
#9 3.228 do so (now or later) by using -c with the switch command. Example:
#9 3.228
#9 3.228   git switch -c <new-branch-name>
#9 3.228
#9 3.228 Or undo this operation with:
#9 3.228
#9 3.228   git switch -
#9 3.228
#9 3.228 Turn off this advice by setting config variable advice.detachedHead to false
#9 3.228
#9 3.228 HEAD is now at d3b3efb Update to Level Zero Spec v1.17.24 (#492)
<...>
#9 13.16 Cloning into '/opt/pti-gpu/_build/compute-runtime'...
#9 13.16 Note: switching to '050536ff3b6f830199ec99cff8ffcac3d804c40a'.
#9 13.16
#9 13.16 You are in 'detached HEAD' state. You can look around, make experimental
#9 13.16 changes and commit them, and you can discard any commits you make in this
#9 13.16 state without impacting any branches by switching back to a branch.
#9 13.16
#9 13.16 If you want to create a new branch to retain commits you create, you may
#9 13.16 do so (now or later) by using -c with the switch command. Example:
#9 13.16
#9 13.16   git switch -c <new-branch-name>
#9 13.16
#9 13.16 Or undo this operation with:
#9 13.16
#9 13.16   git switch -
#9 13.16
#9 13.16 Turn off this advice by setting config variable advice.detachedHead to false
#9 13.16
#9 13.16 HEAD is now at 050536ff3b fix: honor uncached bias for shared handle imports

This breaks few expectations:

  1. In general, there should be no fetches on the build stage. Linux distro packaging policies are very strict about fetching in general and doing so on the build stage plus in the uncommon way (thru python scripts) greatly complicate things. Expectation is that fetching will be done on the configuration stage.
    https://github.com/intel/pti-gpu/blob/6c0d6b0b80c6dbac4b5902d9d5ade1c75b9e9033/tools/unitrace/CMakeLists.txt#L96-L97
  2. The existing setup completely ignores that the fetched components might have been already built and installed. Such as in my setup L0 is already there on the system. Expectation is that build system will check and pick up existing installations having a fallback to fetch if not found, the user must be able to turn fallback off.

Configuration and build example:

FROM ubuntu:26.10

RUN apt-get update && apt-get install -y --no-install-recommends \
    ca-certificates \
    cmake \
    dpclang-7 \
    git \
    libxptifw-dev \
    libze-dev \
    ocl-icd-opencl-dev \
    pkg-config \
    python3 \
    python3-dev \
    ninja-build && \
  rm -rf /var/lib/apt/lists/*

RUN cd /opt && git clone https://github.com/intel/pti-gpu.git
RUN cd /opt/pti-gpu && git reset --hard 6c0d6b0b80c6dbac4b5902d9d5ade1c75b9e9033

RUN cd /opt/pti-gpu && cmake -B _build -S . -G Ninja \
    -DBUILD_WITH_ITT=0 \
    -DBUILD_WITH_OMP=0 \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_C_COMPILER=dpclang \
    -DCMAKE_CXX_COMPILER=dpclang++ \
    -DCMAKE_INSTALL_PREFIX=/opt/install
RUN cd /opt/pti-gpu && cmake --build _build
RUN cd /opt/pti-gpu && cmake --install _build

CC: @mschilling0

Lingua principale
C++
Stelle
276
Fork
73
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di intel/pti-gpu

Tutte le issue di intel/pti-gpu

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.