gromero commented on issue #10270:
URL: https://github.com/apache/tvm/issues/10270#issuecomment-1072755358


   @PhilippvK Hi. Apologies for taking so long to reply your issue. Since there 
is no cc tagging me and I missed the notification from GH when the issue was 
created I just found it by chance now when eyeballing other TVM issues.
   
   Thanks for the detailed investigation and for reporting the issue.
   
   The errors in `Resulting output:` are actually not issues, i.e. your passing 
twice  the `--project-option` option and so only the last one specified is 
considered, so `tvmc` in the second and third commands is only considering  
`warning_as_error={true,false}`, hence it complains about `project_type` 
missing. If you add `project_type=` at the end of the command, then it will 
complain about `zephyr_board=` missing -- the next required option that will be 
missing. Hence `tvmc` is working as designed there. 
   
   That said, your code analysis is correct and there is a bug there that needs 
to get fixed.
   
   So, I would say that the ` Resulting output:` currently (HEAD) is:
   
   ```
   gromero@amd:~/scripts$ tvmc micro create -f /tmp/sine_mps3 ./sine_mps3.tar 
zephyr --project-option project_type=host_driven zephyr_board=mps3_an547 
warning_as_error=false
   The following error occured on the Project API server side: 
    calling method generate_project: JSON-RPC error # -32000: Zephyr version 
found is not supported: found 3.7, expected 2.7.
   Traceback (most recent call last):
     File "/home/gromero/git/tvm/python/tvm/micro/project_api/server.py", line 
481, in serve_one_request  # <--- Outermost server-side stack frame
       self._dispatch_request(request)
     File "/home/gromero/git/tvm/python/tvm/micro/project_api/server.py", line 
593, in _dispatch_request
       return_value = dispatch_method(**params)
     File "/home/gromero/git/tvm/python/tvm/micro/project_api/server.py", line 
621, in _dispatch_generate_project
       return self._handler.generate_project(
     File 
"/home/gromero/git/tvm/build/microtvm_template_projects/zephyr/microtvm_api_server.py",
 line 433, in generate_project
       raise server.ServerError(message=message)
   tvm.micro.project_api.server.ServerError: JSON-RPC error # -32000: Zephyr 
version found is not supported: found 3.7, expected 2.7.
   
   gromero@amd:~/scripts$
   ```
   
   but the `Expected output:" is:
   
   ```
   gromero@amd:~/scripts$ tvmc micro create -f /tmp/sine_mps3 ./sine_mps3.tar 
zephyr --project-option project_type=host_driven zephyr_board=mps3_an547 
warning_as_error=false
   WARNING:__main__:Zephyr version found is not supported: found 3.7, expected 
2.7.
   gromero@amd:~/scripts$
   ```
   
   i.e. as you said the issue is that option `warning_as_error=false` is not 
working properly.
   
   Since you've done all the analysis and also reported it, are you interested 
in sending a PR to fix it? I like the solution of using a simple dict map and I 
think such a map could be a global as `CMAKE_BOOL_MAP` and defined right above 
`class Handle()`, for instance so in the future other options can take 
advantage of it too. If so, I'm happy to review it, just cc me so I don't 
missing it please.
   
   I'll also cc @leandron @mehrdadh @areusch @alanmacd fyi.
   
   Cheers.


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