comaniac edited a comment on pull request #6395:
URL: https://github.com/apache/incubator-tvm/pull/6395#issuecomment-686777770


   For the rest 2 points.
   
   2. Is that possible to move the pass before partitioning but after merge 
compiler region (like `PruneTesnorRTCompilerRegion`)? After the merge compiler 
region pass you should get the Relay graph with almost the same semantic as 
partitioning. If you could have a pass checking each compiler region for your 
constraints, you can probably just remove the region you don't want, so that 
you should get only valid partitioned functions.
   
   3. Can the TensorRT version be obtained via an API call in C++? Something 
like `tensorrt::get_version()`? If so you can register a global symbol and pass 
the version to Python so that it can be used by the annotator.
   
   ```python
   def conv2d(...):
       if not tvm.get_global_func("relay.tensorrt.version", True):
           return False
       ver = tvm.get_global_func("relay.tensorrt.version")
       if ver == '1.0':
           return True
       return False
   ```
   
   If you need manually set up the TensorRT version, then it could be like 
this: Let user specify it in `config.cmake` and we pass the value to a macro in 
C++ so that you could simply return the value. The drawback of this solution is 
that it needs to rebuild TVM to annotate different TensorRT versions, and I'm 
not sure if that makes sense to 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