# Getting started

To use Halide for HVX, you need the Qualcomm® Hexagon™ Software
Development Kit (SDK) in addition to the Halide installer. Follow these steps
to download and install the Hexagon SDK.

## Download the Hexagon SDK

1. Visit [https://developer.qualcomm.com/software/hexagon-dsp-sdk/tools](https://developer.qualcomm.com/software/hexagon-dsp-sdk/tools).
2. Download and install **Qualcomm Package Manager** for Linux.
3. Run QPM, and on the top tool bar, click **All**.
4. Scroll down and click the **Qualcomm Hexagon SDK Product Suite**.
5. Click **Hexagon SDK 6.x**.
6. Select a version, at least **6.0.0.0**.
7. Click the pull-down icon next to the version number and select **Install**.
8. Accept the terms of the license agreement.
9. Click **Customize**.
10. Accept or specify the SDK install directory.
11. Click **Next**.
12. Select **Full Android NDK** and **Eclipse**, and de-select **Minimal Android NDK**.
13. Click **Next**.
14. Proceed with the installation.

Note

If you do not have Android NDK r25c installed, choose the option to do a
full install so it will also be installed.

## Examples of running Halide

See [Halide examples](https://docs.qualcomm.com/doc/80-PD002-1/topic/examples.html#halideexamples).

## Release notes for Version 2.6

Following are the changes made in this release (Qualcomm® Halide
2.6) in comparison to the previous major release (Qualcomm®
Halide 2.5.0).

### Support for Windows on Snapdragon (WoS)

This release adds support for cross-compiling Halide examples for Windows on Snapdragon (WoS)
in device standalone mode. For Halide windows installer the individual scripts are
present in device standalone mode examples conv3x3, dilate3x3, gaussian5x5, median3x3,
morph\_edge, sobel examples with the name `test-<example>-wos.cmd` which uses the central
simplified `test-wos.cmd` script. The `test-wos.cmd` script present in
`%HALIDE_ROOT%\Examples\standalone\device\apps` can be used by any user defined device
standalone example if `TEST` variable is set to respective example name.

### Support for HVX v69, v73, v75 and v79

This release adds support for HVX versions 69, 73, 75, and 79.
Use the `hvx-hvx_v69`, `hvx-hvx_v73`, `hvx-hvx_v75`, and `hvx-hvx_v79`
target features to build for their respective versions. The `Q6_VERSION`
must be set to the respective HVX version for which it is building. For example,
for `hvx-hvx_v75` the `Q6_VERSION` must be set to `75`.

### Deprecate hvx\_v66 and hvx\_v68 target features and make v68 minimum supported version

This release deprecates the `hvx_v66` and `hvx_v68` target features. The default ISA
is now HVX v68. Using the `hvx` target feature now instructs the Halide compiler to generate
code for HVX v68 ISA. See the examples provided with this release for correct usage, both in C++
and in the build system.

### Support TURBO\_L2, TURBO\_L3, MAX power modes for HVX

This release adds support for new DCVS target voltage corners called
`HAP_DCVS_VCORNER_TURBO_L2`, `HAP_DCVS_VCORNER_TURBO_L3` and `HAP_DCVS_VCORNER_MAX`.
These voltage corners can be voted for by using the `halide_hexagon_power_mode_t`
values of `halide_hexagon_power_turbo_l2`, `halide_hexagon_power_turbo_l3` and
`halide_hexagon_power_max` respectively when calling `halide_hexagon_set_performance_mode`.
On Snapdragon chipsets SM8650 and later, `halide_power_mode_turbo_l2`,
`halide_power_mode_turbo_l3` and `halide_power_mode_max` will result in a
vote for `HAP_DCVS_VCORNER_TURBO_L2`, `HAP_DCVS_VCORNER_TURBO_L3` and
`HAP_DCVS_VCORNER_MAX` voltage corners respectively.
On older Snapdragon chipsets where these voltage corners are not supported,
Halide will ensure a vote for a lower supported voltage corner.
The use of `halide_power_mode_max` will result in a vote for the voltage
corner `HAP_DCVS_VCORNER_MAX` on all Snapdragon chipsets.

### Migration to Multi-Domain RPC in Halide Runtime

This release migrates the Halide runtime from non-domain RPC to multi-domain RPC,
enhancing support for multi-DSP applications and frameworks in Halide.

### Security Version for Halide Runtime Libraries

This release adds versioning to libhalide\_remote\_skel.so,
the shared runtime (libhalide\_shared\_runtime.so), and kernel code (libhalide\_hexagon\_code.so)
generated by Halide. This allows OEMs to whitelist or blacklist libraries in the signed DSP PD.

### Transition to RPCMEM libary for Ion-Allocation

This release uses RPCMem APIs instead of DMABUFHeap APIs for host allocations,
while ensuring no external impact to users.

### System Requirements

Minimum system requirements are as follows

- Clang 7.0 with libc++ as the native (x86) compiler and C++ runtime library
respectively.
- Ubuntu 20.04
- SDK 6.0.0.2 or higher.

Note

SDK 6.0.0.2 contains an updated QAIC IDL compiler that includes important
security fixes. Note that while these fixes are recommended for all devices, on
SM8650 and newer devices the QAIC generated skel shared objects will also be
version checked when run. On SM8650 and newer devices, only skel objects that
have been built with all the QAIC security fixes are allowed to run on the DSP.
As a general rule of thumb, if a QAIC IDL compiler version mismatch is reported
in the DSP logs, please upgrade to the latest Hexagon SDK available.

Last Published: Jul 08, 2024

[Next Topic
The Halide programming language](https://docs.qualcomm.com/bundle/publicresource/80-PD002-1/topics/halide.md)