MNGanesan commented on PR #13798:
URL: https://github.com/apache/tvm/pull/13798#issuecomment-1385425749

   Present --help string has no meaningful description, it simply prints the 
target, option name and python type
   
   ```
   
   target vitis-ai:
     --target-vitis-ai-dpu TARGET_VITIS_AI_DPU
                           **target vitis-ai dpu<class 'str'>**
     --target-vitis-ai-build_dir TARGET_VITIS_AI_BUILD_DIR
                           **target vitis-ai build_dir<class 'str'>**
     --target-vitis-ai-work_dir TARGET_VITIS_AI_WORK_DIR
                           **target vitis-ai work_dir<class 'str'>**
     --target-vitis-ai-export_runtime_module 
TARGET_VITIS_AI_EXPORT_RUNTIME_MODULE
                           **target vitis-ai export_runtime_module<class 
'str'>**
     --target-vitis-ai-load_runtime_module TARGET_VITIS_AI_LOAD_RUNTIME_MODULE
                           **target vitis-ai load_runtime_module<class 'str'>**
   ```
   
   
   This can be enhanced by accessing the config node of  codegen target, which 
is retrieved in the front end
   ```
   struct VitisAICompilerConfigNode : public 
tvm::AttrsNode<VitisAICompilerConfigNode> {
     String dpu;
     String build_dir;
     String work_dir;
     String export_runtime_module;
     String load_runtime_module;
     TVM_DECLARE_ATTRS(VitisAICompilerConfigNode, 
"ext.attrs.VitisAICompilerConfigNode") {
       TVM_ATTR_FIELD(dpu).describe("Vitis AI DPU identifier").set_default("");
       TVM_ATTR_FIELD(build_dir)
           .describe("Build directory to be used (optional, debug)")
           .set_default("");
       TVM_ATTR_FIELD(work_dir)
           .describe("Work directory to be used (optional, debug)")
           .set_default("");
       TVM_ATTR_FIELD(export_runtime_module)
           .describe("Export the Vitis AI runtime module to this file")
           .set_default("");
       TVM_ATTR_FIELD(load_runtime_module)
   
   ```
   Enhanced --help string after the fix
   
   target vitis-ai:
   ```
     --target-vitis-ai-dpu TARGET_VITIS_AI_DPU
                           **Vitis AI DPU identifier**
     --target-vitis-ai-build_dir TARGET_VITIS_AI_BUILD_DIR
                           **Build directory to be used (optional, debug)**
     --target-vitis-ai-work_dir TARGET_VITIS_AI_WORK_DIR
                           **Work directory to be used (optional, debug)**
     --target-vitis-ai-export_runtime_module 
TARGET_VITIS_AI_EXPORT_RUNTIME_MODULE
                           **Export the Vitis AI runtime module to this file**
     --target-vitis-ai-load_runtime_module TARGET_VITIS_AI_LOAD_RUNTIME_MODULE
                           **Load the Vitis AI runtime module to this file**
   ```


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