# User guide

Use this guide after heliaCORE is linked into your application. It takes you from
choosing a function to supplying its tensors and working memory, enabling the
right execution path, and checking the result on your Ambiq target.

## Deploy a complete model

Most application developers should start with heliaAOT or heliaRT. Both use
heliaCORE for supported operations on Ambiq silicon.

This guide covers direct kernel integration and custom runtimes. If the library
is not integrated yet, start with [Getting started](https://ambiqai.github.io/ns-cmsis-nn/getting-started/).

## Choose your next task

- [Find a kernel](https://ambiqai.github.io/ns-cmsis-nn/guide/coverage/operator-coverage/): Explore operator families and data types, then check the shape and layout requirements of a specific API.
- [Call it correctly](https://ambiqai.github.io/ns-cmsis-nn/guide/using-kernels/calling-kernels/): Choose a wrapper or specialized function, prepare its parameters, and check the returned status and output.
- [Configure the build](https://ambiqai.github.io/ns-cmsis-nn/guide/architecture/build-path-selection/): Include the operator groups and numeric types you need, with matching compiler settings and headers.
- [Measure execution](https://ambiqai.github.io/ns-cmsis-nn/guide/performance/methodology/): Measure representative inputs on your target and separate kernel timing from complete model latency.

## From a model operation to a kernel call

| Step | Decide | Continue with |
|---|---|---|
| Select | Which operation, numeric format, and tensor layout does the model require? | [Operator coverage](https://ambiqai.github.io/ns-cmsis-nn/guide/coverage/operator-coverage/) and [Data types](https://ambiqai.github.io/ns-cmsis-nn/guide/architecture/data-types/) |
| Prepare | Which offsets, multipliers, shapes, and buffers does this API expect? | [Quantization](https://ambiqai.github.io/ns-cmsis-nn/guide/using-kernels/quantization/), [Calling kernels](https://ambiqai.github.io/ns-cmsis-nn/guide/using-kernels/calling-kernels/), and [Memory](https://ambiqai.github.io/ns-cmsis-nn/guide/using-kernels/memory/) |
| Configure | Which source groups and processor features should the build include? | [Build options](https://ambiqai.github.io/ns-cmsis-nn/guide/architecture/build-path-selection/), [Targets](https://ambiqai.github.io/ns-cmsis-nn/guide/architecture/cortex-m-targets/), and [Toolchains](https://ambiqai.github.io/ns-cmsis-nn/guide/architecture/toolchains/) |
| Verify | Does the output match a reference, and is the selected implementation efficient for this shape? | [Acceleration](https://ambiqai.github.io/ns-cmsis-nn/guide/architecture/acceleration-paths/) and [Measurement](https://ambiqai.github.io/ns-cmsis-nn/guide/performance/methodology/) |

An available C function, an accelerated implementation, and an operation supported
by a model runtime are different things. Check the function contract for data-type
and shape restrictions, then confirm that your runtime actually calls it.

## Find the cause of a problem

| Symptom | Start here |
|---|---|
| Function is undeclared or missing at link time | [Build options](https://ambiqai.github.io/ns-cmsis-nn/guide/architecture/build-path-selection/): source groups, data types, and public feature definitions |
| Function returns an error | [Calling kernels](https://ambiqai.github.io/ns-cmsis-nn/guide/using-kernels/calling-kernels/): constraints and status handling |
| Output is incorrect | [Quantization](https://ambiqai.github.io/ns-cmsis-nn/guide/using-kernels/quantization/) and the function's tensor layout in the [API reference](https://ambiqai.github.io/ns-cmsis-nn/reference/) |
| Scratch memory is too large or incorrectly reused | [Memory](https://ambiqai.github.io/ns-cmsis-nn/guide/using-kernels/memory/): sizing, ownership, and lifetime |
| Output is correct but execution is slow | [Acceleration](https://ambiqai.github.io/ns-cmsis-nn/guide/architecture/acceleration-paths/) and [Measurement](https://ambiqai.github.io/ns-cmsis-nn/guide/performance/methodology/) |

The [API reference](https://ambiqai.github.io/ns-cmsis-nn/reference/) is the source for each function's
parameters and constraints. The [kernel index](https://ambiqai.github.io/ns-cmsis-nn/reference/kernel-index/)
lets you search, filter, and sort that inventory without browsing header files.
