Use Sparsr through a hyperdimensional computing library, from C or from Python.
This path is for people who work with hypervectors and want them to run on Sparsr without writing a kernel. You do not install the Sparsr SDK and you do not need a cross-toolchain. A hypervector is one 4,096-bit wide register, so binding two of them is one instruction, and the kernels are inside the library.
There are two pieces, and they are the same library seen from two languages:
libsparsr_hdc,
a C library with the four operations HDC needs: bind, bundle, similarity and
train. Everything below runs through it..to("sparsr"), and the
package computes nothing itself: every operation is a call into the C library.Both run on the Sparsr VM, the software model of the
processor. The library's kernels are RV32I, and the VM runs RV32I. Set
SPARSR_BACKEND=vm to choose it.
sparsr-hdc-<version>.tar.gz,
beside the Kernel SDK on the Sparsr Developer Zone.
It holds the library, its header, the runtime it needs and its licences. The
assembler and the intrinsics header belong to the Kernel SDK and are not in it,
because a caller of this library never needs them.pip install torchhd-sparsr. It carries
everything it needs, so you do not have to install an SDK or a compiler. Its page says
which Torchhd operations it runs and which it refuses.