-
|
Hi all, I'm trying to understand if there is a way to pass runtime parameters to the NPU after the kernel has been uploaded. The question is: is there a way to provide runtime parameters when calling the kernel instead of hardcoding them into the MLIR module and having to reprogram the NPU every time they change? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
@andrej would you like to weigh in on this? |
Beta Was this translation helpful? Give feedback.
-
|
This is an interesting question, sorry for not getting to this when it was fresh. You can write to run-time parameters from the runtime sequence, like so. This does not require reloading the rest of the static design (xclbin/ELF) onto the NPU: Compile your design once with If you need many different values for run-time parameters, instead of compiling many |
Beta Was this translation helpful? Give feedback.
This is an interesting question, sorry for not getting to this when it was fresh.
You can write to run-time parameters from the runtime sequence, like so. This does not require reloading the rest of the static design (xclbin/ELF) onto the NPU: Compile your design once with
aiecc.py --aie-generate-xclbin --xclbin-name=my_xclbin.xclbinto get an.xclbinfor the static part of the design. Then, re-compile with different run-time parameter values as many times as needed usingaiecc.py --aie-generate-npu --npu-insts-name=insts_X.bin. In the CPU host code, you can pass different runtime sequences as the second argument to your kernel invocation.If you need many different values for run-time pa…