interplane.Get Omega
Read in your language

CUDApp

CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.

Brought by drakestapleton

branch main Branches Tags History

CUDApp / src / omega_gpu_cmdlist_native.h

33 lines · 1698 bytes Raw Blame History
1/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */
2#ifndef OMEGA_GPU_CMDLIST_NATIVE_H
3#define OMEGA_GPU_CMDLIST_NATIVE_H
4#include "omega_gpu_cmdlist.h"
5/* Private owner projections, valid only under the existing session lock. They
6 * expose actual typed allocations and mode-final bytes, never qualification.
7 * The observer runs once after every entry is finalized and before any queue
8 * commit, with the very options consumed by that submit. It must not mutate
9 * the list, submit work, or retain these borrowed pointers. Refusal queues
10 * nothing; the graph owner must reset its unsubmitted list without fallback. */
11typedef struct {
12 OmegaGpuMem banks, qmds, semaphores, scratch, stamps;
13 uint64_t record_generation;
14 uint32_t capacity, count;
15} OmegaGpuCmdListOwner;
16typedef struct {
17 const uint8_t *bank, *qmd_slot;
18 const uint8_t *intent_seal; /* owner-frozen successful native add, NOT admission/qualification */
19 uint64_t record_generation, code_va, pending_wait;
20 uint32_t ordinal, count, n_args, independent;
21} OmegaGpuCmdListEntry;
22typedef struct {
23 OmegaGpuCmdListOpts options;
24 uint64_t timeout_ms;
25 uint32_t spin_us;
26} OmegaGpuCmdListConsumed;
27typedef int (*OmegaGpuCmdListObserver)(const OmegaGpuCmdList *,
28 const OmegaGpuCmdListConsumed *, void *);
29int omega_gpu_cmdlist_owner(const OmegaGpuCmdList *, OmegaGpuCmdListOwner *);
30int omega_gpu_cmdlist_entry(const OmegaGpuCmdList *, uint32_t, OmegaGpuCmdListEntry *);
31int omega_gpu_cmdlist_submit_observed(OmegaGpuCmdList *, const OmegaGpuCmdListOpts *,
32 OmegaGpuCmdListStats *, OmegaGpuCmdListObserver, void *);
33#endif