Add support for more batch sizes in cpu_graph_runner (#13881)

This commit is contained in:
Cao E
2026-03-20 00:50:56 +08:00
committed by GitHub
parent 4c52b7fcc6
commit 274581fb77
5 changed files with 135 additions and 25 deletions

View File

@@ -380,6 +380,9 @@ std::tuple<at::Tensor, at::Tensor> image_preprocess_cpu(
bool disable_grouping,
at::ScalarType out_dtype);
// [NOTE] When registering kernels, we should accurately describe the in-place information.
// Taking fused_add_rmsnorm_cpu as an example, add `Tensor(a!)` modifier to all tensors that
// will be modified in-place to avoid incorrect fusing and execution order on graph mode.
TORCH_LIBRARY_FRAGMENT(sgl_kernel, m) {
// activation
m.def("silu_and_mul_cpu(Tensor input) -> Tensor");