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

   Hello community members! Today when I running all the unit tests under 
`tests/python/relax`, I found the tests under `test_relay_translator.py` 
consumes quite much time. They greatly increases the time needed to a round of 
testing.
   ```
   >>> pytest -vv test_relay_translator.py --durations=0
   
   rootdir: /home/ruihangl/tvm/tests/python/relax
   collected 22 items                                                           
                                                                                
                            
   
   
test_relay_translator.py::test_verify_e2e_translation_cpu[NCHW-1-image_shape0] 
SKIPPED (take too much time)                                                    
                    [  4%]
   
test_relay_translator.py::test_verify_e2e_translation_cpu[NHWC-1-image_shape1] 
SKIPPED (take too much time)                                                    
                    [  9%]
   
test_relay_translator.py::test_verify_e2e_translation_gpu[NCHW-1-image_shape0] 
SKIPPED (take too much time)                                                    
                    [ 13%]
   
test_relay_translator.py::test_verify_e2e_translation_gpu[NHWC-1-image_shape1] 
SKIPPED (take too much time)                                                    
                    [ 18%]
   
test_relay_translator.py::test_verify_extracted_tasks_cpu[NCHW-1-image_shape0-structural]
 PASSED                                                                         
          [ 22%]
   
test_relay_translator.py::test_verify_extracted_tasks_cpu[NCHW-1-image_shape0-ignore-ndarray]
 PASSED                                                                         
      [ 27%]
   
test_relay_translator.py::test_verify_extracted_tasks_cpu[NCHW-1-image_shape0-anchor-block]
 PASSED                                                                         
        [ 31%]
   
test_relay_translator.py::test_verify_extracted_tasks_cpu[NHWC-1-image_shape1-structural]
 PASSED                                                                         
          [ 36%]
   
test_relay_translator.py::test_verify_extracted_tasks_cpu[NHWC-1-image_shape1-ignore-ndarray]
 PASSED                                                                         
      [ 40%]
   
test_relay_translator.py::test_verify_extracted_tasks_cpu[NHWC-1-image_shape1-anchor-block]
 PASSED                                                                         
        [ 45%]
   
test_relay_translator.py::test_verify_extracted_tasks_gpu[NCHW-1-image_shape0-structural]
 PASSED                                                                         
          [ 50%]
   
test_relay_translator.py::test_verify_extracted_tasks_gpu[NCHW-1-image_shape0-ignore-ndarray]
 PASSED                                                                         
      [ 54%]
   
test_relay_translator.py::test_verify_extracted_tasks_gpu[NCHW-1-image_shape0-anchor-block]
 PASSED                                                                         
        [ 59%]
   
test_relay_translator.py::test_verify_extracted_tasks_gpu[NHWC-1-image_shape1-structural]
 PASSED                                                                         
          [ 63%]
   
test_relay_translator.py::test_verify_extracted_tasks_gpu[NHWC-1-image_shape1-ignore-ndarray]
 PASSED                                                                         
      [ 68%]
   
test_relay_translator.py::test_verify_extracted_tasks_gpu[NHWC-1-image_shape1-anchor-block]
 PASSED                                                                         
        [ 72%]
   test_relay_translator.py::test_single_dynamic_dim PASSED                     
                                                                                
                      [ 77%]
   test_relay_translator.py::test_multiple_dynamic_dims PASSED                  
                                                                                
                      [ 81%]
   test_relay_translator.py::test_layout_transform PASSED                       
                                                                                
                      [ 86%]
   test_relay_translator.py::test_translate_op_with_tir PASSED                  
                                                                                
                      [ 90%]
   test_relay_translator.py::test_translate_tuple_arg PASSED                    
                                                                                
                      [ 95%]
   test_relay_translator.py::test_append_op_attrs PASSED                        
                                                                                
                      [100%]
   
   
===================================================================================
 slowest durations 
====================================================================================
   33.96s call     
test_relay_translator.py::test_verify_extracted_tasks_gpu[NCHW-1-image_shape0-anchor-block]
   33.80s call     
test_relay_translator.py::test_verify_extracted_tasks_gpu[NCHW-1-image_shape0-ignore-ndarray]
   33.70s call     
test_relay_translator.py::test_verify_extracted_tasks_gpu[NCHW-1-image_shape0-structural]
   29.91s call     
test_relay_translator.py::test_verify_extracted_tasks_cpu[NCHW-1-image_shape0-anchor-block]
   29.76s call     
test_relay_translator.py::test_verify_extracted_tasks_cpu[NCHW-1-image_shape0-ignore-ndarray]
   29.58s call     
test_relay_translator.py::test_verify_extracted_tasks_cpu[NCHW-1-image_shape0-structural]
   28.17s call     
test_relay_translator.py::test_verify_extracted_tasks_cpu[NHWC-1-image_shape1-structural]
   28.16s call     
test_relay_translator.py::test_verify_extracted_tasks_gpu[NHWC-1-image_shape1-anchor-block]
   28.04s call     
test_relay_translator.py::test_verify_extracted_tasks_cpu[NHWC-1-image_shape1-anchor-block]
   28.02s call     
test_relay_translator.py::test_verify_extracted_tasks_gpu[NHWC-1-image_shape1-ignore-ndarray]
   28.00s call     
test_relay_translator.py::test_verify_extracted_tasks_gpu[NHWC-1-image_shape1-structural]
   27.92s call     
test_relay_translator.py::test_verify_extracted_tasks_cpu[NHWC-1-image_shape1-ignore-ndarray]
   0.34s call     test_relay_translator.py::test_single_dynamic_dim
   0.30s call     test_relay_translator.py::test_multiple_dynamic_dims
   0.22s call     test_relay_translator.py::test_translate_op_with_tir
   ...
   ```
   The tests are run on our research group server with CPU AMD 3970X and GPU 
RTX 4090. I imagine the tests will take no less time when run on other machines.
   
   So here I want to propose to skip these tests. Actually these tests might be 
far from being called “unit.” We perhaps want to separate them into another 
directory.


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