useful-transformers
useful-transformers copied to clipboard
请教模型是如何利用3588的npu计算的
作者要是有空,是否可以讲解一下代码是如何利用3588的npu的呢
@YuRui997 We use the matmul API from librknnrt to perform all the matrix multiplications needed in the transformer model. Have a look here https://github.com/usefulsensors/useful-transformers/blob/main/lib/matmul.cc#L107-L117 for the wrapper over matmul API and look for calls to Matmul::call in different parts of the code.