You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "ConvolutedDog (via GitHub)" <gi...@apache.org> on 2025/07/21 15:25:15 UTC

[PR] [FRONTEND] Add max_trials_per_task parameter to static_shape_tuning_pipeline [tvm]

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

   This PR introduces the max_trials_per_task parameter to the static_shape_tuning_pipeline, giving users explicit control over the maximum number of trials allocated to each task during MetaSchedule tuning.
   
   Currently, the default value is 64, so when tuning on the GPU, when the max_trials_per_task value given by the user is less than the number of tasks x 64 but greater than 64, some TIR funcs are not tuned and not bound to threads.


-- 
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] [FRONTEND] Add max_trials_per_task parameter to static_shape_tuning_pipeline [tvm]

Posted by "ConvolutedDog (via GitHub)" <gi...@apache.org>.
ConvolutedDog commented on code in PR #18159:
URL: https://github.com/apache/tvm/pull/18159#discussion_r2228491680


##########
docs/how_to/tutorials/e2e_opt_model.py:
##########
@@ -119,6 +138,7 @@
     # Need to allocate data and params on GPU device
     gpu_data = tvm.nd.array(np.random.rand(1, 3, 224, 224).astype("float32"), dev)
     gpu_params = [tvm.nd.array(p, dev) for p in params["main"]]
-    gpu_out = vm["main"](gpu_data, *gpu_params).numpy()
+    gpu_out = vm["main"](gpu_data, *gpu_params)
 
+    gpu_out = np.array([gpu_out[0].numpy()[0][j] for j in range(1000)])

Review Comment:
   I have simplified the numpy conversion.



-- 
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] [FRONTEND] Add max_trials_per_task parameter to static_shape_tuning_pipeline [tvm]

Posted by "Hzfengsy (via GitHub)" <gi...@apache.org>.
Hzfengsy commented on code in PR #18159:
URL: https://github.com/apache/tvm/pull/18159#discussion_r2227213738


##########
docs/how_to/tutorials/e2e_opt_model.py:
##########
@@ -119,6 +138,7 @@
     # Need to allocate data and params on GPU device
     gpu_data = tvm.nd.array(np.random.rand(1, 3, 224, 224).astype("float32"), dev)
     gpu_params = [tvm.nd.array(p, dev) for p in params["main"]]
-    gpu_out = vm["main"](gpu_data, *gpu_params).numpy()
+    gpu_out = vm["main"](gpu_data, *gpu_params)
 
+    gpu_out = np.array([gpu_out[0].numpy()[0][j] for j in range(1000)])

Review Comment:
   What's the purpose of this change?



-- 
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] [FRONTEND] Add max_trials_per_task parameter to static_shape_tuning_pipeline [tvm]

Posted by "ConvolutedDog (via GitHub)" <gi...@apache.org>.
ConvolutedDog commented on code in PR #18159:
URL: https://github.com/apache/tvm/pull/18159#discussion_r2228508630


##########
docs/how_to/tutorials/e2e_opt_model.py:
##########
@@ -119,6 +138,7 @@
     # Need to allocate data and params on GPU device
     gpu_data = tvm.nd.array(np.random.rand(1, 3, 224, 224).astype("float32"), dev)
     gpu_params = [tvm.nd.array(p, dev) for p in params["main"]]
-    gpu_out = vm["main"](gpu_data, *gpu_params).numpy()
+    gpu_out = vm["main"](gpu_data, *gpu_params)
 
+    gpu_out = np.array([gpu_out[0].numpy()[0][j] for j in range(1000)])

Review Comment:
   After the new FFI was introduced, `vm["main"](...)` returns an object of `<class 'tvm.ffi.container.Array'>`, so a `[0]` needs to be added.



-- 
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] [FRONTEND] Add max_trials_per_task parameter to static_shape_tuning_pipeline [tvm]

Posted by "ConvolutedDog (via GitHub)" <gi...@apache.org>.
ConvolutedDog closed pull request #18159: [FRONTEND] Add max_trials_per_task parameter to static_shape_tuning_pipeline
URL: https://github.com/apache/tvm/pull/18159


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org