useful-transformers icon indicating copy to clipboard operation
useful-transformers copied to clipboard

请教模型是如何利用3588的npu计算的

Open YuRui997 opened this issue 2 years ago • 1 comments

作者要是有空,是否可以讲解一下代码是如何利用3588的npu的呢

YuRui997 avatar Oct 09 '23 15:10 YuRui997

@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.

keveman avatar Oct 10 '23 03:10 keveman