fix(pybind): c10::optional<Tensor>() default — c10::nullopt not registered in pybind

This commit is contained in:
Claude
2026-08-14 02:05:30 +00:00
parent 768d89c31a
commit bb0de83d45

View File

@@ -277,7 +277,7 @@ PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
py::arg("g"),
py::arg("beta"),
py::arg("chunk_size") = 64,
py::arg("initial_state") = c10::nullopt,
py::arg("initial_state") = c10::optional<torch::Tensor>(),
py::arg("output_final_state") = false,
py::arg("use_qk_l2norm_in_kernel") = false);
m.def("torch_recurrent_gated_delta_rule", &torch_recurrent_gated_delta_rule,
@@ -287,7 +287,7 @@ PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
py::arg("value"),
py::arg("g"),
py::arg("beta"),
py::arg("initial_state") = c10::nullopt,
py::arg("initial_state") = c10::optional<torch::Tensor>(),
py::arg("output_final_state") = false,
py::arg("use_qk_l2norm_in_kernel") = false);
}