Last updated: 2026-06-12

Inference Runtime

Umq

All API Sections

AMDGPU user-mode queue (T2) availability and create/free smoke gate.

AMDGPU uses UMQ for direct submission on Linux kernels that expose the AMDGPU user queue ABI. The preflight is intentionally cheap, while the smoke gate exercises the actual GEM/VA/USERQ_CREATE/USERQ_FREE path required before lowering decode packets onto T2.

17 exports 2 methods src/zinc_rt/ring/umq.zig

17 exports shown

constant

min_linux_major

#
pub const min_linux_major: u32 = 6

Lowest Linux major version that exposes the AMDGPU user-queue ABI used by T2.

src/zinc_rt/ring/umq.zig:15

constant

min_linux_minor

#
pub const min_linux_minor: u32 = 16

Lowest Linux minor version paired with `min_linux_major` for UMQ admission.

src/zinc_rt/ring/umq.zig:17

constant

default_render_node

#
pub const default_render_node = "/dev/dri/renderD128"

Default render node opened when no caller-supplied path is provided.

src/zinc_rt/ring/umq.zig:19

constant

user_queue_param_path

#
pub const user_queue_param_path = "/sys/module/amdgpu/parameters/user_queue"

Sysfs path exposing the `amdgpu.user_queue` module parameter that gates UMQ.

src/zinc_rt/ring/umq.zig:21

enum

ProbeStatus

#
pub const ProbeStatus = enum

Outcome of the cheap UMQ preflight check; ordered from success to specific failure modes so callers can report actionable diagnostics.

src/zinc_rt/ring/umq.zig:25

struct

KernelVersion

#
pub const KernelVersion = struct

Parsed Linux kernel release triple used to compare against `min_linux_*`.

src/zinc_rt/ring/umq.zig:35

struct

ProbeResult

#
pub const ProbeResult = struct

Aggregate output of `probePath` carrying both the verdict and the evidence (kernel version, render node tried, user-queue mode value) used to reach it.

src/zinc_rt/ring/umq.zig:43

Methods

1

method

ProbeResult.preflightOk

#
pub fn preflightOk(self: ProbeResult) bool

Whether the preflight succeeded and the host is eligible for T2 UMQ.

Parameters
self
Result to inspect.
Returns

True only when `status == .preflight_ok`.

src/zinc_rt/ring/umq.zig:52

enum

SmokeStatus

#
pub const SmokeStatus = enum

Outcome of the full create/free smoke gate that exercises the real GEM/VA/USERQ ioctl path required before T2 lowering can run.

src/zinc_rt/ring/umq.zig:59

struct

SmokeResult

#
pub const SmokeResult = struct

Aggregate output of the UMQ create/free smoke test.

Carries the verdict, the queue id returned by `USERQ_CREATE` when one was obtained, the upstream errno on ioctl failures, and the firmware-reported metadata (queue slots and EOP buffer requirements) needed to size resources on subsequent runs.

src/zinc_rt/ring/umq.zig:77

Methods

1

method

SmokeResult.ok

#
pub fn ok(self: SmokeResult) bool

True when the smoke gate reached `USERQ_FREE` cleanly.

Parameters
self
Smoke result to inspect.
Returns

True only when `status == .passed`.

src/zinc_rt/ring/umq.zig:90

function

probeDefault

#
pub fn probeDefault() ProbeResult

Run the cheap UMQ preflight against the default render node.

Returns

A `ProbeResult` describing whether T2 admission is plausible.

src/zinc_rt/ring/umq.zig:97

function

admissionProbeDefault

#
pub fn admissionProbeDefault() bool

One-shot admission helper combining the preflight and the `kmd.queryComputeUserq` capability query.

`available` compute user-queue capability.

Returns

True only when the host both passes preflight and reports an

src/zinc_rt/ring/umq.zig:105

function

createFreeSmokeDefault

#
pub fn createFreeSmokeDefault() SmokeResult

Run the full create/free smoke gate against the default render node.

Returns

A `SmokeResult` recording every step that succeeded or failed.

src/zinc_rt/ring/umq.zig:115

function

createFreeSmokePath

#
pub fn createFreeSmokePath(render_node: []const u8) SmokeResult

Run the full create/free smoke gate against an explicit render node path.

Performs preflight, queries the compute user-queue capability, allocates the GEM buffers required by `USERQ_CREATE`, maps their VAs, creates a compute queue, and finally frees it.

Parameters

render_node
Absolute path to a DRM render node (e.g. `/dev/dri/renderD128`).

Returns

A `SmokeResult`; inspect `status` and `errno` to localize failures.

src/zinc_rt/ring/umq.zig:125

function

probePath

#
pub fn probePath(render_node: []const u8) ProbeResult

Cheap preflight that walks the OS, kernel-version, render-node, and `user_queue` module-parameter checks without issuing any ioctls.

check, or `preflight_ok` when every check passed.

Parameters

render_node
Path to the DRM render node that would be opened later.

Returns

A `ProbeResult` whose `status` pinpoints the earliest failing

src/zinc_rt/ring/umq.zig:155

function

kernelSupportsUmq

#
pub fn kernelSupportsUmq(version: KernelVersion) bool

Whether the parsed kernel version meets the minimum required for UMQ.

Parameters

version
Kernel version produced by `parseKernelRelease`.

Returns

True when `version >= 6.16`.

src/zinc_rt/ring/umq.zig:315

function

parseKernelRelease

#
pub fn parseKernelRelease(release: []const u8) ?KernelVersion

Parse a `uname -r` style release string into a `KernelVersion`.

Distro suffixes and `-rc` tags after the numeric components are tolerated; the patch component defaults to 0 when absent.

Parameters

release
Release string such as `6.16.0-24-generic` or `6.16-rc4`.

Returns

The parsed triple, or null when the leading components are not numeric.

src/zinc_rt/ring/umq.zig:325

function

userQueueModeEnablesUmq

#
pub fn userQueueModeEnablesUmq(mode: i32) bool

Whether the `amdgpu.user_queue` module-parameter value enables UMQ admission.

Parameters

mode
Integer read from `/sys/module/amdgpu/parameters/user_queue`.

Returns

True for `-1` (auto), `1` (enabled), or `2` (forced); false otherwise.

src/zinc_rt/ring/umq.zig:358