masahi commented on a change in pull request #10366:
URL: https://github.com/apache/tvm/pull/10366#discussion_r840998729



##########
File path: tests/python/unittest/test_meta_schedule_tune_tir.py
##########
@@ -98,14 +97,14 @@ def test_tune_matmul_cuda_tensor_core():
     target = Target("nvidia/geforce-rtx-3070")
     config = ReplayTraceConfig(
         num_trials_per_iter=32,
-        num_trials_total=320,
+        max_trials_per_task=320,

Review comment:
       I think something weird is going on. 
   
   First, `max_trials_global` is not used at 
https://github.com/zxybazh/tvm/blob/e3fbb797a88308e4ce3d671939a83084ae1826b8/python/tvm/meta_schedule/search_strategy/replay_trace.py#L60
   
   And if I use
   ```
               config=ReplayTraceConfig(
                   num_trials_per_iter=32,
                   max_trials_per_task=32,
                   ...
   ```
   , `max_trials_per_task` acts like a global max trials, so only one task is 
tuned, as shown below. So to correctly tune all tasks, I need to set 
`max_trials_per_task = 32 * num_tasks`, which contradicts the name 
`max_trials_per_task ` and does something very different from the previous 
`num_trials_total`.
   
   ```
    ID |                                                                        
Name |      FLOP | Weight | Speed (GFLOPS) | Latency (us) | Weighted Latency 
(us) | Trials | Terminated 
   
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     0 |                                                         
fused_nn_conv2d_add |  12870144 |      1 |        51.3887 |     250.4468 |      
        250.4468 |     32 |            
     1 |                                                       
fused_nn_conv2d_add_1 |  12895232 |      1 |            N/A |          N/A |    
               N/A |      0 |            
     2 |                                                       
fused_nn_conv2d_add_2 |  12945408 |      1 |            N/A |          N/A |    
               N/A |      0 |            
     3 |                                                      
fused_layout_transform |         1 |      1 |            N/A |          N/A |   
                N/A |      0 |            
     4 |                                                 
fused_nn_conv2d_add_nn_relu | 237633536 |      1 |            N/A |          
N/A |                   N/A |      0 |            
     5 |                                                         
fused_nn_max_pool2d |   1806336 |      1 |            N/A |          N/A |      
             N/A |      0 |            
     6 |                                               
fused_nn_conv2d_add_nn_relu_1 | 231612416 |      2 |            N/A |          
N/A |                   N/A |      0 |            
     7 |                                             
fused_nn_conv2d_add_add_nn_relu | 231813120 |      2 |            N/A |         
 N/A |                   N/A |      0 |            
     8 |                                               
fused_nn_conv2d_add_nn_relu_2 | 115806208 |      1 |            N/A |          
N/A |                   N/A |      0 |            
     9 |       
fused_nn_contrib_conv2d_winograd_without_weight_transform_add_nn_relu |  
93227008 |      1 |            N/A |          N/A |                   N/A |     
 0 |            
    10 |   
fused_nn_contrib_conv2d_winograd_without_weight_transform_add_add_nn_relu |  
93327360 |      2 |            N/A |          N/A |                   N/A |     
 0 |            
    11 |                                               
fused_nn_conv2d_add_nn_relu_3 | 115705856 |      1 |            N/A |          
N/A |                   N/A |      0 |            
    12 |     
fused_nn_contrib_conv2d_winograd_without_weight_transform_add_nn_relu_1 |  
98600960 |      1 |            N/A |          N/A |                   N/A |     
 0 |            
    13 | 
fused_nn_contrib_conv2d_winograd_without_weight_transform_add_add_nn_relu_1 |  
98651136 |      2 |            N/A |          N/A |                   N/A |     
 0 |            
    14 |                                               
fused_nn_conv2d_add_nn_relu_4 | 115655680 |      1 |            N/A |          
N/A |                   N/A |      0 |            
    15 |                                               
fused_nn_conv2d_add_nn_relu_5 | 231261184 |      1 |            N/A |          
N/A |                   N/A |      0 |            
    16 |                                           
fused_nn_conv2d_add_add_nn_relu_1 | 231286272 |      2 |            N/A |       
   N/A |                   N/A |      0 |            
    17 |                                                
fused_nn_adaptive_avg_pool2d |     25600 |      1 |            N/A |          
N/A |                   N/A |      0 |            
    18 |                                      
fused_layout_transform_reshape_squeeze |         1 |      1 |            N/A |  
        N/A |                   N/A |      0 |            
    19 |                                                          
fused_nn_dense_add |   1025000 |      1 |            N/A |          N/A |       
            N/A |      0 |            
   
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   




-- 
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: [email protected]

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


Reply via email to