K3_AI: Run command on SpacemiT K3's AI cores
The K3_AI utility allows users to run commands on the A100 AI cores of the SpacemiT K3 system. It provides a method to execute programs efficiently while ensuring compatibility with the unique architecture of the cores. This utility is particularly beneficial for leveraging the performance of the A100 cores for both normal and vectorized code.
- ▪K3_AI enables running commands with arguments on the A100 AI cores.
- ▪The A100 cores can run all normal Linux programs and offer significant performance benefits for certain vectorized code.
- ▪The utility ensures safe execution by creating a new process before moving it to the A100 cores.
Opening excerpt (first ~120 words) tap to expand
Run command on K3's AI cores Utility to run a command with arguments on the A100 "AI" cores on SpacemiT K3. Quick start $ git clone https://github.com/brucehoult/k3_ai $ cd k3_ai $ make $ ai bash Usage ai cmd arg1 arg2 ... aix path arg1 arg2 ... Normally prefer to use ai. This is a shell script that converts a bare program name to the absolute path of the executable and then chains to aix. It's about 1ms slower than calling aix directly. aix is a tiny assembly language program that needs the absolute or relative path of the program to run. It is written to be pure asm using only syscalls, no libraries, no dynamic linker, so as to be really sure that nothing has used any RVV instructions in this process, and therefore no decisions have been made based on the X100 core's shorter VLEN.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at GitHub.