-
Hi all, I'm trying to build a NPU backend for the Rochchip RK3588 and Tenstorrent cards. I run into a problem with the buffer allocation interface. These accelerator hardware usually demands activation and weights are laid out in the hardware's native format and have limited data type support. My idea was to perform the processing during tensor read and write (deuanltize the buffer, convert to a format the NPU supports then relayout). However, The best I can think of is to re-layout during graph execution. However this feels wrong to me. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
|
Beta Was this translation helpful? Give feedback.
-
Hello @marty1885 , did the branch you pulled support RK3588 at that time? |
Beta Was this translation helpful? Give feedback.
set_tensor
does tell you the data type intensor->type
. Similarly, you can useget_alloc_size
to determine how much memory needs to be allocated for a tensor.