Repository navigation
Report whether the PoCL CPU device can execute kernels - #1000
ChrisRackauckas wants to merge 1 commit into
Conversation
Check the selected device for native SPIR-V and host kernel support. Report device unavailability to callers and preserve explicit launch errors. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Codex <noreply@openai.com> Agent-Harness: Codex Desktop 0.171.0-alpha.13.2 Agent-Model: gpt-6.2-astra Agent-Session: local session 01a221ab-aa0b-74d0-9a86-159c89e87d2c (no session URL)
The complete Julia 1.13.4 package test on Linux arm64 exited 0 with 12,932 main-process assertions and 47 subprocess assertions. The six capability checks also passed on native Linux x86_64 and i686. On the i686 device the released backend reported that it could execute kernels even though the device advertised no SPIR-V intermediate language. With this change the backend reports that condition to callers. Links
🤖 Posted by an AI agent — harness: Codex Desktop 0.171.0-alpha.13.2 · model: gpt-6.2-astra |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1000 +/- ##
==========================================
- Coverage 90.79% 89.61% -1.19%
==========================================
Files 33 33
Lines 3293 3005 -288
==========================================
- Hits 2990 2693 -297
- Misses 303 312 +9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Report whether the selected PoCL device can execute SPIR-V host kernels when a caller asks
KernelAbstractions.functional(CPU()). This lets callers such as NNlib use their Julia implementation when the driver has no usable device or its device has no supported intermediate language.Reproduction and verification
On native i686 Julia 1.13.4 with KernelAbstractions 0.10.9 and the registered PoCL artifact, the driver reported an empty
CL_DEVICE_IL_VERSIONand nocl_khr_il_programextension. A separate process reportedKernelAbstractions.functional(CPU()) == true. The corrected predicate returnedfalsefor that same device.On Linux arm64 with Julia 1.13.4 and the registered GPUCompiler 2.25.0, the six functionality checks passed. These cover device availability, an explicit failed launch and OpenCL reference counts after two forced subdevice failures. An actual PoCL kernel returned
Float32[1, 2, 3, 4]on the available device. Executing the positive test also reproduced thecl_boolerror in the device availability accessor before its fix.I ran the package's Aqua checks and built the documentation with its strict
docs/make.jl. The package QA assertions passed 12/12 and the documentation build exited 0. The package's PoCL session tests also passed 47/47 on an available device. Runic and the spelling check over the diff passed. The whole-file spelling scan reported the same existing identifiers on the base and candidate.On native Linux arm64 Julia 1.13.4, a fresh positive-device precompile recorded
precompiled_launch[] == true. The fulljulia --project=. -e 'using Pkg; Pkg.test()'then exited 0. Its main process reported 12,932 passes and its PoCL session subprocess reported 47 more. These include 8,739 KernelInterface assertions, 2,826 CPU backend assertions and all ten Enzyme assertions. On native Linux x86_64 and i686 the six targeted capability assertions also passed.All 17 jobs in the hosted CI-KA run passed, including the Julia/OS matrix, multi-threaded tests, KernelInterface checks and documentation. The separate Runic job also passed. Codecov reported 97.56% patch coverage and a red project check (89.61% versus 90.79% on the base). It counted 3,005 lines on this draft and 3,293 on the base. The repository’s Buildkite configuration runs GPU-backend package suites on the default branch and skips them on ordinary draft PRs.
A second hosted Surrogates job confirmed the device-capability problem after setting the PoCL worker limit to two. With released KernelAbstractions 0.10.9 and NNlib 0.9.61, Flux reached the CPU BatchNorm kernel and GPUCompiler raised
Invalid return type for runtime function 'unbox_int64'on i686.The work was produced in Codex Desktop 0.171.0-alpha.13.2 with gpt-6.2-astra, local session 01a221ab-aa0b-74d0-9a86-159c89e87d2c (no session URL). This draft awaits review by @ChrisRackauckas.
Links
NNlib CPU normalization and pullback — Use generic CPU normalization when the kernel backend is unavailable FluxML/NNlib.jl#930
Hosted i686 capability failure with the worker pool limited — https://github.com/SciML/Surrogates.jl/actions/runs/46153331779/job/141006808177
Hosted package CI — https://github.com/JuliaGPU/KernelAbstractions.jl/actions/runs/46150861471
Codecov report — Report whether the PoCL CPU device can execute kernels #1000 (comment)
Surrogates 32-bit Core run — https://github.com/SciML/Surrogates.jl/actions/runs/46117042164/job/140893142974
🤖 Posted by an AI agent — harness: Codex Desktop 0.171.0-alpha.13.2 · model: gpt-6.2-astra
Conversation: local session 01a21e73-ebbf-7f80-9b25-d5646b56b858 (no session URL)