Repository navigation
Omit host verbosity from device initialization problems - #588
Conversation
Drop the host logging keyword when converting nonlinear initialization problems while preserving numerical solver keywords and problem types. Cover square and least-squares conversion and retain computed-map GPU tests. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Codex <noreply@openai.com> Agent-Harness: Codex CLI 0.164.0 Agent-Model: gpt-6-astra Agent-Session: local job diffeqgpu-amdgpu-dae-fix (no session URL)
A fresh read-only review by Codex CLI 0.164.0 / gpt-6.1-sol of head The reviewer confirmed that the helper consumes only Validation recorded on this head:
Exact-head hardware CI passed the full package tests and all 123 DAE tests with ModelingToolkitBase 1.79.0 on Metal release, Metal LTS, and oneAPI release. I read each complete job log. The downgrade CPU job reports 49 pass / 1 fail: oneAPI LTS also completed successfully, including 123/123 DAE tests. Both release CPU architectures, JLArrays, OpenCL, Enzyme, QA, docs, formatting and spelling CI checks pass. Exact-head CUDA CI passes 123/123 DAE tests with ModelingToolkitBase 1.79.0 and then reports the same AMDGPU release and LTS jobs remain queued, with no execution result. No local AMD hardware validation is claimed. No source changes followed the independent review. The draft awaits @ChrisRackauckas's review. Reviewer session: local session 01a1a6ca-4c78-7513-b1ca-f6a432dfa4b7 (no session URL). 🤖 Posted by an AI agent — harness: Codex CLI 0.164.0 · model: gpt-6-astra |
Second independent review: MERGE at exact head
Together with the first review, this gives the two counted ratings that medium-low requires, from different sessions. The PR stays a draft for @ChrisRackauckas; nothing has been approved or merged. 🤖 Posted by an AI agent — harness: Claude Code 2.1.301 · model: claude-opus-5-5 |
Please ignore this draft until reviewed by @ChrisRackauckas.
Fixes #587 (#587).
ModelingToolkitBase 1.79 supplies
verbose = Minimal()on nonlinear initialization problems. Forwarding this host logging keyword into SciMLBase's immutable problem constructors produces nonemptyBase.Pairs, which is non-isbits and keeps a runtime field lookup in the device nonlinear solve. DiffEqGPU now omitsverbosewhen preparing square and least-squares initialization problems, while forwarding every other solver keyword. The existing problem type families, solution layout, and numerical initialization algorithms are preserved.The tests cover mutable and immutable nonlinear problems and least-squares problems, empty keywords, host verbosity values, preservation of other solver keywords, and input immutability. The existing ModelingToolkit computed-initialization test exercises the actual
Minimal()case and compares GPU initialization with an independent CPU solve. No dependency is added.Regression evidence
Julia 1.10.12, ModelingToolkitBase 1.79.0, SciMLBase 3.58.0, SimpleNonlinearSolve 2.14.6, CUDA 6.3.1, GPUCompiler 2.6.0. CUDA execution used GPU 1 (RTX PRO 6000 Blackwell Max-Q); the functional scalar-write/readback test passed first.
Before the fix, running the DAE test file on master with the new assertions produced:
After the fix, with the identical environment and GPU:
The full DAE file changes from 101 pass / 17 fail / 2 errors to 120 pass / 1 error. The remaining bounded-initialization CUDA error also reproduces on a clean master checkout: 3 pass / 1 error, with dynamic
NonlinearFunctioninvocation. Its kwargs are empty; it is separate from this bug and from #546. No assertion is skipped or weakened.Validation
All Julia runs used
JULIA_NUM_THREADS=4,JULIA_NUM_PRECOMPILE_TASKS=1, task-local environments and writable caches, and the wrappersystemd-run --user --scope -p MemoryMax=18G -p MemoryHigh=infinity timeout 14400. CUDA runs usedCUDA_VISIBLE_DEVICES=1. Both test environments contain ModelingToolkitBase 1.79.0; the release environment uses CUDA 6.4.1 / GPUCompiler 2.10.0.julia +release --project=@runic -m Runic --check src/utils.jl test/gpu_kernel_de/stiff_ode/gpu_ode_modelingtoolkit_dae.jltyposon all changed files;git diff --checkGROUP=QA julia +release --project -e 'using Pkg; Pkg.test(; julia_args=["--check-bounds=auto"])'GKSwstype=100 julia +release --compiled-modules=existing --project=docs docs/make.jlThe CPU/CUDA group driver runs the official runner inside an outer testset so independent failures are collected:
It was invoked with
GROUP=CPUonjulia +ltsandjulia +release, andGROUP=CUDAonjulia +release, using--startup-file=no --project=<test-environment>(environment path omitted). The DAE before/after driver wrapsinclude("test/gpu_kernel_de/stiff_ode/gpu_ode_modelingtoolkit_dae.jl")in the same way. Paths in these commands are relative to the repository root.The full release CUDA run's sole error is the known #546 failure:
MethodError: no method matching zero(::Type{EnzymeAllocationRecord})in CUDACore's Enzyme allocation rule. It prevents later Enzyme transfer/gradient checks from running. Bounded initialization passes in this release environment; its separate failure above occurs with the older reconstructed CUDA/compiler versions. No new GPU test failure is observed.The downgrade CPU CI job reports 49 passes / 1 failure in the adaptive GPUVern9 saved-state comparison:
0.0010757452f0 < 0.001. I fetched and read the version-only source-baseline log, which reports the exact same norm and failure. Its commit differs from the tested master base only in the package version; source, tests, and compat bounds match. This establishes a pre-existing occurrence, not a diagnosis of the numerical discrepancy or an identical-hardware control. No tolerance is changed.The exact-head Metal CI logs report package tests passed and 123/123 DAE tests with ModelingToolkitBase 1.79.0 on both release and LTS. I read both complete logs. oneAPI release also reports package tests passed and 123/123 DAE tests with ModelingToolkitBase 1.79.0 in its complete log. oneAPI LTS also reports package tests passed and 123/123 DAE tests with ModelingToolkitBase 1.79.0. CPU release x64/x86, JLArrays, OpenCL, Enzyme, QA, docs, formatting and spelling CI checks pass.
Exact-head CUDA CI passes 123/123 DAE tests with ModelingToolkitBase 1.79.0, then fails at
zero(::Type{EnzymeAllocationRecord}). I read the complete current log and the clean-master baseline log, which has the identical error. The baseline's head is the same master base9cef7c8. This matches the local full-CUDA result and #546; the full CUDA group is not green.AMDGPU release and LTS jobs remain queued, so neither has an execution result.
Scope and overlap
Based on master at
9cef7c8. #584, #585, and #586 change outer kernel preparation insrc/solve.jl. This patch changes nested initialization conversion insrc/utils.jl; it does not touch their implementation or test hunks. The outer keyword conversion in PR 586 does not convert nested initialization kwargs.AMD hardware execution is not verified. Other nonempty solver kwargs retain their current representation; this patch specifically removes host verbosity and does not claim general support for arbitrary non-isbits keyword values. The CPU backend of
EnsembleGPUKerneluses the same preparation and therefore also omits initialization verbosity.Risk assessment
EnsembleGPUKernel; no public signature or solution-layout change.🤖 Posted by an AI agent — harness: Codex CLI 0.164.0 · model: gpt-6-astra
Conversation: local job diffeqgpu-amdgpu-dae-fix (no session URL)