Skip to content
heliaCORE
API reference
HELIA HUB

SVDF Functions

Machine-readable model

function

Stateful singular value decomposition filter.

Include/arm_nnfunctions_flt.h:1694

arm_cmsis_nn_status arm_svdf_f32(
const cmsis_nn_context *ctx,
const cmsis_nn_context *input_ctx,
const cmsis_nn_context *output_ctx,
const cmsis_nn_svdf_params_f32 *svdf_params,
const cmsis_nn_dims *input_dims,
const float32_t *input_data,
const cmsis_nn_dims *state_dims,
float32_t *state_data,
const cmsis_nn_dims *weights_feature_dims,
const float32_t *weights_feature_data,
const cmsis_nn_dims *weights_time_dims,
const float32_t *weights_time_data,
const cmsis_nn_dims *bias_dims,
const float32_t *bias_data,
const cmsis_nn_dims *output_dims,
float32_t *output_data
)

Stateful singular value decomposition filter.

Parameters of arm_svdf_f32
NameTypeDirectionDescription
ctxconst cmsis_nn_context *inUnused by this function. Reserved for future use; may be NULL.
input_ctxconst cmsis_nn_context *in, outMandatory, not optional: a NULL input_ctx, or a NULL input_ctx->buf, is diagnosed with ARM_CMSIS_NN_ARG_ERROR on every build. Staging buffer written by this function, holding one element per (input batch, feature batch). Written before it is read, so its contents on entry do not matter, but it is written on EVERY build, not only under MVE. Sized by arm_svdf_f32_input_ctx_get_buffer_size(input_dims, weights_feature_dims): input_dims->n * weights_feature_dims->n * sizeof(float32_t) bytes. Setting input_ctx->size lets this function reject an undersized buffer with ARM_CMSIS_NN_ARG_ERROR; leaving it at zero opts out of that check. The caller is expected to clear the buffer, if applicable, for security reasons.
output_ctxconst cmsis_nn_context *in, outMandatory, not optional: a NULL output_ctx, or a NULL output_ctx->buf, is diagnosed with ARM_CMSIS_NN_ARG_ERROR on every build. Staging buffer written by this function, holding one element per (input batch, output unit). Written before it is read, so its contents on entry do not matter, but it is written on EVERY build, not only under MVE. Sized by arm_svdf_f32_output_ctx_get_buffer_size(svdf_params, input_dims, weights_feature_dims): input_dims->n * (weights_feature_dims->n / svdf_params->rank) * sizeof(float32_t) bytes, truncating division. Setting output_ctx->size lets this function reject an undersized buffer with ARM_CMSIS_NN_ARG_ERROR; leaving it at zero opts out of that check. The caller is expected to clear the buffer, if applicable, for security reasons.
svdf_paramsconst cmsis_nn_svdf_params_f32 *inSVDF operator parameters.
input_dimsconst cmsis_nn_dims *inInput tensor dimensions.
input_dataconst float32_t *inPointer to the input tensor data.
state_dimsconst cmsis_nn_dims *inState tensor dimensions.
state_datafloat32_t *in, outPointer to the mutable state tensor.
weights_feature_dimsconst cmsis_nn_dims *inFeature-weight tensor dimensions.
weights_feature_dataconst float32_t *inPointer to the feature-weight tensor.
weights_time_dimsconst cmsis_nn_dims *inTime-weight tensor dimensions.
weights_time_dataconst float32_t *inPointer to the time-weight tensor.
bias_dimsconst cmsis_nn_dims *inBias tensor dimensions.
bias_dataconst float32_t *inOptional bias tensor data.
output_dimsconst cmsis_nn_dims *inOutput tensor dimensions.
output_datafloat32_t *outPointer to the output tensor data.
Returns of arm_svdf_f32
Description
`ARM_CMSIS_NN_SUCCESS` on success or `ARM_CMSIS_NN_ARG_ERROR` on invalid arguments.
function

Get size of the inputctx staging buffer required by armsvdff32().

Include/arm_nnfunctions_flt.h:1734

int32_t arm_svdf_f32_input_ctx_get_buffer_size(
const cmsis_nn_dims *input_dims,
const cmsis_nn_dims *weights_feature_dims
)

Get size of the input_ctx staging buffer required by arm_svdf_f32().

Parameters of arm_svdf_f32_input_ctx_get_buffer_size
NameTypeDirectionDescription
input_dimsconst cmsis_nn_dims *inInput tensor dimensions, i.e. the same `cmsis_nn_dims` passed to `arm_svdf_f32()`.
weights_feature_dimsconst cmsis_nn_dims *inFeature-weight tensor dimensions, i.e. the same `cmsis_nn_dims` passed to `arm_svdf_f32()`.
Returns of arm_svdf_f32_input_ctx_get_buffer_size
Description
Required buffer size in bytes: input_dims->n * weights_feature_dims->n * sizeof(float32_t). Returns -1 if either pointer is NULL, if input_dims->n or weights_feature_dims->n is negative, or if the product would not fit in an int32_t. The figure and the validation are the same on every build target, since `arm_svdf_f32()` stages this buffer on every build rather than only under MVE.
function

Get size of the outputctx staging buffer required by armsvdff32().

Include/arm_nnfunctions_flt.h:1754

int32_t arm_svdf_f32_output_ctx_get_buffer_size(
const cmsis_nn_svdf_params_f32 *svdf_params,
const cmsis_nn_dims *input_dims,
const cmsis_nn_dims *weights_feature_dims
)

Get size of the output_ctx staging buffer required by arm_svdf_f32().

Parameters of arm_svdf_f32_output_ctx_get_buffer_size
NameTypeDirectionDescription
svdf_paramsconst cmsis_nn_svdf_params_f32 *inSVDF operator parameters; only svdf_params->rank is read.
input_dimsconst cmsis_nn_dims *inInput tensor dimensions, i.e. the same `cmsis_nn_dims` passed to `arm_svdf_f32()`.
weights_feature_dimsconst cmsis_nn_dims *inFeature-weight tensor dimensions, i.e. the same `cmsis_nn_dims` passed to `arm_svdf_f32()`.
Returns of arm_svdf_f32_output_ctx_get_buffer_size
Description
Required buffer size in bytes: input_dims->n * (weights_feature_dims->n / svdf_params->rank) * sizeof(float32_t), truncating division to match the kernel's own unit count. Returns -1 if any pointer is NULL, if svdf_params->rank is zero or negative, if input_dims->n or weights_feature_dims->n is negative, or if the product would not fit in an int32_t.
function

Stateful singular value decomposition filter, float16 variant.

Include/arm_nnfunctions_flt.h:3479

arm_cmsis_nn_status arm_svdf_f16(
const cmsis_nn_context *ctx,
const cmsis_nn_context *input_ctx,
const cmsis_nn_context *output_ctx,
const cmsis_nn_svdf_params_f16 *svdf_params,
const cmsis_nn_dims *input_dims,
const float16_t *input_data,
const cmsis_nn_dims *state_dims,
float16_t *state_data,
const cmsis_nn_dims *weights_feature_dims,
const float16_t *weights_feature_data,
const cmsis_nn_dims *weights_time_dims,
const float16_t *weights_time_data,
const cmsis_nn_dims *bias_dims,
const float16_t *bias_data,
const cmsis_nn_dims *output_dims,
float16_t *output_data
)

Stateful singular value decomposition filter, float16 variant.

Parameters of arm_svdf_f16
NameTypeDirectionDescription
ctxconst cmsis_nn_context *inUnused by this function. Reserved for future use; may be NULL.
input_ctxconst cmsis_nn_context *in, outMandatory, not optional: a NULL input_ctx, or a NULL input_ctx->buf, is diagnosed with ARM_CMSIS_NN_ARG_ERROR on every build. Staging buffer written by this function, holding one element per (input batch, feature batch). Written before it is read, so its contents on entry do not matter, but it is written on EVERY build, not only under MVE. Sized by arm_svdf_f16_input_ctx_get_buffer_size(input_dims, weights_feature_dims): input_dims->n * weights_feature_dims->n * sizeof(float16_t) bytes. Note this is float16_t, half the `arm_svdf_f32()` figure for the same shape. Setting input_ctx->size lets this function reject an undersized buffer with ARM_CMSIS_NN_ARG_ERROR; leaving it at zero opts out of that check. The caller is expected to clear the buffer, if applicable, for security reasons.
output_ctxconst cmsis_nn_context *in, outMandatory, not optional: a NULL output_ctx, or a NULL output_ctx->buf, is diagnosed with ARM_CMSIS_NN_ARG_ERROR on every build. Staging buffer written by this function, holding one element per (input batch, output unit). Written before it is read, so its contents on entry do not matter, but it is written on EVERY build, not only under MVE. Sized by arm_svdf_f16_output_ctx_get_buffer_size(svdf_params, input_dims, weights_feature_dims): input_dims->n * (weights_feature_dims->n / svdf_params->rank) * sizeof(float16_t) bytes, truncating division. Note this is float16_t, half the `arm_svdf_f32()` figure for the same shape. Setting output_ctx->size lets this function reject an undersized buffer with ARM_CMSIS_NN_ARG_ERROR; leaving it at zero opts out of that check. The caller is expected to clear the buffer, if applicable, for security reasons.
svdf_paramsconst cmsis_nn_svdf_params_f16 *inSVDF operator parameters.
input_dimsconst cmsis_nn_dims *inInput tensor dimensions.
input_dataconst float16_t *inPointer to the input tensor data.
state_dimsconst cmsis_nn_dims *inState tensor dimensions.
state_datafloat16_t *in, outPointer to the mutable state tensor.
weights_feature_dimsconst cmsis_nn_dims *inFeature-weight tensor dimensions.
weights_feature_dataconst float16_t *inPointer to the feature-weight tensor.
weights_time_dimsconst cmsis_nn_dims *inTime-weight tensor dimensions.
weights_time_dataconst float16_t *inPointer to the time-weight tensor.
bias_dimsconst cmsis_nn_dims *inBias tensor dimensions.
bias_dataconst float16_t *inOptional bias tensor data.
output_dimsconst cmsis_nn_dims *inOutput tensor dimensions.
output_datafloat16_t *outPointer to the output tensor data.
Returns of arm_svdf_f16
Description
`ARM_CMSIS_NN_SUCCESS` on success or `ARM_CMSIS_NN_ARG_ERROR` on invalid arguments.
function

Get size of the inputctx staging buffer required by armsvdff16().

Include/arm_nnfunctions_flt.h:3521

int32_t arm_svdf_f16_input_ctx_get_buffer_size(
const cmsis_nn_dims *input_dims,
const cmsis_nn_dims *weights_feature_dims
)

Get size of the input_ctx staging buffer required by arm_svdf_f16().

Parameters of arm_svdf_f16_input_ctx_get_buffer_size
NameTypeDirectionDescription
input_dimsconst cmsis_nn_dims *inInput tensor dimensions, i.e. the same `cmsis_nn_dims` passed to `arm_svdf_f16()`.
weights_feature_dimsconst cmsis_nn_dims *inFeature-weight tensor dimensions, i.e. the same `cmsis_nn_dims` passed to `arm_svdf_f16()`.
Returns of arm_svdf_f16_input_ctx_get_buffer_size
Description
Required buffer size in bytes: input_dims->n * weights_feature_dims->n * sizeof(float16_t). Returns -1 if either pointer is NULL, if input_dims->n or weights_feature_dims->n is negative, or if the product would not fit in an int32_t. The figure and the validation are the same on every build target, since `arm_svdf_f16()` stages this buffer on every build rather than only under MVE.
function

Get size of the outputctx staging buffer required by armsvdff16().

Include/arm_nnfunctions_flt.h:3544

int32_t arm_svdf_f16_output_ctx_get_buffer_size(
const cmsis_nn_svdf_params_f16 *svdf_params,
const cmsis_nn_dims *input_dims,
const cmsis_nn_dims *weights_feature_dims
)

Get size of the output_ctx staging buffer required by arm_svdf_f16().

Parameters of arm_svdf_f16_output_ctx_get_buffer_size
NameTypeDirectionDescription
svdf_paramsconst cmsis_nn_svdf_params_f16 *inSVDF operator parameters; only svdf_params->rank is read.
input_dimsconst cmsis_nn_dims *inInput tensor dimensions, i.e. the same `cmsis_nn_dims` passed to `arm_svdf_f16()`.
weights_feature_dimsconst cmsis_nn_dims *inFeature-weight tensor dimensions, i.e. the same `cmsis_nn_dims` passed to `arm_svdf_f16()`.
Returns of arm_svdf_f16_output_ctx_get_buffer_size
Description
Required buffer size in bytes: input_dims->n * (weights_feature_dims->n / svdf_params->rank) * sizeof(float16_t), truncating division to match the kernel's own unit count. Returns -1 if any pointer is NULL, if svdf_params->rank is zero or negative, if input_dims->n or weights_feature_dims->n is negative, or if the product would not fit in an int32_t.