[unitrace] Do not fetch for 3rd party projects 1) at build stage, 2) if they are already installed
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- cmake, git, python
- Domain
- build-system
Research direction
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.
Written by the indexing model from the issue text.
Description
On:
Build stage fetches some 3rd party projects. For configuration I made (see below), these are:
- L0
- 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:
- 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 - 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
- Dominant language
- C++
- Stars
- 276
- Forks
- 73
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from intel/pti-gpu
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
-
Difficulty 3/5 1-2 days Newbie friendliness 50/100
-
Difficulty 3/5 Half a day Newbie friendliness 45/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
521xueweihan/HelloGitHub#4011 ·
-
docs(simulation): Quickstart publishes UDP 14550, which the SITL images' own docs say not to doOpenstatus:needs-triage
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
PX4/PX4-Autopilot#29292 · 1 comment ·
Maintainers usually reply within 1 day
-
I/O internal correctness medium priority rt_lib
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Mac mini M6 (16 GB): Q2_0 streaming works - measured 11.7->27.2 tok/s + arena fix for sub-32 GB MacsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day