mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-29 11:14:56 +08:00
[frontend] Expose real_type getter for torch.Argument (#91938)
Exposing an API to get real_type from an Argument. This is useful for Argument types such as SymInt. Differential Revision: [D42425661](https://our.internmc.facebook.com/intern/diff/D42425661/) Pull Request resolved: https://github.com/pytorch/pytorch/pull/91938 Approved by: https://github.com/ezyang
This commit is contained in:
committed by
PyTorch MergeBot
parent
dc6916b341
commit
6676193b5e
@ -1719,6 +1719,8 @@ void initJITBindings(PyObject* module) {
|
||||
py::class_<Argument>(m, "Argument")
|
||||
.def_property_readonly("name", [](Argument& self) { return self.name(); })
|
||||
.def_property_readonly("type", [](Argument& self) { return self.type(); })
|
||||
.def_property_readonly(
|
||||
"real_type", [](Argument& self) { return self.real_type(); })
|
||||
.def_property_readonly(
|
||||
"N",
|
||||
[](Argument& self) -> py::object {
|
||||
|
||||
Reference in New Issue
Block a user