← Back to Pull requests

docs(rfcs): update RFC0015-Fortran-Bindings-Split #9433

Open
unknown opened this pull request with 650 lines diff across 8 files
View on GitHub
unknown unknown commented on Oct 21, 2026 23:31 UTC
Author

📖 Read the updated RFC, rendered · library maintainers can start with What this means for a library maintainer.

RFC0015 (#8122) was merged as a draft on 2026-10-14. Since then, its plan has turned into code:

  • the generator now lives in ROCm/rocm-fortran-generator, which is public;

  • the regeneration workflows are merged in both monorepos (ROCm/rocm-systems#15141, ROCm/rocm-libraries#15159), with their per-library paths and generator c73ff72 (ROCm/rocm-systems#15696, ROCm/rocm-libraries#15685);

  • the bindings are open as 12 pull requests (the ten rocm-libraries ones are drafts until the RFC is approved), one per binding, each adding it to its monorepo's bindings/fortran/<lib>/:
  • | Repository | Binding | Pull request |
    |---|---|---|
    | rocm-systems | HIP | ROCm/rocm-systems#11923 |
    | rocm-systems | ROCTx | ROCm/rocm-systems#14024 |
    | rocm-libraries | rocBLAS | ROCm/rocm-libraries#12533 |
    | rocm-libraries | hipBLAS | ROCm/rocm-libraries#12370 |
    | rocm-libraries | rocSOLVER | ROCm/rocm-libraries#12582 |
    | rocm-libraries | hipSOLVER | ROCm/rocm-libraries#12581 |
    | rocm-libraries | rocSPARSE | ROCm/rocm-libraries#12514 |
    | rocm-libraries | hipSPARSE | ROCm/rocm-libraries#12368 |
    | rocm-libraries | rocFFT | ROCm/rocm-libraries#12366 |
    | rocm-libraries | hipFFT, hipFFTXt, hipFFTW | ROCm/rocm-libraries#12367 |
    | rocm-libraries | rocRAND | ROCm/rocm-libraries#12505 |
    | rocm-libraries | hipRAND | ROCm/rocm-libraries#12506 |

    Around them:

    | What | Pull request |
    |---|---|
    | TheRock can build the bindings, off by default | ROCm/TheRock#9889 |
    | TheRock's CI builds and tests them (fortran-bindings stage, 12 GPU test jobs) | ROCm/TheRock#9890 |
    | The generator writes HIP and ROCTx to bindings/fortran/hip/ and bindings/fortran/roctx/ (merged; the regeneration workflows pin it, c73ff72) | ROCm/rocm-fortran-generator#19 |
    | Migration guides, and the deprecation of hipFORT | ROCm/hipfort#548 |

    This PR brings the RFC in line with that work, lists the decisions it asks for, and makes it easier to read.

    What changed

  • Layout (update of 2026-11-03). The bindings are consumers of their libraries' public APIs, so they live apart from the library projects: bindings/fortran/<lib>/ in each monorepo (hip and roctx in rocm-systems, one per math library in rocm-libraries), as standalone projects built against the installed libraries. Nothing is wired into the library builds. TheRock builds them from its own bindings/fortran/, in a fortran-bindings stage after the libraries, with one artifact per library family.

  • Staged rollout in TheRock. Build support first, with THEROCK_ENABLE_FORTRAN_BINDINGS off by default, even with THEROCK_ENABLE_ALL, and one feature per family; then CI; then releases and packaging. A TheRock feature flag in FLAGS.cmake, off by default, keeps the bindings out of the release builds, so nightly and release tarballs do not carry them until it flips, targeted for 10.5.

  • Packaging, as a proposal. Each library family's bindings ship in their own amdrocm-<family>-fortran-devel package, pulled in by the amdrocm-fortran metapackage, instead of in the libraries' C -devel packages. Nothing is packaged before the product and release owners approve it.

  • Timeline. The tech preview is targeted for 10.4 and production, with the packaging and the compatibility promise, for 10.5. 10.3 gets hipFORT only, and the 10.4 tech preview ships in neither the tarballs nor the packages.

  • Hand-written library modules. They are deprecated at the 10.4 tech preview and removed no earlier than ROCm 11.0, instead of replaced at 10.3.

  • hipFFT modules. hipFFT's binding has two modules in one archive and package: hipfftxt holds every hipfftXt and hipfftMp routine and re-exports hipfft, as CUDA Fortran's cufftXt does with cufft. The RFC also notes that the hip* module and routine names follow CUDA Fortran's, with hip for cu.

  • Tests. Each binding installs its tests, and TheRock runs them in one GPU job per binding, also when the library it binds changes. The RFC proposes that these jobs be required: they test the committed binding against the library a pull request builds, so they pass as long as the C API only grows.

  • Keeping the bindings in sync, in two steps (D10, after the review with TheRock). The bindings stay checked in and are never generated at build time, so Julia never enters ROCm's build. Until the feature flag flips, the header check on library pull requests is informative, and the regeneration workflows, merged in both monorepos, regenerate the bindings daily and open one bot pull request per binding, which the Fortran-bindings team reviews. When it flips, targeted for 10.5, the check becomes required, and a pull request that changes a public header carries the regenerated bindings, applied from a patch the check attaches with one command. The release gate (D2) and the review target (D4) apply until then.

  • No Julia for users. Users of other compilers compile the installed .F90 with their own compiler; only the CI that regenerates the bindings needs Julia.

  • Corrections against the generator, hipFORT and the 12 pull requests: options, paths, the CMake guard, TheRock packaging, figures, and the linking of a binding against an older or newer library.

  • Decisions requested. A table near the top collects the ten decisions the RFC asks for (deprecation, release gate, packaging, review of bot pull requests, write access, compatibility promise, required test jobs, regeneration workflow, generic TheRock stage, blocking header check), each with who decides. A revision history closes the RFC.

  • Readability. Implementation detail moved to appendices, which are reference material, not required reading. Library maintainers can start with What this means for a library maintainer. The text uses one sentence per line, defines the Fortran terms where they first appear, and links its cross-references.
  • Request

    Please review and approve, so that the RFC becomes the reference for the 12 pull requests above, and comment on the decisions you own in Decisions requested. In particular:

  • ROCm Core: @bobbyphilip-amd

  • TheRock (@stellaraccident, @ScottTodd): the feature flag and the blocking header check (D10), the required test jobs (D7) and the generic stage (D9)

  • product and release owners: packaging (D3), release gate (D2) and compatibility promise (D6)
  • Nothing ships before the RFC is approved: TheRock keeps the bindings off by default and out of the release builds, and the ten rocm-libraries binding PRs stay drafts until then.

    cc @saadrahim (product manager)

    JIRA ID: ROCM-31390

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: mjklemm Review duration: 57765m
    All Vouch review confidence checks passed
    Residual risk 0.35 = Change Risk (0.59) × (1 − Review Confidence (0.41)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.59 · 650 lines diff across 8 files
    0.59
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    40%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #9433"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 40.9% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 59% (MEDIUM) · Higher = larger blast radius
    59%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 40.9% · Lower = rushed or shallow review
    40.9%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 34.8% · Safe to merge
    34.8%
    Repository