|
rustnn C and C++ API
WebNN graph construction and execution
|
#include <stdarg.h>#include <stdbool.h>#include <stdint.h>#include <stdlib.h>Go to the source code of this file.
Classes | |
| struct | RustnnBackendDevice |
| C representation of [BackendDevice]. More... | |
| struct | RustnnTrtxOptions |
| C representation of [TrtxOptions]. More... | |
| struct | RustnnOptions |
| C representation of [RustNNOptions]. More... | |
| struct | RustnnContextOptions |
| C representation of [MLContextOptions]. More... | |
| struct | RustnnOperatorOptions |
| C representation of [MLOperatorOptions] shared by the operations exposed by this ABI. More... | |
| struct | RustnnNamedOperand |
| Name and operand pair used to form [MLNamedOperands]. More... | |
| struct | RustnnNamedTensor |
| Name and tensor pair used to form [MLNamedTensors]. More... | |
Typedefs | |
| typedef enum RustnnStatus | RustnnStatus |
| Result of a C API call. | |
| typedef enum RustnnDataType | RustnnDataType |
| C representation of [MLOperandDataType]. | |
| typedef enum RustnnPowerPreference | RustnnPowerPreference |
| C representation of [MLPowerPreference]. | |
| typedef enum RustnnBackend | RustnnBackend |
| Backend hint for [MLContextOptions], wrapping [Backend]. | |
| typedef enum RustnnDeviceType | RustnnDeviceType |
| C representation of [DeviceType] for a [BackendDevice] hint. | |
| typedef enum RustnnUnaryOperation | RustnnUnaryOperation |
| Implementation detail of the C++ API. | |
| typedef enum RustnnBinaryOperation | RustnnBinaryOperation |
| Implementation detail of the C++ API. | |
| typedef enum RustnnTernaryOperation | RustnnTernaryOperation |
| Implementation detail of the C++ API. | |
| typedef struct RustnnContext | RustnnContext |
| Opaque handle wrapping [MLContext]. | |
| typedef struct RustnnGraph | RustnnGraph |
| Opaque handle wrapping [MLGraph]. | |
| typedef struct RustnnGraphBuilder | RustnnGraphBuilder |
| Opaque handle wrapping [MLGraphBuilder]. | |
| typedef struct RustnnOperand | RustnnOperand |
| Opaque handle wrapping [MLOperand]. | |
| typedef struct RustnnOperandDescriptor | RustnnOperandDescriptor |
| Opaque handle wrapping [MLOperandDescriptor]. | |
| typedef struct RustnnTensor | RustnnTensor |
| Opaque handle wrapping [MLTensor]. | |
| typedef struct RustnnTensorDescriptor | RustnnTensorDescriptor |
| Opaque handle wrapping [MLTensorDescriptor]. | |
| typedef struct RustnnBackendDevice | RustnnBackendDevice |
| C representation of [BackendDevice]. | |
| typedef struct RustnnTrtxOptions | RustnnTrtxOptions |
| C representation of [TrtxOptions]. | |
| typedef struct RustnnOptions | RustnnOptions |
| C representation of [RustNNOptions]. | |
| typedef struct RustnnContextOptions | RustnnContextOptions |
| C representation of [MLContextOptions]. | |
| typedef struct RustnnOperatorOptions | RustnnOperatorOptions |
| C representation of [MLOperatorOptions] shared by the operations exposed by this ABI. | |
| typedef struct RustnnNamedOperand | RustnnNamedOperand |
| Name and operand pair used to form [MLNamedOperands]. | |
| typedef struct RustnnNamedTensor | RustnnNamedTensor |
| Name and tensor pair used to form [MLNamedTensors]. | |
Functions | |
| const char * | rustnn_last_error_message (void) |
| Return the last C API error message for this thread. | |
| void | rustnn_init_logger (void) |
Install rustnn's pretty_env_logger global logger if no logger is installed yet. | |
| enum RustnnStatus | rustnn_operand_descriptor_create (enum RustnnDataType data_type, const uint64_t *shape, uintptr_t shape_len, struct RustnnOperandDescriptor **output) |
| Allocate an [MLOperandDescriptor] from a data type and shape. | |
| void | rustnn_operand_descriptor_destroy (struct RustnnOperandDescriptor *descriptor) |
| Release an [MLOperandDescriptor] handle. | |
| enum RustnnStatus | rustnn_tensor_descriptor_create (enum RustnnDataType data_type, const uint64_t *shape, uintptr_t shape_len, bool readable, bool writable, struct RustnnTensorDescriptor **output) |
| Allocate an [MLTensorDescriptor]. | |
| void | rustnn_tensor_descriptor_destroy (struct RustnnTensorDescriptor *descriptor) |
| Release an [MLTensorDescriptor] handle. | |
| struct RustnnContextOptions | rustnn_context_options_default (void) |
| Return the default [MLContextOptions]. | |
| enum RustnnStatus | rustnn_context_create (const struct RustnnContextOptions *options, struct RustnnContext **output) |
| Create an [MLContext]. | |
| void | rustnn_context_destroy (struct RustnnContext *context) |
| Release an [MLContext] handle. | |
| enum RustnnStatus | rustnn_context_create_tensor (struct RustnnContext *context, const struct RustnnTensorDescriptor *descriptor, struct RustnnTensor **output) |
| Allocate an [MLTensor] from an [MLTensorDescriptor]. | |
| void | rustnn_tensor_destroy (struct RustnnTensor *tensor) |
| Release an [MLTensor] handle. | |
| enum RustnnStatus | rustnn_context_write_tensor (struct RustnnContext *context, const struct RustnnTensor *tensor, const void *data, uintptr_t data_len) |
| Copy bytes into an [MLTensor] through [MLContext]. | |
| enum RustnnStatus | rustnn_context_read_tensor (struct RustnnContext *context, const struct RustnnTensor *tensor, void *data, uintptr_t data_len) |
| Copy bytes from an [MLTensor] through [MLContext]. | |
| enum RustnnStatus | rustnn_graph_builder_create_uncompiled (struct RustnnGraphBuilder **output) |
| Create an uncompiled [MLGraphBuilder] for graph construction and serialization. | |
| enum RustnnStatus | rustnn_graph_builder_create (struct RustnnContext *context, struct RustnnGraphBuilder **output) |
Create a runtime-backed [MLGraphBuilder] that exclusively borrows context. | |
| void | rustnn_graph_builder_destroy (struct RustnnGraphBuilder *builder) |
| Release an [MLGraphBuilder] handle. | |
| void | rustnn_operand_destroy (struct RustnnOperand *operand) |
| Release an [MLOperand] handle. | |
| enum RustnnStatus | rustnn_graph_builder_input (struct RustnnGraphBuilder *builder, const char *name, const struct RustnnOperandDescriptor *descriptor, struct RustnnOperand **output) |
| Declare a named input [MLOperand] on [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_constant (struct RustnnGraphBuilder *builder, const struct RustnnOperandDescriptor *descriptor, const void *data, uintptr_t data_len, struct RustnnOperand **output) |
| Create a constant [MLOperand] from descriptor and bytes on [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_unary (struct RustnnGraphBuilder *builder, enum RustnnUnaryOperation operation, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply a selected unary operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_binary (struct RustnnGraphBuilder *builder, enum RustnnBinaryOperation operation, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, struct RustnnOperand **output) |
| Apply a selected binary operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_ternary (struct RustnnGraphBuilder *builder, enum RustnnTernaryOperation operation, const struct RustnnOperand *first, const struct RustnnOperand *second, const struct RustnnOperand *third, struct RustnnOperand **output) |
| Apply a selected ternary operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_unary_with_options (struct RustnnGraphBuilder *builder, enum RustnnUnaryOperation operation, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Implementation detail of the C++ API. | |
| enum RustnnStatus | rustnn_graph_builder_binary_with_options (struct RustnnGraphBuilder *builder, enum RustnnBinaryOperation operation, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Implementation detail of the C++ API. | |
| enum RustnnStatus | rustnn_graph_builder_add (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, struct RustnnOperand **output) |
| Apply the add operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_subtract (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, struct RustnnOperand **output) |
| Apply the subtract operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_multiply (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, struct RustnnOperand **output) |
| Apply the multiply operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_divide (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, struct RustnnOperand **output) |
| Apply the divide operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_power (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, struct RustnnOperand **output) |
| Apply the power operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_maximum (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, struct RustnnOperand **output) |
| Apply the maximum operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_minimum (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, struct RustnnOperand **output) |
| Apply the minimum operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_equal (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, struct RustnnOperand **output) |
| Apply the equal operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_greater (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, struct RustnnOperand **output) |
| Apply the greater operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_greater_or_equal (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, struct RustnnOperand **output) |
| Apply the greater or equal operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_lesser (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, struct RustnnOperand **output) |
| Apply the lesser operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_lesser_or_equal (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, struct RustnnOperand **output) |
| Apply the lesser or equal operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_not_equal (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, struct RustnnOperand **output) |
| Apply the not equal operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_logical_and (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, struct RustnnOperand **output) |
| Apply the logical and operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_logical_or (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, struct RustnnOperand **output) |
| Apply the logical or operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_logical_xor (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, struct RustnnOperand **output) |
| Apply the logical xor operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_matmul (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, struct RustnnOperand **output) |
| Apply the matmul operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_abs (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the abs operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_round_even (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the round even operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_ceil (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the ceil operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_cos (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the cos operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_exp (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the exp operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_floor (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the floor operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_gelu (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the gelu operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_log (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the log operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_negate (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the negate operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_relu (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the relu operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_sigmoid (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the sigmoid operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_sin (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the sin operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_sqrt (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the sqrt operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_tan (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the tan operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_tanh (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the tanh operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_erf (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the erf operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_reciprocal (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the reciprocal operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_sign (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the sign operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_logical_not (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the logical not operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_identity (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the identity operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_softplus (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the softplus operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_softsign (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the softsign operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_is_nan (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the is nan operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_is_infinite (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the is infinite operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_shape (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the shape operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_add_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the add operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_subtract_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the subtract operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_multiply_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the multiply operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_divide_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the divide operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_power_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the power operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_maximum_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the maximum operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_minimum_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the minimum operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_equal_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the equal operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_greater_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the greater operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_greater_or_equal_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the greater or equal operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_lesser_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the lesser operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_lesser_or_equal_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the lesser or equal operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_not_equal_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the not equal operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_logical_and_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the logical and operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_logical_or_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the logical or operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_logical_xor_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the logical xor operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_matmul_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the matmul operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_abs_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the abs operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_round_even_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the round even operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_ceil_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the ceil operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_cos_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the cos operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_exp_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the exp operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_floor_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the floor operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_gelu_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the gelu operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_log_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the log operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_negate_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the negate operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_relu_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the relu operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_sigmoid_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the sigmoid operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_sin_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the sin operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_sqrt_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the sqrt operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_tan_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the tan operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_tanh_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the tanh operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_erf_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the erf operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_reciprocal_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the reciprocal operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_sign_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the sign operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_logical_not_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the logical not operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_identity_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the identity operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_softplus_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the softplus operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_softsign_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the softsign operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_is_nan_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the is nan operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_is_infinite_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the is infinite operation using [MLGraphBuilder] with a label. | |
| enum RustnnStatus | rustnn_graph_builder_shape_with_options (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperatorOptions *options, struct RustnnOperand **output) |
| Apply the shape operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_elu (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the elu operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_hard_sigmoid (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the hard sigmoid operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_hard_swish (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the hard swish operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_leaky_relu (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the leaky relu operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_linear (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the linear operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_clamp (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the clamp operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_instance_normalization (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the instance normalization operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_layer_normalization (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the layer normalization operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_resample2d (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the resample2d operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_reverse (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the reverse operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_triangular (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the triangular operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_average_pool2d (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the average pool2d operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_max_pool2d (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the max pool2d operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_l2_pool2d (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the l2 pool2d operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_reduce_sum (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the reduce sum operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_reduce_mean (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the reduce mean operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_reduce_max (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the reduce max operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_reduce_min (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the reduce min operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_reduce_product (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the reduce product operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_reduce_l1 (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the reduce l1 operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_reduce_l2 (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the reduce l2 operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_reduce_log_sum (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the reduce log sum operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_reduce_log_sum_exp (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the reduce log sum exp operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_reduce_sum_square (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the reduce sum square operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_transpose (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the transpose operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_squeeze (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the squeeze operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_unsqueeze (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, struct RustnnOperand **output) |
| Apply the unsqueeze operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_gemm (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, struct RustnnOperand **output) |
| Apply the gemm operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_conv2d (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, struct RustnnOperand **output) |
| Apply the conv2d operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_conv_transpose2d (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, struct RustnnOperand **output) |
| Apply the conv transpose2d operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_gather (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, struct RustnnOperand **output) |
| Apply the gather operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_gather_elements (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, struct RustnnOperand **output) |
| Apply the gather elements operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_gather_nd (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, struct RustnnOperand **output) |
| Apply the gather nd operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_prelu (struct RustnnGraphBuilder *builder, const struct RustnnOperand *lhs, const struct RustnnOperand *rhs, struct RustnnOperand **output) |
| Apply the prelu operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_batch_normalization (struct RustnnGraphBuilder *builder, const struct RustnnOperand *first, const struct RustnnOperand *second, const struct RustnnOperand *third, struct RustnnOperand **output) |
| Apply the batch normalization operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_where (struct RustnnGraphBuilder *builder, const struct RustnnOperand *first, const struct RustnnOperand *second, const struct RustnnOperand *third, struct RustnnOperand **output) |
| Apply the where operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_scatter_elements (struct RustnnGraphBuilder *builder, const struct RustnnOperand *first, const struct RustnnOperand *second, const struct RustnnOperand *third, struct RustnnOperand **output) |
| Apply the scatter elements operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_scatter_nd (struct RustnnGraphBuilder *builder, const struct RustnnOperand *first, const struct RustnnOperand *second, const struct RustnnOperand *third, struct RustnnOperand **output) |
| Apply the scatter nd operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_arg_min (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, uint32_t axis, struct RustnnOperand **output) |
| Apply the arg min operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_arg_max (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, uint32_t axis, struct RustnnOperand **output) |
| Apply the arg max operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_cast (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, enum RustnnDataType data_type, struct RustnnOperand **output) |
| Apply the cast operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_cumulative_sum (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, uint32_t axis, struct RustnnOperand **output) |
| Apply the cumulative sum operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_softmax (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, uint32_t axis, struct RustnnOperand **output) |
| Apply the softmax operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_expand (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const uint32_t *new_shape, uintptr_t new_shape_len, struct RustnnOperand **output) |
| Apply the expand operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_reshape (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const uint32_t *new_shape, uintptr_t new_shape_len, struct RustnnOperand **output) |
| Apply the reshape operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_tile (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const uint32_t *repetitions, uintptr_t repetitions_len, struct RustnnOperand **output) |
| Apply the tile operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_pad (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const uint32_t *beginning_padding, uintptr_t beginning_padding_len, const uint32_t *ending_padding, uintptr_t ending_padding_len, struct RustnnOperand **output) |
| Apply the pad operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_slice (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const uint32_t *starts, uintptr_t starts_len, const uint32_t *sizes, uintptr_t sizes_len, struct RustnnOperand **output) |
| Apply the slice operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_concat (struct RustnnGraphBuilder *builder, const struct RustnnOperand *const *inputs, uintptr_t inputs_len, uint32_t axis, struct RustnnOperand **output) |
| Apply the concat operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_quantize_linear (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperand *scale, const struct RustnnOperand *zero_point, struct RustnnOperand **output) |
| Apply the quantize linear operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_dequantize_linear (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperand *scale, const struct RustnnOperand *zero_point, struct RustnnOperand **output) |
| Apply the dequantize linear operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_split (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const uint32_t *splits, uintptr_t splits_len, struct RustnnOperand **outputs, uintptr_t outputs_capacity, uintptr_t *outputs_len) |
| Apply the split operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_split_equal (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, uint32_t num_splits, struct RustnnOperand **outputs, uintptr_t outputs_capacity, uintptr_t *outputs_len) |
| Apply the split equal operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_gru (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperand *weight, const struct RustnnOperand *recurrent_weight, uint32_t steps, uint32_t hidden_size, struct RustnnOperand **outputs, uintptr_t outputs_capacity, uintptr_t *outputs_len) |
| Apply the gru operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_gru_cell (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperand *weight, const struct RustnnOperand *recurrent_weight, const struct RustnnOperand *hidden_state, uint32_t hidden_size, struct RustnnOperand **output) |
| Apply the gru cell operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_lstm (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperand *weight, const struct RustnnOperand *recurrent_weight, uint32_t steps, uint32_t hidden_size, struct RustnnOperand **outputs, uintptr_t outputs_capacity, uintptr_t *outputs_len) |
| Apply the lstm operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_lstm_cell (struct RustnnGraphBuilder *builder, const struct RustnnOperand *input, const struct RustnnOperand *weight, const struct RustnnOperand *recurrent_weight, const struct RustnnOperand *hidden_state, const struct RustnnOperand *cell_state, uint32_t hidden_size, struct RustnnOperand **outputs, uintptr_t outputs_capacity, uintptr_t *outputs_len) |
| Apply the lstm cell operation using [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_build (struct RustnnGraphBuilder **builder, const struct RustnnNamedOperand *outputs, uintptr_t outputs_len, struct RustnnGraph **graph) |
Compile a runtime-backed [MLGraphBuilder] into an [MLGraph] and consume it, setting builder to null. | |
| void | rustnn_graph_destroy (struct RustnnGraph *graph) |
| Release an [MLGraph] handle. | |
| enum RustnnStatus | rustnn_context_dispatch (struct RustnnContext *context, struct RustnnGraph *graph, const struct RustnnNamedTensor *inputs, uintptr_t inputs_len, const struct RustnnNamedTensor *outputs, uintptr_t outputs_len) |
| Run an [MLGraph] through [MLContext] with named input and output tensors. | |
| enum RustnnStatus | rustnn_graph_builder_operand_shape (struct RustnnGraphBuilder *builder, const struct RustnnOperand *operand, uint64_t *dimensions, uintptr_t dimensions_capacity, uintptr_t *dimensions_len) |
| Copy an [MLOperand] shape from [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_operand_data_type (struct RustnnGraphBuilder *builder, const struct RustnnOperand *operand, enum RustnnDataType *data_type) |
| Read an [MLOperand] data type from [MLGraphBuilder]. | |
| enum RustnnStatus | rustnn_graph_builder_webnn_text (const struct RustnnGraphBuilder *builder, const struct RustnnNamedOperand *outputs, uintptr_t outputs_len, char **text) |
| Serialize [MLGraphBuilder] output operands as rustnn WebNN text. | |
| void | rustnn_string_destroy (char *value) |
| Release a string returned by this C API. | |
| typedef enum RustnnBackend RustnnBackend |
Backend hint for [MLContextOptions], wrapping [Backend].
Automatic leaves backend selection to rustnn.
| typedef struct RustnnBackendDevice RustnnBackendDevice |
C representation of [BackendDevice].
device_index is the ONNX execution-provider device index or TensorRT CUDA device index. It must be zero for the other backends, whose Rust device variants do not carry an index.
| typedef enum RustnnBinaryOperation RustnnBinaryOperation |
Implementation detail of the C++ API.
| typedef struct RustnnContext RustnnContext |
| typedef struct RustnnContextOptions RustnnContextOptions |
C representation of [MLContextOptions].
| typedef enum RustnnDataType RustnnDataType |
C representation of [MLOperandDataType].
| typedef enum RustnnDeviceType RustnnDeviceType |
C representation of [DeviceType] for a [BackendDevice] hint.
| typedef struct RustnnGraph RustnnGraph |
| typedef struct RustnnGraphBuilder RustnnGraphBuilder |
Opaque handle wrapping [MLGraphBuilder].
See WebNN graph builder.
| typedef struct RustnnNamedOperand RustnnNamedOperand |
Name and operand pair used to form [MLNamedOperands].
See WebNN named operands.
| typedef struct RustnnNamedTensor RustnnNamedTensor |
Name and tensor pair used to form [MLNamedTensors].
See WebNN named tensors.
| typedef struct RustnnOperand RustnnOperand |
| typedef struct RustnnOperandDescriptor RustnnOperandDescriptor |
Opaque handle wrapping [MLOperandDescriptor].
| typedef struct RustnnOperatorOptions RustnnOperatorOptions |
C representation of [MLOperatorOptions] shared by the operations exposed by this ABI.
A null label is equivalent to an empty label.
| typedef struct RustnnOptions RustnnOptions |
C representation of [RustNNOptions].
The other backend option structures in the Rust API are currently empty, so TensorRT is the only member with settings.
| typedef enum RustnnPowerPreference RustnnPowerPreference |
C representation of [MLPowerPreference].
| typedef enum RustnnStatus RustnnStatus |
Result of a C API call.
Call rustnn_last_error_message for failure details.
| typedef struct RustnnTensor RustnnTensor |
| typedef struct RustnnTensorDescriptor RustnnTensorDescriptor |
Opaque handle wrapping [MLTensorDescriptor].
| typedef enum RustnnTernaryOperation RustnnTernaryOperation |
Implementation detail of the C++ API.
| typedef struct RustnnTrtxOptions RustnnTrtxOptions |
C representation of [TrtxOptions].
| typedef enum RustnnUnaryOperation RustnnUnaryOperation |
Implementation detail of the C++ API.
| enum RustnnBackend |
Backend hint for [MLContextOptions], wrapping [Backend].
Automatic leaves backend selection to rustnn.
Implementation detail of the C++ API.
| enum RustnnDataType |
| enum RustnnDeviceType |
| enum RustnnStatus |
Result of a C API call.
Call rustnn_last_error_message for failure details.
| enum RustnnUnaryOperation |
Implementation detail of the C++ API.
| enum RustnnStatus rustnn_context_create | ( | const struct RustnnContextOptions * | options, |
| struct RustnnContext ** | output | ||
| ) |
Create an [MLContext].
A null options pointer uses the default WebNN hints.
See WebNN specification.
| enum RustnnStatus rustnn_context_create_tensor | ( | struct RustnnContext * | context, |
| const struct RustnnTensorDescriptor * | descriptor, | ||
| struct RustnnTensor ** | output | ||
| ) |
Allocate an [MLTensor] from an [MLTensorDescriptor].
See WebNN specification.
| void rustnn_context_destroy | ( | struct RustnnContext * | context | ) |
| enum RustnnStatus rustnn_context_dispatch | ( | struct RustnnContext * | context, |
| struct RustnnGraph * | graph, | ||
| const struct RustnnNamedTensor * | inputs, | ||
| uintptr_t | inputs_len, | ||
| const struct RustnnNamedTensor * | outputs, | ||
| uintptr_t | outputs_len | ||
| ) |
Run an [MLGraph] through [MLContext] with named input and output tensors.
See WebNN specification.
| struct RustnnContextOptions rustnn_context_options_default | ( | void | ) |
Return the default [MLContextOptions].
See WebNN specification.
| enum RustnnStatus rustnn_context_read_tensor | ( | struct RustnnContext * | context, |
| const struct RustnnTensor * | tensor, | ||
| void * | data, | ||
| uintptr_t | data_len | ||
| ) |
Copy bytes from an [MLTensor] through [MLContext].
See WebNN specification.
| enum RustnnStatus rustnn_context_write_tensor | ( | struct RustnnContext * | context, |
| const struct RustnnTensor * | tensor, | ||
| const void * | data, | ||
| uintptr_t | data_len | ||
| ) |
Copy bytes into an [MLTensor] through [MLContext].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_abs | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the abs operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_abs_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the abs operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_add | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the add operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_add_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the add operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_arg_max | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| uint32_t | axis, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the arg max operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_arg_min | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| uint32_t | axis, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the arg min operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_average_pool2d | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the average pool2d operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_batch_normalization | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | first, | ||
| const struct RustnnOperand * | second, | ||
| const struct RustnnOperand * | third, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the batch normalization operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_binary | ( | struct RustnnGraphBuilder * | builder, |
| enum RustnnBinaryOperation | operation, | ||
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply a selected binary operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_binary_with_options | ( | struct RustnnGraphBuilder * | builder, |
| enum RustnnBinaryOperation | operation, | ||
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Implementation detail of the C++ API.
| enum RustnnStatus rustnn_graph_builder_build | ( | struct RustnnGraphBuilder ** | builder, |
| const struct RustnnNamedOperand * | outputs, | ||
| uintptr_t | outputs_len, | ||
| struct RustnnGraph ** | graph | ||
| ) |
Compile a runtime-backed [MLGraphBuilder] into an [MLGraph] and consume it, setting builder to null.
The originating context must outlive the returned graph. See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_cast | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| enum RustnnDataType | data_type, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the cast operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_ceil | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the ceil operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_ceil_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the ceil operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_clamp | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the clamp operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_concat | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand *const * | inputs, | ||
| uintptr_t | inputs_len, | ||
| uint32_t | axis, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the concat operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_constant | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperandDescriptor * | descriptor, | ||
| const void * | data, | ||
| uintptr_t | data_len, | ||
| struct RustnnOperand ** | output | ||
| ) |
Create a constant [MLOperand] from descriptor and bytes on [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_conv2d | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the conv2d operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_conv_transpose2d | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the conv transpose2d operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_cos | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the cos operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_cos_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the cos operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_create | ( | struct RustnnContext * | context, |
| struct RustnnGraphBuilder ** | output | ||
| ) |
Create a runtime-backed [MLGraphBuilder] that exclusively borrows context.
The context must remain alive and must not be used until this builder is consumed by rustnn_graph_builder_build or destroyed. See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_create_uncompiled | ( | struct RustnnGraphBuilder ** | output | ) |
Create an uncompiled [MLGraphBuilder] for graph construction and serialization.
| enum RustnnStatus rustnn_graph_builder_cumulative_sum | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| uint32_t | axis, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the cumulative sum operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_dequantize_linear | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperand * | scale, | ||
| const struct RustnnOperand * | zero_point, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the dequantize linear operation using [MLGraphBuilder].
See WebNN specification.
| void rustnn_graph_builder_destroy | ( | struct RustnnGraphBuilder * | builder | ) |
Release an [MLGraphBuilder] handle.
A null pointer is accepted.
| enum RustnnStatus rustnn_graph_builder_divide | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the divide operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_divide_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the divide operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_elu | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the elu operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_equal | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the equal operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_equal_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the equal operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_erf | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the erf operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_erf_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the erf operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_exp | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the exp operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_exp_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the exp operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_expand | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const uint32_t * | new_shape, | ||
| uintptr_t | new_shape_len, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the expand operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_floor | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the floor operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_floor_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the floor operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_gather | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the gather operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_gather_elements | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the gather elements operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_gather_nd | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the gather nd operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_gelu | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the gelu operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_gelu_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the gelu operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_gemm | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the gemm operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_greater | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the greater operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_greater_or_equal | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the greater or equal operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_greater_or_equal_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the greater or equal operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_greater_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the greater operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_gru | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperand * | weight, | ||
| const struct RustnnOperand * | recurrent_weight, | ||
| uint32_t | steps, | ||
| uint32_t | hidden_size, | ||
| struct RustnnOperand ** | outputs, | ||
| uintptr_t | outputs_capacity, | ||
| uintptr_t * | outputs_len | ||
| ) |
Apply the gru operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_gru_cell | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperand * | weight, | ||
| const struct RustnnOperand * | recurrent_weight, | ||
| const struct RustnnOperand * | hidden_state, | ||
| uint32_t | hidden_size, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the gru cell operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_hard_sigmoid | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the hard sigmoid operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_hard_swish | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the hard swish operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_identity | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the identity operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_identity_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the identity operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_input | ( | struct RustnnGraphBuilder * | builder, |
| const char * | name, | ||
| const struct RustnnOperandDescriptor * | descriptor, | ||
| struct RustnnOperand ** | output | ||
| ) |
Declare a named input [MLOperand] on [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_instance_normalization | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the instance normalization operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_is_infinite | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the is infinite operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_is_infinite_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the is infinite operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_is_nan | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the is nan operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_is_nan_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the is nan operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_l2_pool2d | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the l2 pool2d operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_layer_normalization | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the layer normalization operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_leaky_relu | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the leaky relu operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_lesser | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the lesser operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_lesser_or_equal | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the lesser or equal operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_lesser_or_equal_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the lesser or equal operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_lesser_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the lesser operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_linear | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the linear operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_log | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the log operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_log_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the log operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_logical_and | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the logical and operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_logical_and_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the logical and operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_logical_not | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the logical not operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_logical_not_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the logical not operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_logical_or | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the logical or operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_logical_or_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the logical or operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_logical_xor | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the logical xor operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_logical_xor_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the logical xor operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_lstm | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperand * | weight, | ||
| const struct RustnnOperand * | recurrent_weight, | ||
| uint32_t | steps, | ||
| uint32_t | hidden_size, | ||
| struct RustnnOperand ** | outputs, | ||
| uintptr_t | outputs_capacity, | ||
| uintptr_t * | outputs_len | ||
| ) |
Apply the lstm operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_lstm_cell | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperand * | weight, | ||
| const struct RustnnOperand * | recurrent_weight, | ||
| const struct RustnnOperand * | hidden_state, | ||
| const struct RustnnOperand * | cell_state, | ||
| uint32_t | hidden_size, | ||
| struct RustnnOperand ** | outputs, | ||
| uintptr_t | outputs_capacity, | ||
| uintptr_t * | outputs_len | ||
| ) |
Apply the lstm cell operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_matmul | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the matmul operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_matmul_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the matmul operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_max_pool2d | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the max pool2d operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_maximum | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the maximum operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_maximum_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the maximum operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_minimum | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the minimum operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_minimum_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the minimum operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_multiply | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the multiply operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_multiply_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the multiply operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_negate | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the negate operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_negate_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the negate operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_not_equal | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the not equal operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_not_equal_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the not equal operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_operand_data_type | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | operand, | ||
| enum RustnnDataType * | data_type | ||
| ) |
Read an [MLOperand] data type from [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_operand_shape | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | operand, | ||
| uint64_t * | dimensions, | ||
| uintptr_t | dimensions_capacity, | ||
| uintptr_t * | dimensions_len | ||
| ) |
Copy an [MLOperand] shape from [MLGraphBuilder].
Set dimensions to null and capacity to zero to query the required length.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_pad | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const uint32_t * | beginning_padding, | ||
| uintptr_t | beginning_padding_len, | ||
| const uint32_t * | ending_padding, | ||
| uintptr_t | ending_padding_len, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the pad operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_power | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the power operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_power_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the power operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_prelu | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the prelu operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_quantize_linear | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperand * | scale, | ||
| const struct RustnnOperand * | zero_point, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the quantize linear operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_reciprocal | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the reciprocal operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_reciprocal_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the reciprocal operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_reduce_l1 | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the reduce l1 operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_reduce_l2 | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the reduce l2 operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_reduce_log_sum | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the reduce log sum operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_reduce_log_sum_exp | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the reduce log sum exp operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_reduce_max | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the reduce max operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_reduce_mean | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the reduce mean operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_reduce_min | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the reduce min operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_reduce_product | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the reduce product operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_reduce_sum | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the reduce sum operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_reduce_sum_square | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the reduce sum square operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_relu | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the relu operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_relu_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the relu operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_resample2d | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the resample2d operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_reshape | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const uint32_t * | new_shape, | ||
| uintptr_t | new_shape_len, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the reshape operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_reverse | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the reverse operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_round_even | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the round even operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_round_even_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the round even operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_scatter_elements | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | first, | ||
| const struct RustnnOperand * | second, | ||
| const struct RustnnOperand * | third, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the scatter elements operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_scatter_nd | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | first, | ||
| const struct RustnnOperand * | second, | ||
| const struct RustnnOperand * | third, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the scatter nd operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_shape | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the shape operation using [MLGraphBuilder].
This is an extension proposed in https://github.com/webmachinelearning/webnn/pull/945
| enum RustnnStatus rustnn_graph_builder_shape_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the shape operation using [MLGraphBuilder].
This is an extension proposed in https://github.com/webmachinelearning/webnn/pull/945
| enum RustnnStatus rustnn_graph_builder_sigmoid | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the sigmoid operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_sigmoid_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the sigmoid operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_sign | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the sign operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_sign_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the sign operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_sin | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the sin operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_sin_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the sin operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_slice | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const uint32_t * | starts, | ||
| uintptr_t | starts_len, | ||
| const uint32_t * | sizes, | ||
| uintptr_t | sizes_len, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the slice operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_softmax | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| uint32_t | axis, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the softmax operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_softplus | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the softplus operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_softplus_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the softplus operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_softsign | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the softsign operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_softsign_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the softsign operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_split | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const uint32_t * | splits, | ||
| uintptr_t | splits_len, | ||
| struct RustnnOperand ** | outputs, | ||
| uintptr_t | outputs_capacity, | ||
| uintptr_t * | outputs_len | ||
| ) |
Apply the split operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_split_equal | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| uint32_t | num_splits, | ||
| struct RustnnOperand ** | outputs, | ||
| uintptr_t | outputs_capacity, | ||
| uintptr_t * | outputs_len | ||
| ) |
Apply the split equal operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_sqrt | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the sqrt operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_sqrt_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the sqrt operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_squeeze | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the squeeze operation using [MLGraphBuilder].
| enum RustnnStatus rustnn_graph_builder_subtract | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the subtract operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_subtract_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | lhs, | ||
| const struct RustnnOperand * | rhs, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the subtract operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_tan | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the tan operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_tan_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the tan operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_tanh | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the tanh operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_tanh_with_options | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the tanh operation using [MLGraphBuilder] with a label.
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_ternary | ( | struct RustnnGraphBuilder * | builder, |
| enum RustnnTernaryOperation | operation, | ||
| const struct RustnnOperand * | first, | ||
| const struct RustnnOperand * | second, | ||
| const struct RustnnOperand * | third, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply a selected ternary operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_tile | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| const uint32_t * | repetitions, | ||
| uintptr_t | repetitions_len, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the tile operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_transpose | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the transpose operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_triangular | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the triangular operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_unary | ( | struct RustnnGraphBuilder * | builder, |
| enum RustnnUnaryOperation | operation, | ||
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply a selected unary operation using [MLGraphBuilder].
See WebNN specification.
| enum RustnnStatus rustnn_graph_builder_unary_with_options | ( | struct RustnnGraphBuilder * | builder, |
| enum RustnnUnaryOperation | operation, | ||
| const struct RustnnOperand * | input, | ||
| const struct RustnnOperatorOptions * | options, | ||
| struct RustnnOperand ** | output | ||
| ) |
Implementation detail of the C++ API.
| enum RustnnStatus rustnn_graph_builder_unsqueeze | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | input, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the unsqueeze operation using [MLGraphBuilder].
| enum RustnnStatus rustnn_graph_builder_webnn_text | ( | const struct RustnnGraphBuilder * | builder, |
| const struct RustnnNamedOperand * | outputs, | ||
| uintptr_t | outputs_len, | ||
| char ** | text | ||
| ) |
Serialize [MLGraphBuilder] output operands as rustnn WebNN text.
Release the returned string with rustnn_string_destroy.
| enum RustnnStatus rustnn_graph_builder_where | ( | struct RustnnGraphBuilder * | builder, |
| const struct RustnnOperand * | first, | ||
| const struct RustnnOperand * | second, | ||
| const struct RustnnOperand * | third, | ||
| struct RustnnOperand ** | output | ||
| ) |
Apply the where operation using [MLGraphBuilder].
See WebNN specification.
| void rustnn_graph_destroy | ( | struct RustnnGraph * | graph | ) |
| void rustnn_init_logger | ( | void | ) |
Install rustnn's pretty_env_logger global logger if no logger is installed yet.
Set RUST_LOG before calling this function. Repeated calls are safe; calls made after another global logger has already been installed have no effect.
| const char * rustnn_last_error_message | ( | void | ) |
Return the last C API error message for this thread.
The pointer remains valid until the next error on this thread.
| enum RustnnStatus rustnn_operand_descriptor_create | ( | enum RustnnDataType | data_type, |
| const uint64_t * | shape, | ||
| uintptr_t | shape_len, | ||
| struct RustnnOperandDescriptor ** | output | ||
| ) |
Allocate an [MLOperandDescriptor] from a data type and shape.
See WebNN specification.
| void rustnn_operand_descriptor_destroy | ( | struct RustnnOperandDescriptor * | descriptor | ) |
| void rustnn_operand_destroy | ( | struct RustnnOperand * | operand | ) |
Release an [MLOperand] handle.
A null pointer is accepted.
| void rustnn_string_destroy | ( | char * | value | ) |
Release a string returned by this C API.
A null pointer is accepted.
| enum RustnnStatus rustnn_tensor_descriptor_create | ( | enum RustnnDataType | data_type, |
| const uint64_t * | shape, | ||
| uintptr_t | shape_len, | ||
| bool | readable, | ||
| bool | writable, | ||
| struct RustnnTensorDescriptor ** | output | ||
| ) |
Allocate an [MLTensorDescriptor].
See WebNN specification.
| void rustnn_tensor_descriptor_destroy | ( | struct RustnnTensorDescriptor * | descriptor | ) |
| void rustnn_tensor_destroy | ( | struct RustnnTensor * | tensor | ) |