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

[GitHub] [tvm] YaoJiawei329 opened a new issue, #14681: [Bug] tvmc tune did not work.

YaoJiawei329 opened a new issue, #14681:
URL: https://github.com/apache/tvm/issues/14681

   I use this command to tune yolov7.onnx
   
   tvmc tune --target "llvm" --output yolov7.json yolov7.onnx
   
   but it just show for so long:
   
   [Task  1/47]  Current/Best:    0.00/   0.00 GFLOPS | Progress: (0/21) | 0.00 s
   
   and cpu usage is 0%, memory usage is 30MB.
   I want to know how to fix it. Or what's wrong with my conda env, or some other suggestions. Thanks!
   
   
   ### Environment
   
   Operating System: Windows 11 laptop
   TVM version: 0.13
   
   
   
   ### Triage
   
   Please refer to the list of label tags [here](https://github.com/apache/tvm/wiki/Issue-Triage-Labels) to find the relevant tags and add them below in a bullet format (example below).
   
   * needs-triage
   


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

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


[GitHub] [tvm] YaoJiawei329 commented on issue #14681: [Bug] tvmc tune did not work.

Posted by "YaoJiawei329 (via GitHub)" <gi...@apache.org>.
YaoJiawei329 commented on issue #14681:
URL: https://github.com/apache/tvm/issues/14681#issuecomment-1516371881

   And I try to use the following code to tune the same model, but it also did not work, just hangon.
   
   `
   from tvm.driver import tvmc
   from tvm import autotvm, relay
   
   def tvmc_tune(model_path, shape_dict, target, log_file):
       model = tvmc.load(model_path, shape_dict=shape_dict)  # 第 1 步: 加载 + shape_dict
       tvmc.tune(model, target=target, tuning_records=log_file)  # 第 1.5 步:可选 Tune
       package = tvmc.compile(model, target=target, tuning_records=log_file) # 第 2 步:编译
   
       mod, params = relay.frontend.from_onnx(model_path, shape_dict)
       with autotvm.apply_history_best(log_file):
           with tvm.transform.PassContext(opt_level=4, config={}):
               lib = relay.build(mod, target=target, params=params)
       lib.export_library(model_path.replace("onnx", "so"))
   
   
   if __name__ == "__main__":
       model_path = "./yolov7.onnx"
       shape_dict = {'images':[1,3,640,640]}
       target = "llvm"
       log_file = 'tune.json'
   
       tvmc_tune(model_path, shape_dict, target, log_file)
   `


-- 
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] YaoJiawei329 commented on issue #14681: [Bug] tvmc tune did not work.

Posted by "YaoJiawei329 (via GitHub)" <gi...@apache.org>.
YaoJiawei329 commented on issue #14681:
URL: https://github.com/apache/tvm/issues/14681#issuecomment-1518666804

   ![image](https://user-images.githubusercontent.com/56985607/233789357-ed2f9e33-8f90-4d01-8da1-717c51f36a71.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.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

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


[GitHub] [tvm] YaoJiawei329 commented on issue #14681: [Bug] tvmc tune did not work.

Posted by "YaoJiawei329 (via GitHub)" <gi...@apache.org>.
YaoJiawei329 commented on issue #14681:
URL: https://github.com/apache/tvm/issues/14681#issuecomment-1518976286

   Today I try to tune model by auto_scheduler, also did not work.
   
   |  ID  |                       Task Description                        | Latency (ms) | Speed (GFLOPS) | Trials |
   -----------------------------------------------------------------------------------------------------------------
   |    0 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_17 |            - |              - |      0 |
   |    1 |                    vm_mod_fused_nn_contrib_conv2d_NCHWc_add_1 |            - |              - |      0 |
   |    2 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_25 |            - |              - |      0 |
   |    3 |                                  vm_mod_fused_nn_max_pool2d_6 |            - |              - |      0 |
   |    4 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_33 |            - |              - |      0 |
   |    5 |   vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_5 |            - |              - |      0 |
   |    6 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_41 |            - |              - |      0 |
   |    7 |   vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_3 |            - |              - |      0 |
   |    8 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_13 |            - |              - |      0 |
   |    9 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_21 |            - |              - |      0 |
   |   10 |                                  vm_mod_fused_nn_max_pool2d_2 |            - |              - |      0 |
   |   11 |   vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_1 |            - |              - |      0 |
   |   12 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_28 |            - |              - |      0 |
   |   13 |                    vm_mod_fused_nn_contrib_conv2d_NCHWc_add_2 |            - |              - |      0 |
   |   14 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_36 |            - |              - |      0 |
   |   15 |     vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply |            - |              - |      0 |
   |   16 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_16 |            - |              - |      0 |
   |   17 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_24 |            - |              - |      0 |
   |   18 | vm_mod_fused_nn_max_pool2d_3,vm_mod_fused_nn_max_pool2d_4,vm_mod_fused_nn_max_pool2d_5 |            - |              - |      0 |
   |   19 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_32 |            - |              - |      0 |
   |   20 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_40 |            - |              - |      0 |
   |   21 |                      vm_mod_fused_nn_contrib_conv2d_NCHWc_add |            - |              - |      0 |
   |   22 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_12 |            - |              - |      0 |
   |   23 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_39 |            - |              - |      0 |
   |   24 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_20 |            - |              - |      0 |
   |   25 |                                  vm_mod_fused_nn_max_pool2d_1 |            - |              - |      0 |
   |   26 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_19 |            - |              - |      0 |
   |   27 |   vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_8 |            - |              - |      0 |
   |   28 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_27 |            - |              - |      0 |
   |   29 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_35 |            - |              - |      0 |
   |   30 |   vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_6 |            - |              - |      0 |
   |   31 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_43 |            - |              - |      0 |
   |   32 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_15 |            - |              - |      0 |
   |   33 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_23 |            - |              - |      0 |
   |   34 |   vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_4 |            - |              - |      0 |
   |   35 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_31 |            - |              - |      0 |
   |   36 |   vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_2 |            - |              - |      0 |
   |   37 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_11 |            - |              - |      0 |
   |   38 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_38 |            - |              - |      0 |
   |   39 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_18 |            - |              - |      0 |
   |   40 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_26 |            - |              - |      0 |
   |   41 |                                  vm_mod_fused_nn_max_pool2d_7 |            - |              - |      0 |
   |   42 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_34 |            - |              - |      0 |
   |   43 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_42 |            - |              - |      0 |
   |   44 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_14 |            - |              - |      0 |
   |   45 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_22 |            - |              - |      0 |
   |   46 |                                    vm_mod_fused_nn_max_pool2d |            - |              - |      0 |
   |   47 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_30 |            - |              - |      0 |
   |   48 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_10 |            - |              - |      0 |
   |   49 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_29 |            - |              - |      0 |
   |   50 |  vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_37 |            - |              - |      0 |
   |   51 |   vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_9 |            - |              - |      0 |
   |   52 |   vm_mod_fused_nn_contrib_conv2d_NCHWc_add_sigmoid_multiply_7 |            - |              - |      0 |
   -----------------------------------------------------------------------------------------------------------------
   Estimated total latency: - ms	Trials: 0	Used time : 0 s	Next ID: 0	
   ----------------------------------------------------------------------
   ------------------------------  [ Search ]
   ----------------------------------------------------------------------
   Generate Sketches		#s: 3
   


-- 
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: [I] [Bug] tvmc tune did not work. [tvm]

Posted by "ajiansoft (via GitHub)" <gi...@apache.org>.
ajiansoft commented on issue #14681:
URL: https://github.com/apache/tvm/issues/14681#issuecomment-1955758056

   hey friend,do you fix it?


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