You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/04/29 06:39:02 UTC

[GitHub] [tvm] WeberChen opened a new issue #7941: How could I get the pool_size and pool_stride information from built graph_json?

WeberChen opened a new issue #7941:
URL: https://github.com/apache/tvm/issues/7941


   Hi all,
   I have run the test example in  test_pass_partition_graph.py.
   It's OK to export the graph_jason, lib.so and the parameters.
   However, when I try to insert the nn.maxpool2d operator, the information of pool_size and pool_stride is missing in graph_json file.
   Could someone tell me how to get the above information in graph_json file?
   What files should I modify?
   Thank you.
   
   ---
   The following code is the inserted nn.maxpool2d in test_dnnl_fuse() in test_pass_partition_graph.py.
   def get_net(include_bn=True, include_sigmoid=False):
       data = relay.var("data", relay.TensorType((1, 3, 224, 224), "float32"))
       block1 = get_blocks("block1_", data, 3, 8, include_bn, include_sigmoid)
       block2 = get_blocks("block2_", block1, 8, 8, False, include_sigmoid)
       block3 = relay.nn.avg_pool2d(block2, pool_size=(2, 2), strides=(2, 2), padding=(0, 0), layout='NCHW', ceil_mode=False, count_include_pad=False)
       return relay.Function(relay.analysis.free_vars(block3), block3)
   ---
   The following code is the part of graph_json about the maxpool2d:
       {
         "op": "tvm_op", 
         "name": "fused_nn_avg_pool2d_1", 
         "attrs": {
           "num_outputs": "1", 
           "num_inputs": "1", 
           "func_name": "fused_nn_avg_pool2d_1", 
           "flatten_data": "0"
         }, 
         "inputs": [
           [
             2, 
             0, 
             0
           ]
         ]
       }
   ---
   AND the picture is the graph_json and it can get the correct result.
   ![image](https://user-images.githubusercontent.com/24515136/116510746-fa05ba80-a8f7-11eb-86ce-3fac16218a35.png)
   


-- 
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:
users@infra.apache.org



[GitHub] [tvm] tqchen closed issue #7941: How could I get the pool_size and pool_stride information from built graph_json?

Posted by GitBox <gi...@apache.org>.
tqchen closed issue #7941:
URL: https://github.com/apache/tvm/issues/7941


   


-- 
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:
users@infra.apache.org



[GitHub] [tvm] WeberChen commented on issue #7941: How could I get the pool_size and pool_stride information from built graph_json?

Posted by GitBox <gi...@apache.org>.
WeberChen commented on issue #7941:
URL: https://github.com/apache/tvm/issues/7941#issuecomment-886492343


   Hi @tqchen tqchen,
   Thank you for your kindly reply.
   It's pretty that I can not get the pool configuration from graph_json file.
   However, because I want to combine TVM with the NVDLA through BYOC method, could you suggest some TVM trace code that liking the DLA to TVM?
   Thanks a lot.


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



[GitHub] [tvm] tqchen commented on issue #7941: How could I get the pool_size and pool_stride information from built graph_json?

Posted by GitBox <gi...@apache.org>.
tqchen commented on issue #7941:
URL: https://github.com/apache/tvm/issues/7941#issuecomment-830436780


   Thanks for asking the question. Please open threads on https://discuss.tvm.apache.org/ for related questions. The generated json already inlines the pooling configuration into the library so the pooling size configuration is no longer available


-- 
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:
users@infra.apache.org