Expose is_out to python

Pull Request resolved: https://github.com/pytorch/pytorch/pull/78591

Approved by: https://github.com/zhxchen17
This commit is contained in:
Tugsbayasgalan Manlaibaatar
2022-05-31 16:43:38 -07:00
committed by PyTorch MergeBot
parent 9229749f62
commit c7e9eea915
3 changed files with 9 additions and 0 deletions

View File

@ -1472,6 +1472,8 @@ void initJITBindings(PyObject* module) {
[](Argument& self) -> py::bool_ {
return self.default_value().has_value();
})
.def_property_readonly(
"is_out", [](Argument& self) { return self.is_out(); })
.def_property_readonly("kwarg_only", [](Argument& self) -> bool {
return self.kwarg_only();
});