Commit b3dce6d
Add float scalar input support (#18751)
Summary:
Pull Request resolved: #18751
The pybindings code handled bool and int scalar inputs but was missing
support for float (Python float → C++ double). This caused failures when
running models like Addmm that take float alpha/beta parameters, throwing
'Unsupported python type <class float>'.
Added py::isinstance<py::float_> handling to convert Python floats to
EValue(double) in both the portable and XNNPACK input processing paths.
Reviewed By: 3l1
Differential Revision: D998454261 parent 75ba558 commit b3dce6d
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
807 | 807 | | |
808 | 808 | | |
809 | 809 | | |
| 810 | + | |
| 811 | + | |
810 | 812 | | |
811 | 813 | | |
812 | 814 | | |
| |||
1135 | 1137 | | |
1136 | 1138 | | |
1137 | 1139 | | |
| 1140 | + | |
| 1141 | + | |
1138 | 1142 | | |
1139 | 1143 | | |
1140 | 1144 | | |
| |||
0 commit comments