| 446 | } |
| 447 | |
| 448 | py::object _convert_single_value_cpp( |
| 449 | py::handle value, py::handle dtype, py::handle device) { |
| 450 | if (is_tensor(value)) { |
| 451 | if (_get_dtype(value).category() != DTypeCategory::QUANTIZED) { |
| 452 | return _astype_cpp(value, dtype); |
| 453 | } |
| 454 | } else { |
| 455 | return _Const(value, dtype, device); |
| 456 | } |
| 457 | return py::reinterpret_borrow<py::object>(value); |
| 458 | } |
| 459 | |
| 460 | py::object _convert_inputs_cpp( |
| 461 | PyObject* const* args, size_t nargs, py::object dtype, py::object device) { |
no test coverage detected