Skip to content

The native Adams controller stays on the host on CUDA and HIP #362

Open

Description

@jtravs

What is missing

On CUDA and HIP builds the native Adams march (SEP 39) keeps its controller on the host. Each trial reads its error norms back once and launches its kernels from the host, with the trial's source replayed as one device graph where its operations repeat. A controller on the device, choosing the step and order there, would remove the read-back and the host's launches. SEP 39 left this open.

Why it matters

SEP 39 measured, on an AMD MI325X, the march's own host time at 0.5 to 3.0 µs a trial, against 160 to 550 µs of device time in 25 to 70 kernels, with the rest "launch and synchronisation overhead". What the read-back itself costs has not been separated, so the gain is unknown. Read, not run.

To do

It must take the same steps as the host controller, whose decision traces are tested. Whether a device can branch this way within vendor graphs is unchecked, and is a suspicion of the main difficulty.

Needs a decision: whether to pursue this after the measurement. It would be a SEP, by the maintainer. I recommend not starting unless the read-back is above 20 % of a trial.

Done when

The share is recorded with device, case and date, and either a SEP is accepted or this closes on that number.


Checked against commit 8a9f764. Takes over the roadmap's entry "A device-resident Adams controller".

Activity

  1. added
    performanceSlower or larger than it should be, with no wrong result
    area: steppersIntegrators, frames and fixed schedules
    area: gpuCUDA and HIP builds: qualification and performance
    on Nov 1, 2026
  2. jtravs commented on Nov 5, 2026

    @jtravs
    ContributorAuthor

    Measured, on the way to a decision. From the last kernel's end to the host's return, by an nsys trace with graph nodes on an NVIDIA A40 at 16 host threads: about 2.8 µs a trial, at most 14 µs at the 90th percentile.

    Case Trial Read-back's share
    he_rdw_averaged 237 µs 1.2 %
    rdw 586 µs 0.5 %
    radial_filament_256 3.3 ms 0.1 %

    That's well under this issue's 20 %. I haven't run it on a data-centre card, where a trial is shorter. It would take a trial of about 14 µs for the read-back to reach 20 %, and SEP 39 measured 160 to 550 µs on an AMD Instinct MI325X. So I'd close this as not worth doing, and #520 says so. The ledger entry is in docs/dev/benchmarks.md, "A device step beyond its transforms".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: gpuCUDA and HIP builds: qualification and performancearea: steppersIntegrators, frames and fixed schedulesperformanceSlower or larger than it should be, with no wrong resultpriority: lowWorth doing, no hurry

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions