Skip to content

Establish a single source of truth for the ONNX Runtime version #407

@Davidnet

Description

@Davidnet

Context

In #406 we rolled the ONNX Runtime back to 1.24.2 and pinned github.com/yalue/onnxruntime_go to v1.27.0 because the C API headers in onnxruntime_go require a matching runtime version. The version is currently repeated in several places that can drift independently:

  • go.mod (onnxruntime_go version, which implicitly dictates the runtime version)
  • docs/02-development-guide.md (download URLs, cp targets, verify step, env var)
  • The downloaded/copied shared library filename (libonnxruntime.1.24.2.dylib, libonnxruntime.so.1.24.2)
  • Any CI / build scripts that fetch the runtime

Goal

Define a single source of truth for the ONNX Runtime version so the Go module, the shared library on disk, the docs, and CI cannot drift apart.

Possible approaches

  • A Makefile / build-script variable (e.g. ONNXRUNTIME_VERSION) consumed by install scripts, CI, and a docs-generation step.
  • A .tool-versions (or similar) entry, with docs referencing the variable rather than a literal version.
  • A small helper script that downloads the correct runtime based on the pinned onnxruntime_go version.

Acceptance criteria

  • Bumping the ONNX Runtime version requires editing exactly one place.
  • Docs, install scripts, and CI all derive the version from that single source.
  • A check (CI or pre-commit) fails if the versions diverge.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions