Re:Demystifying NPUs: Questions and Answers
by eterps on Tuesday June 11, 2024 @01:20PM
(#40648969)
I'm also wondering if such an NPU can be targeted (in a way that can be understood) from the assembly/machine language level. Or that it needs an opaque kitchen sink of libraries, blobs and other abstractions.
[ Parent
| on HN ]
You can write assembly for NPUs although the instruction set may be quite janky compared to CPUs. Once you've written NPU code you need some libraries to load your code but that's not particularly different from the fact that CPUs now need massive firmware to boot.
Back in reality, that's not how any vendor intends their NPUs to be used. They provide high-level libraries that implement ONNX, CoreML, DirectML, or whatever and they expect you to just use those.
I believe it's the latter, each NPU vendor has their own software stack. Take a look at Tomeu Vizoso's work: