cbalint13 opened a new pull request #7382:
URL: https://github.com/apache/tvm/pull/7382


   
   * Trying to lower quantized C target some simple nets reveal missing 
**round**, **floor**, **ceil** translation.
   
   ```
      with relay.build_config(opt_level=3):
         graph, c_mod, c_params = relay.build(mod, target='c', params=params)
   ```
   * Network looks like the one below, notice for example the ```round``` 
operations:
   
   ```
   #[version = "0.0.5"]
   def @main(%input_3: Tensor[(1, 1, 129, 124), float32]) -> Tensor[(?, 8), 
float32] {
     %0 = dyn.image.resize(%input_3, meta[relay.Constant][0] /* ty=Tensor[(2), 
int64] */, size=[]) /* ty=Tensor[(1, 1, ?, ?), float32] */;
     %1 = multiply(%0, 16f /* ty=float32 */) /* ty=Tensor[(1, 1, ?, ?), 
float32] */;
     %2 = round(%1) /* ty=Tensor[(1, 1, ?, ?), float32] */;
     .....
     .....
   ```
   
   * The errors encountered:
   
   ```
   TVMError: Unresolved call Op(tir.round)
   TVMError: Unresolved call Op(tir.floor)
   TVMError: Unresolved call Op(tir.ceil)
   ```
   
   --------
   
   * This simple patch address the issue.
   
   @jroesch @masashi @mdw-octoml Please help me review.
   
   Thank you !
   
   
   
   


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

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


Reply via email to