Loading...
Searching...
No Matches
onnx_session.h
Go to the documentation of this file.
19 * @brief Bounded tensor bindings and cooperative execution policy, independent of CAM semantics. */
61/** @brief Noncopyable caller-owned session; zero-initialize and serialize open/run/close ownership.
63 * remain alive until close has completed; a failed run does not validate their output contents. */
78/** @brief Compute bounded concrete storage, rejecting unsupported types, dynamic extents and overflow.
86/** @brief Validate graph contracts and bind reusable caller buffers; failure releases acquired resources.
97 * @note Dynamic graph axes bind to the declared concrete shape; outputs are checked again after each run. */
112/** @brief Request cooperative cancellation from another thread; join the owner before destroying storage.
bool onnx_tensor_bytes(enum onnx_element_type type, const int64_t *dimensions, size_t rank, size_t *bytes)
Compute bounded concrete storage, rejecting unsupported types, dynamic extents and overflow.
Definition onnx_session.c:47
bool onnx_session_run(struct onnx_session *session, uint64_t deadline_us, char *error, size_t capacity)
Run once; deadline is absolute CLOCK_MONOTONIC microseconds, or zero for none.
Definition onnx_session.c:251
bool onnx_session_open(struct onnx_session *session, const char *model, const struct onnx_tensor *inputs, size_t input_count, const struct onnx_tensor *outputs, size_t output_count, const struct onnx_session_options *options, char *error, size_t capacity)
Validate graph contracts and bind reusable caller buffers; failure releases acquired resources.
Definition onnx_session.c:187
onnx_element_type
Supported numeric types; values match the ONNX Runtime C ABI.
Definition onnx_session.h:38
uint64_t onnx_monotonic_us(void)
Read the clock used by inference deadlines.
Definition onnx_session.c:40
void onnx_session_cancel(struct onnx_session *session)
Request cooperative cancellation from another thread; join the owner before destroying storage.
Definition onnx_session.c:325
void onnx_session_close(struct onnx_session *session)
Cancel/wait for an active run and release resources; repeated closes are harmless.
Definition onnx_session.c:337
Explicit execution limits so each model cannot create an unbounded CPU pool.
Definition onnx_session.h:54
Noncopyable caller-owned session; zero-initialize and serialize open/run/close ownership.
Definition onnx_session.h:64
char output_names[ONNX_TENSOR_LIMIT][ONNX_NAME_CAPACITY]
Definition onnx_session.h:68
struct onnx_tensor output_specs[ONNX_TENSOR_LIMIT]
Definition onnx_session.h:69
char input_names[ONNX_TENSOR_LIMIT][ONNX_NAME_CAPACITY]
Definition onnx_session.h:67
Named concrete tensor view; its aligned backing storage must outlive the session.
Definition onnx_session.h:44