You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "ShawnZhuang (via GitHub)" <gi...@apache.org> on 2024/04/04 12:50:27 UTC

[PR] [relay][feature] save relay IR as onnx for visualize [tvm]

ShawnZhuang opened a new pull request, #16847:
URL: https://github.com/apache/tvm/pull/16847

   Prior to this commit, relay ir may not be easy to be viewed in netron. Awareness of distinct Attr types is required in some solutions.
   
   this commit provide a method to serializing relay ir to protobuf for visualization.
   1. it provide a general method to retrieve member variables of any Attrs, which reference the implementation of relay_text_printer
   2. the protobuf use the defination of onnx-ml.pb, and could be opened by netron naturally.


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [relay][feature] save relay IR as onnx for visualize [tvm]

Posted by "ShawnZhuang (via GitHub)" <gi...@apache.org>.
ShawnZhuang closed pull request #16847: [relay][feature] save relay IR as onnx for visualize
URL: https://github.com/apache/tvm/pull/16847


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [relay][feature] save relay IR as onnx for visualize [tvm]

Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen commented on PR #16847:
URL: https://github.com/apache/tvm/pull/16847#issuecomment-2061421527

   seems a better approach to write something like https://github.com/lutzroeder/netron/blob/main/source/caffe.js in netron. That file would parse the json file exported by the tvm relax, and construct the graph. Alternatively, we can add a visualization spec json for tvm, and add netron support.
   
   This would remove the need of protobuf and allows more direct export


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [relay][feature] save relay IR as onnx for visualize [tvm]

Posted by "ShawnZhuang (via GitHub)" <gi...@apache.org>.
ShawnZhuang commented on PR #16847:
URL: https://github.com/apache/tvm/pull/16847#issuecomment-2048833676

   
   
   
   > thank you @ShawnZhuang , one thing that I think worth clarifying is that whether it serves as a onnx exporter(which i believe there were some work in https://github.com/apache/tvm/blob/main/python/tvm/contrib/target/onnx.py) seems the purpose was different(mainly to export to netron compatible format, is it possible to support a variant of format that netron directly take?
   > 
   > as a community we are migrating a lot of effort to relax, so if you are interested in bringing onnx translation to relax, that could also be interesting
   
   Yes, the mainly purpure is to export  to netron compatible format  for visualize.    
   
   According  to  https://github.com/lutzroeder/netron ,  the onnx supports tf, caffe, keras,mxnet,onnx and darknet ,  but  a directly 
    netron format  has not been found.
   
   Supporting  netron directly  may takes two steps, Firstly a tvm.proto should be defined,  secondly,  netron should support the new proto(which needs front-end efforts in netron)
   
   
   


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [relay][feature] save relay IR as onnx for visualize [tvm]

Posted by "ShawnZhuang (via GitHub)" <gi...@apache.org>.
ShawnZhuang commented on PR #16847:
URL: https://github.com/apache/tvm/pull/16847#issuecomment-2048849798

   ok,  i would  start bringing onnx translation to relax  after this PR  work is finished.


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [relay][feature] save relay IR as onnx for visualize [tvm]

Posted by "ShawnZhuang (via GitHub)" <gi...@apache.org>.
ShawnZhuang commented on PR #16847:
URL: https://github.com/apache/tvm/pull/16847#issuecomment-2051210080

   @tqchen  it seam that  google protobuf  is required,   and should be added to dockfile.  Do you  
   any sugguestion on  editing the CmakeList and Dockerfile,  since lots of docker file are found in  tvm/docker
    
   


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [relay][feature] save relay IR as onnx for visualize [tvm]

Posted by "ShawnZhuang (via GitHub)" <gi...@apache.org>.
ShawnZhuang commented on PR #16847:
URL: https://github.com/apache/tvm/pull/16847#issuecomment-2037175555

   discuss on  https://discuss.tvm.apache.org/t/relay-onnx-support-saveing-relay-ir-to-onnx-for-visualization/17020


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [relay][feature] save relay IR as onnx for visualize [tvm]

Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen commented on PR #16847:
URL: https://github.com/apache/tvm/pull/16847#issuecomment-2037249162

   thank you @ShawnZhuang , one thing that I think worth clarifying is that whether it serves as a onnx exporter(which i believe there were some work in https://github.com/apache/tvm/blob/main/python/tvm/contrib/target/onnx.py
   
    as a community we are migrating a lot of effort to relax, so if you are interested in bringing onnx translation to relax, that could also be interesting


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org