Icemist commented on code in PR #13349:
URL: https://github.com/apache/tvm/pull/13349#discussion_r1032462747


##########
include/tvm/driver/driver_api.h:
##########
@@ -78,20 +78,22 @@ TVM_DLL transform::Sequential 
HostModulePassManager(IRModule mixed_mod, Target t
  * \brief Lower an IRModule (optimize with it with the pass list defined in 
CreatePassList)
  * \param mod The IRmodule to lower
  * \param simple_mode Disables the loop partition pass. Defaults to false.
+ * \param target The device target to provide additional characteristics. 
Defaults to not defined.
  * \return The result module.
  */
-TVM_DLL IRModule LowerModule(IRModule mod, bool simple_mode = false);
+TVM_DLL IRModule LowerModule(IRModule mod, bool simple_mode = false, Target 
target = {});

Review Comment:
   In the case of a refusal to change the api and using only tir.vtcm_capacity 
as a transmitter - 
   
   In tvm.build we can have this logic:
   ```python
   vtcm_capacity = target.vtcm_capacity if target.kind.name == "hexagon" else 0
   with tvm.transform.PassContext(config={"tir.vtcm_capacity": vtcm_capacity}):
        # code uses lowering
        
   ```
   to leave the API as pleasant as possible:
   ```python
   target = tvm.target.hexagon("v68", vtcm_capacity=128)
   target = tvm.target.Target(target, host=target)
   func = tvm.build(sch, [], target, name="func")
   ```
   
   But also anticipate that it will be necessary to find and test/modify 
additional functions including C++ and python parts that use the lowering for 
the hexagon target.



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