comaniac commented on a change in pull request #15:
URL: https://github.com/apache/tvm-rfcs/pull/15#discussion_r686137108



##########
File path: rfcs/0015_Arm_CMSIS-NN_Integration.md
##########
@@ -78,14 +96,18 @@ primfn(placeholder_1: handle, out_write_1: handle) -> ()
     }
 }
 ```
+In future, target hooks for `relay_to_tir` implemented as part of [Additional 
Target Hooks] (https://github.com/apache/tvm-rfcs/pull/10) will be used to 
obtain the above tir for graph with softmax. These hooks provide us with the 
flexibility to reuse memory planning and much of the TVM's code generation 
capabilities.
+
+At last, code generator identifies the *tir* extern_call(s) and generates *c* 
code for softmax with the CMSIS-NN API for softmax int8.
+
+Note: There are no changes required in config.cmake as the CMSIS-NN APIs 
corresponding to the operators are hard coded. The testing infrastructure links 
them to the CMSIS-NN library. Execution of the networks works similar to what 
has been described in [Arm Ethos-U Integration] 
(https://github.com/apache/tvm-rfcs/pull/11).
 
-At last, code generator identifies the extern_call and generates code for 
softmax with the CMSIS-NN API for softmax int8.
+For more complex operations, CMSIS-NN structures will need to be used. For 
this purpose, `tir_to_runtime` will be used to extend the existing C Codegen 
and produce C code with the appropriate headers and calling patterns. Please 
refer to the [Additional Target Hooks] 
(https://github.com/apache/tvm-rfcs/pull/10).

Review comment:
       I would suggest making a robust proposal in the RFC. My takeaway from 
this paragraph is that the above presented design only works for simple ops 
like softmax, and a C codegen has to be proposed later to support complex 
operations. IIUC, then this RFC should also present the C codegen design, 
focusing on CNSIS-NN specific challenges (e.g., how to deal with memory, how to 
deal with subgraphs with multiple operators, etc), to make the CMSIS-NN support 
comprehensive. Then you could present an implementation plan or milestones to 
start working on simple operators followed by complex operators.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to