Repository navigation
Conversation
|
See my PR #545 as it address a lot of these issues. I had these fixes present as part of the Spec repo, but I hadn't ported them over yet. Caching, filtering etc.. was already part of the items. Though a few of these may still be interesting. |
build-quick.yml stages the ubuntu:24.04 Release install (loader and both layers) and a new advisory abicheck job compares it, as one directory, against ABI facts stored on the latest release. abicheck-baseline.yml records those facts (one zstd JSON asset, write-once) when a release is published or on dispatch. The job summary lists breaks, additions and removals per library. check-abi.yml is unchanged. Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Level Zero loader ABI checklast-release ( master ( If an ABI change is intended, a reviewer with write access can accept it: leave an approval review on the PR head commit with the keyword |
|
Thanks, #545 covers most of what I raised for Here is what abicheck still adds next to ABICC, measured on v1.33.1 → v1.34.0:
Two of these are real defects, not noise: the missing Still open on the abicheck side: the policy doesn't yet cover the offsets inside the aggregates or Glad to trim it further if you'd like only part of this, e.g. just the layer coverage and the export checks. |
Summary
Adds an advisory abicheck ABI scan next to the existing
check-abi.yml(abi-compliance-checker). No ABI finding fails the PR, andcheck-abi.ymlis unchanged. It reuses thebuild-quick.ymlRelease build instead of building the library again, and compares against ABI facts stored on the latest release instead of rebuilding the tag.build-quick.yml (pull_request) build-linux [ubuntu:22.04, ubuntu:24.04, ubi9] cmake Release, make, ctest + ubuntu:24.04 only: cmake --install → abi/{lib,include} # loader + 2 layers, no NULL driver + upload-artifact abicheck-inst + abicheck (needs: build-linux) + latest semver tag → gh release download level-zero.abicheck-bundle.json.zst + abicheck compare <stored facts> new/ # one directory compare, python 3.15t + --policy append_only_dispatch_tables, --suppress .github/abicheck-suppressions.yml + → job summary: Breaking / Added / Suppressed per library + full markdown report + → ::warning / ::notice annotations, JSON + markdown artifact +abicheck-baseline.yml (release published, or workflow_dispatch tag=…) + build the tag (same Release flags, ubuntu-24.04) → record facts → zstd (≈1.4 MB) + gh release upload, write-once (refuses to replace an existing asset) +.github/abicheck.yml # raises the decode limit for the stored facts (≈5M JSON nodes) +.github/abicheck-suppressions.yml # ZE_API_VERSION_CURRENT, same as #545's update_ze_api_version.pyBaseline: the PR compares against what shipped in the latest release, stored once per release as one asset. Until a release has that asset, the abicheck job only writes a note to the summary. To seed the current release:
gh workflow run abicheck-baseline.yml -f tag=v1.34.0.Relation to #545
#545 (merged) fixed the main ABICC false positives: it masks the
ZE_API_VERSION_CURRENTbump, downgrades the register/offset rules, pins ACC/abi-dumper, caches the base dump and adds theabi-failure-approvedoverride. With it, ABICC passes the #516 case. This PR does not overlap with that work. It now mirrors the CURRENT masking (a suppression file) and adds what ABICC still does not see: the two layers, offsets inside the_ze_dditable_t/_zes_dditable_taggregates,zelTracerResetAllCallbacks, and the leaked loader C++ exports.Rescan 2026-10-23 (level-zero master 746a50a, abicheck main ad964ac, Release, py3.15t)
append_only_dispatch_tablespolicyNO_CHANGE)The 42 that remain are 21 + 20 field-offset findings in the aggregates
_ze_dditable_t/_zes_dditable_t, which embed the sub-tables by value, plus 1 size finding in_zes_dditable_driver_t(1600→1728) that the policy pattern misses. abicheck/abicheck#1759 asks for the policy to cover both. Until then the scan stays advisory. All earlier abicheck issues from this PR (#1706, #1708–#1710, #1713–#1715) are fixed upstream.Comparison: abicheck vs. the current checker on v1.33.1 → v1.34.0 (before #545)
I ran both tools on the same two versions. For abi-compliance-checker I used this repo's
check-abi.ymlsteps in anubuntu:24.04container.check-abi.yml)libze_loaderonlyZE_API_VERSION_CURRENT1.18 → 1.19_ze_command_queue_dditable_t80→96 B,_zes_driver_dditable_t40→72 B_ze_dditable_t/_zes_dditable_taggregates: 41 field offsets moved, 3 sizeszelTracerResetAllCallbacksdeclared inlayers/zel_tracing_register_cb.hand in the tracing README, but implemented and exported nowhere (since at least v1.33.1)singleton_factory_t,object_t,error_state, hashtable instantiations)exported_not_public; more with a-gbuild)How to read this:
*_CURRENTbump. These are true layout facts, but by Level Zero's design they are not breaks: the tables only grow at the end, and everyzeGet*ProcAddrTablecall passes a version. That is why Update L0 Loader w/L0 Spec 1.19.12 #516 failedcheck-abi.ymland was merged anyway. Both checks stay advisory until a policy encodes that rule (requested upstream: Built-in policy for append-only tables (Level Zero / Vulkan dispatch tables) abicheck/abicheck#1709). This PR now uses the upstream policy for the table growth and suppresses only CURRENT.zelTracerResetAllCallbacksgap, the loader's leaked C++ internals, and anything in the two layers.-g) gives the same real findings as a-gdebug build. It loses only 2 duplicate field-type findings and someexported_not_publicdetail, so the existing CI build is enough.Evidence
Fork runs of this exact change. Test-only edits:
repository_ownerguards off, a push trigger, and the baseline built from v1.33.1 but attached to the v1.34.0 release, so the scan has a real diff. The test release and branch are deleted.Baseline (run 39726793297): green in 4 min 11 s. It attached
level-zero.abicheck-bundle.json.zst, 1.35 MB (133 MB uncompressed).Write-once (run 39727218419): a second baseline run fails with
level-zero.abicheck-bundle.json.zst already exists on v1.34.0 … delete it deliberately … to re-baseline, as intended.PR scan, 10-23 head (run 40000543542): all
build-quick.ymljobs green,abicheckjob 3 min 17 s. The policy matched 4 findings and the suppression 1 per library:BREAKINGBREAKINGBREAKINGThis table comes from a short jq step over the JSON, because the stored-facts markdown has no per-library counts. The full report still lists
zelTracerResetAllCallbacks. The earlier run of the first version (39729517766) showed 47.Interpreter:
actions/setup-pythoninstalls CPython 3.15.1t (free-threaded).actionlint1.7.7 passes on both workflow files (10-23 head).An earlier version of this PR built head, master and the tag separately (3 builds, 6 compare jobs). Results matched; this version drops the extra builds and the master comparison.
Merge Danger
Door: two-way
Four files: a new job in
build-quick.yml, a newabicheck-baseline.yml, a 5-line.github/abicheck.ymland a 6-line.github/abicheck-suppressions.yml.check-abi.ymlis untouched. Reverting removes the scan. The one lasting effect is the release assetlevel-zero.abicheck-bundle.json.zst. It is write-once, and a maintainer can delete it by hand.Blast Radius: CI-only
build-quick.ymlgains one job (about 3 min, after the Linux builds) and one install + upload step on the ubuntu:24.04 leg. The jobneeds: build-linux, so if any Linux leg fails, the scan is skipped.not_comparableand the job stays green. To fix that, re-record the baseline.abicheck-baseline.ymlholdscontents: write, scoped to its one job. It appends an unsigned asset to the release. If all release assets must be signed (.sig), that step needs signing or should stay manual.maincommit, not a release tag, to get the latest scanner; keep both workflows on the same pin. The Action installs its own CastXML from conda-forge.🤖 Generated with Claude Code