/external/tensorflow/tensorflow/compiler/xla/python/ |
D | pytree.cc | 66 registry->registrations_.find(py::reinterpret_borrow<py::object>(type)); in Lookup() 116 leaves.push_back(py::reinterpret_borrow<py::object>(handle)); in FlattenInto() 125 py::tuple tuple = py::reinterpret_borrow<py::tuple>(handle); in FlattenInto() 131 py::list list = py::reinterpret_borrow<py::list>(handle); in FlattenInto() 137 py::dict dict = py::reinterpret_borrow<py::dict>(handle); in FlattenInto() 160 py::tuple tuple = py::reinterpret_borrow<py::tuple>(handle); in FlattenInto() 162 node.node_data = py::reinterpret_borrow<py::object>(tuple.get_type()); in FlattenInto() 168 leaves.push_back(py::reinterpret_borrow<py::object>(handle)); in FlattenInto() 207 agenda.push_back(py::reinterpret_borrow<py::object>(*it)); in Unflatten() 275 py::list keys = py::reinterpret_borrow<py::list>(node.node_data); in MakeNode() [all …]
|
D | traceback.cc | 56 std::string(py::reinterpret_borrow<py::str>(frame.first->co_filename)), in Frames() 57 std::string(py::reinterpret_borrow<py::str>(frame.first->co_name)), in Frames()
|
D | types.h | 165 pybind11::reinterpret_borrow<pybind11::tuple>(input); 371 reinterpret_borrow<sequence>(getattr(handle, "dimensions")); 426 reinterpret_borrow<sequence>(getattr(handle, "operand_precision")); 471 reinterpret_borrow<sequence>(getattr(handle_obj, "tuple_shardings"));
|
D | absl_casters.h | 46 auto seq = reinterpret_borrow<sequence>(src);
|
D | types.cc | 75 return py::dtype::from_args(py::reinterpret_borrow<py::object>(bfloat16)); in PrimitiveTypeToDtype() 217 py::tuple tuple = py::reinterpret_borrow<py::tuple>(argument); in GetPythonBufferTree()
|
D | py_buffer.cc | 126 hold->buffer = py::reinterpret_borrow<py::object>(this_obj); in AsNumPyArray() 224 *py::reinterpret_borrow<py::object>(exporter).cast<PyBuffer&>().buffer(); in PjRtBufferGetBuffer()
|
D | dlpack.cc | 281 pack->buffer_reference = py::reinterpret_borrow<py::object>(py_buffer); in BufferToDLPackManagedTensor()
|
D | jax_jit.cc | 206 py::reinterpret_borrow<py::object>(args[i])); in ParseArguments() 1093 py::object shaped_array = py::reinterpret_borrow<py::object>(avals[i]); in AddCacheEntry() 1094 py::object lazy_expr = py::reinterpret_borrow<py::object>(lazy_exprs[i]); in AddCacheEntry()
|
/external/tensorflow/tensorflow/python/framework/ |
D | op_def_registry.cc | 28 if (!status.ok()) return py::reinterpret_borrow<py::object>(py::none()); in PYBIND11_MODULE() 41 return py::reinterpret_borrow<py::object>(py::bytes(serialized_op_def)); in PYBIND11_MODULE()
|
/external/python/pybind11/include/pybind11/ |
D | functional.h | 35 auto func = reinterpret_borrow<function>(src); 46 auto c = reinterpret_borrow<capsule>(PyCFunction_GET_SELF(cfunc.ptr()));
|
D | stl.h | 74 auto s = reinterpret_borrow<pybind11::set>(src); in load() 108 auto d = reinterpret_borrow<dict>(src); in load() 149 auto s = reinterpret_borrow<sequence>(src); in load() 214 auto l = reinterpret_borrow<sequence>(src);
|
D | pytypes.h | 282 template <typename T> friend T reinterpret_borrow(handle); 304 template <typename T> T reinterpret_borrow(handle h) { return {h, object::borrowed_t{}}; } in reinterpret_borrow() function 436 return reinterpret_borrow<object>(default_); in getattr() 445 return reinterpret_borrow<object>(default_); in getattr() 508 get_cache() = reinterpret_borrow<object>(object_or_cast(std::forward<T>(value))); 589 return reinterpret_borrow<object>(result); in get() 606 return reinterpret_borrow<object>(result); in get() 1590 return {derived(), reinterpret_borrow<object>(key)}; 1596 return {derived(), reinterpret_borrow<object>(key)}; in attr()
|
D | pybind11.h | 379 … auto rec_capsule = reinterpret_borrow<capsule>(PyCFunction_GET_SELF(rec->sibling.ptr())); in PYBIND11_NAMESPACE_BEGIN() 437 … auto rec_capsule = reinterpret_borrow<capsule>(((PyCFunctionObject *) m_ptr)->m_self); in PYBIND11_NAMESPACE_BEGIN() 654 dict kwargs = reinterpret_borrow<dict>(kwargs_in); in PYBIND11_NAMESPACE_BEGIN() 724 extra_args = reinterpret_borrow<tuple>(args_in); in PYBIND11_NAMESPACE_BEGIN() 890 auto args_ = reinterpret_borrow<tuple>(args_in); in PYBIND11_NAMESPACE_BEGIN() 902 auto kwargs = reinterpret_borrow<dict>(kwargs_in); in PYBIND11_NAMESPACE_BEGIN() 983 auto result = reinterpret_borrow<module_>(PyImport_AddModule(full_name.c_str())); 1060 return reinterpret_borrow<module_>(m); in create_extension_module() 1074 return reinterpret_borrow<dict>(p ? p : module_::import("__main__").attr("__dict__").ptr()); in globals() 1136 auto t = reinterpret_borrow<tuple>(value->tp_bases); in PYBIND11_NAMESPACE_BEGIN() [all …]
|
D | cast.h | 97 for (handle parent : reinterpret_borrow<tuple>(t->tp_bases)) in all_type_info_populate() 134 for (handle parent : reinterpret_borrow<tuple>(type->tp_bases)) in all_type_info_populate() 643 type_info *foreign_typeinfo = reinterpret_borrow<capsule>(getattr(pytype, local_key)); in try_load_foreign_module_local() 1153 value = reinterpret_borrow<capsule>(h); 1437 const auto seq = reinterpret_borrow<sequence>(src); 1653 value = reinterpret_borrow<type>(src); 1752 T cast(const handle &handle) { return T(reinterpret_borrow<object>(handle)); } 2150 for (auto k : reinterpret_borrow<dict>(kp)) {
|
D | numpy.h | 519 return reinterpret_borrow<object>(obj); 587 … flags = reinterpret_borrow<array>(base).flags() & ~detail::npy_api::NPY_ARRAY_OWNDATA_; 635 return reinterpret_borrow<pybind11::dtype>(detail::array_proxy(m_ptr)->descr); 660 return reinterpret_borrow<object>(detail::array_proxy(m_ptr)->base); 1165 return reinterpret_borrow<pybind11::dtype>(dtype_ptr());
|
D | eigen.h | 435 auto aref = reinterpret_borrow<Array>(src); 551 auto obj = reinterpret_borrow<object>(src);
|
/external/tensorflow/tensorflow/python/profiler/internal/ |
D | python_hooks.cc | 51 string filename(py::reinterpret_borrow<py::str>(py_code->co_filename)); in GetEventName() 56 function = py::reinterpret_borrow<py::str>(py_code->co_name); in GetEventName() 73 filename = py::reinterpret_borrow<py::str>(module); in GetEventName()
|
/external/python/pybind11/docs/ |
D | reference.rst | 42 .. doxygenfunction:: reinterpret_borrow
|
D | upgrade.rst | 505 | ``py::object(ptr, true)`` | ``py::reinterpret_borrow<py::object>(ptr)`` |
|
/external/python/pybind11/tests/ |
D | test_methods_and_attributes.cpp | 210 …auto emna = py::reinterpret_borrow<py::class_<ExampleMandA>>(py::module_::import("pybind11_tests.m… in TEST_SUBMODULE() 215 …auto emna = py::reinterpret_borrow<py::class_<ExampleMandA>>(py::module_::import("pybind11_tests.m… in TEST_SUBMODULE()
|
D | test_class.cpp | 231 auto o = py::reinterpret_borrow<py::tuple>(args)[0]; in TEST_SUBMODULE()
|
/external/llvm-project/mlir/lib/Bindings/Python/ |
D | IRModules.h | 363 pybind11::reinterpret_borrow<pybind11::object>(handle)); in getRef() 436 this, pybind11::reinterpret_borrow<pybind11::object>(handle)); in getRef()
|
D | IRModules.cpp | 716 py::object pyRef = py::reinterpret_borrow<py::object>(it->second.first); in forModule() 780 py::object pyRef = py::reinterpret_borrow<py::object>(it->second.first); in forOperation() 1041 py::reinterpret_borrow<py::object>((PyObject *)&PyType_Type); in createRawSubclass()
|
/external/python/pybind11/include/pybind11/detail/ |
D | class.h | 282 for (handle h : reinterpret_borrow<tuple>(tinfo->type->tp_bases)) { in traverse_offset_bases() 540 for (auto type : reinterpret_borrow<tuple>(Py_TYPE(obj)->tp_mro)) { in pybind11_getbuffer()
|