Home
last modified time | relevance | path

Searched refs:pybind11 (Results 1 – 25 of 253) sorted by relevance

1234567891011

/external/tensorflow/tensorflow/compiler/xla/python/
Dpytree.h44 pybind11::object type;
46 pybind11::function to_iterable;
48 pybind11::function from_iterable;
53 static void Register(pybind11::object type, pybind11::function to_iterable,
54 pybind11::function from_iterable);
58 static const Registration* Lookup(pybind11::handle type);
64 size_t operator()(const pybind11::object& t) const { in operator()
65 return pybind11::hash(t); in operator()
69 bool operator()(const pybind11::object& a, in operator()
70 const pybind11::object& b) const { in operator()
[all …]
Dpy_buffer.h88 StatusOr<pybind11::dict> CudaArrayInterface() const;
101 pybind11::tuple python_shape() const;
102 pybind11::dtype python_dtype() const;
104 void SetStickyDevice(pybind11::object sticky_device);
105 pybind11::object GetStickyDevice() const { return sticky_device_.value(); } in GetStickyDevice()
107 StatusOr<pybind11::object> AsNumPyArray(pybind11::handle this_obj);
109 void SetAval(pybind11::object aval);
110 pybind11::object GetAval() const { return aval_.value(); } in GetAval()
125 absl::optional<pybind11::object> sticky_device_ = absl::nullopt;
128 absl::optional<pybind11::object> aval_ = absl::nullopt;
Dpmap_lib.h158 pybind11::handle aval, ShardingSpec sharding_spec, in ShardedDeviceArray()
163 pybind11::list device_buffers) in ShardedDeviceArray()
165 aval_(pybind11::cast<pybind11::object>(aval)), in ShardedDeviceArray()
169 pybind11::object GetAval() const { return aval_; } in GetAval()
171 pybind11::list GetDeviceBuffers() const { return device_buffers_; } in GetDeviceBuffers()
175 pybind11::object aval_;
181 pybind11::list device_buffers_;
184 void BuildPmapSubmodule(pybind11::module& m);
/external/python/pybind11/docs/advanced/cast/
Doverview.rst10 Python, pybind11 will just add the outer wrapper layer over the native C++
56 In this case, pybind11 will construct a new ``std::vector<int>`` and copy each
81 | ``int8_t``, ``uint8_t`` | 8-bit integers | :file:`pybind11/pybind11.h` |
83 | ``int16_t``, ``uint16_t`` | 16-bit integers | :file:`pybind11/pybind11.h` |
85 | ``int32_t``, ``uint32_t`` | 32-bit integers | :file:`pybind11/pybind11.h` |
87 | ``int64_t``, ``uint64_t`` | 64-bit integers | :file:`pybind11/pybind11.h` |
89 | ``ssize_t``, ``size_t`` | Platform-dependent size | :file:`pybind11/pybind11.h` |
91 | ``float``, ``double`` | Floating point types | :file:`pybind11/pybind11.h` |
93 | ``bool`` | Two-state Boolean type | :file:`pybind11/pybind11.h` |
95 | ``char`` | Character literal | :file:`pybind11/pybind11.h` |
[all …]
/external/llvm-project/mlir/lib/Bindings/Python/
DIRModules.h38 PyObjectRef(T *referrent, pybind11::object object) in PyObjectRef()
62 pybind11::object releaseObject() { in releaseObject()
74 pybind11::object getObject() { in getObject()
82 pybind11::object object;
101 PyThreadContextEntry(FrameKind frameKind, pybind11::object context, in PyThreadContextEntry()
102 pybind11::object insertionPoint, in PyThreadContextEntry()
103 pybind11::object location) in PyThreadContextEntry()
123 static pybind11::object pushContext(PyMlirContext &context);
125 static pybind11::object pushInsertionPoint(PyInsertionPoint &insertionPoint);
127 static pybind11::object pushLocation(PyLocation &location);
[all …]
DPybindUtils.h26 pybind11::error_already_set SetPyError(PyObject *excClass,
63 namespace pybind11 {
70 bool load(pybind11::handle src, bool) { in load()
85 pybind11::cast<typename DefaultingTy::ReferrentTy &>(src)}; in load()
94 return pybind11::cast(src, policy); in cast()
112 pybind11::list parts;
120 pybind11::str pyPart(part.data,
126 pybind11::str join() {
127 pybind11::str delim("", 0);
136 PyFileAccumulator(pybind11::object fileObject, bool binary)
[all …]
DGlobals.h59 pybind11::object registerDialectDecorator(pybind11::object pyClass);
65 pybind11::object pyClass);
71 pybind11::object pyClass,
72 pybind11::object rawOpViewClass);
76 llvm::Optional<pybind11::object>
81 llvm::Optional<pybind11::object>
89 llvm::StringMap<pybind11::object> dialectClassMap;
91 llvm::StringMap<pybind11::object> operationClassMap;
94 llvm::StringMap<pybind11::object> rawOpViewClassMap;
104 llvm::StringMap<pybind11::object> rawOpViewClassMapCache;
/external/python/pybind11/docs/
Dchangelog.rst6 Starting with version 1.8.0, pybind11 releases use a `semantic versioning
16 `#2739 <https://github.com/pybind/pybind11/pull/2739>`_
20 `#2657 <https://github.com/pybind/pybind11/pull/2657>`_
26 `#2701 <https://github.com/pybind/pybind11/pull/2701>`_
31 `#2698 <https://github.com/pybind/pybind11/pull/2698>`_
35 `#2801 <https://github.com/pybind/pybind11/pull/2801>`_
42 `#2808 <https://github.com/pybind/pybind11/pull/2808>`_
45 `#2735 <https://github.com/pybind/pybind11/pull/2735>`_
48 `#2806 <https://github.com/pybind/pybind11/pull/2806>`_
51 `#2804 <https://github.com/pybind/pybind11/pull/2804>`_
[all …]
Dinstalling.rst6 There are several ways to get the pybind11 source, which lives at
7 `pybind/pybind11 on GitHub <https://github.com/pybind/pybind11>`_. The pybind11
9 or conda-forge, for obtaining pybind11.
16 When you are working on a project in Git, you can use the pybind11 repository
21 git submodule add -b stable ../../pybind/pybind11 extern/pybind11
26 instead of the relative URL ``../../pybind/pybind11`` above. Some other servers
29 From here, you can now include ``extern/pybind11/include``, or you can use
30 the various integration tools (see :ref:`compiling`) pybind11 provides directly
41 pip install pybind11
43 This will provide pybind11 in a standard Python package format. If you want
[all …]
Dcompiling.rst18 A helper file is provided with pybind11 that can simplify usage with setuptools.
20 To use pybind11 inside your ``setup.py``, you have to have some system to
21 ensure that ``pybind11`` is installed when you build your package. There are
22 four possible ways to do this, and pybind11 supports all four: You can ask all
23 users to install pybind11 beforehand (bad), you can use
30 An example of a ``setup.py`` using pybind11's helpers:
36 from pybind11.setup_helpers import Pybind11Extension
58 from pybind11.setup_helpers import Pybind11Extension, build_ext
73 Since pybind11 does not require NumPy when building, a light-weight replacement
78 from pybind11.setup_helpers import ParallelCompile
[all …]
Dlimitations.rst7 pybind11 strives to be a general solution to binding generation, but it also has
10 - pybind11 casts away ``const``-ness in function arguments and return values.
15 - The NumPy interface ``pybind11::array`` greatly simplifies accessing
18 directly supported, however, with ``pybind11/eigen.h``.
20 Large but useful features could be implemented in pybind11 but would lead to a
23 pybind11; see `pybind11_json <https://github.com/pybind/pybind11_json>`_ for an
35 `#2573 <https://github.com/pybind/pybind11/pull/2573>`_
38 `#2422 <https://github.com/pybind/pybind11/pull/2422>`_
49 `#2527 <https://github.com/pybind/pybind11/issues/2527>`_
51 `#2245 <https://github.com/pybind/pybind11/issues/2245>`_
[all …]
/external/tensorflow/tensorflow/python/lib/core/
Dpybind11_status.h58 throw pybind11::error_already_set(); in MaybeRaiseFromStatus()
65 pybind11::make_tuple(pybind11::none(), pybind11::none(), in MaybeRaiseRegisteredFromStatus()
68 throw pybind11::error_already_set(); in MaybeRaiseRegisteredFromStatus()
76 pybind11::gil_scoped_acquire acquire; in MaybeRaiseRegisteredFromStatusWithGIL()
79 pybind11::make_tuple(pybind11::none(), pybind11::none(), in MaybeRaiseRegisteredFromStatusWithGIL()
82 throw pybind11::error_already_set(); in MaybeRaiseRegisteredFromStatusWithGIL()
90 throw pybind11::error_already_set(); in MaybeRaiseFromTFStatus()
98 pybind11::make_tuple(pybind11::none(), pybind11::none(), in MaybeRaiseRegisteredFromTFStatus()
101 throw pybind11::error_already_set(); in MaybeRaiseRegisteredFromTFStatus()
109 pybind11::gil_scoped_acquire acquire; in MaybeRaiseRegisteredFromTFStatusWithGIL()
[all …]
Dpybind11_proto.h24 inline void CheckProtoType(const pybind11::handle& py_object, in CheckProtoType()
27 if (pybind11::hasattr(py_object, "DESCRIPTOR")) { in CheckProtoType()
28 pybind11::handle descriptor = pybind11::getattr(py_object, "DESCRIPTOR"); in CheckProtoType()
30 pybind11::cast<std::string>(pybind11::getattr(descriptor, "full_name")); in CheckProtoType()
35 throw pybind11::type_error(absl::StrCat("Expected an ", expected_proto_type, in CheckProtoType()
39 throw pybind11::type_error(absl::StrCat( in CheckProtoType()
/external/python/pybind11/tools/
Dpybind11Config.cmake.in12 true if pybind11 and all required components found on the system
14 pybind11 version in format Major.Minor.Release
16 pybind11 version type (dev, release)
18 Directories where pybind11 and python headers are located.
20 Directory where pybind11 headers are located.
22 Definitions necessary to use pybind11, namely USING_pybind11.
34 If pybind11 is found, this module defines the following ``IMPORTED``
37 ``pybind11::module``
39 ``pybind11::embed``
48 ``pybind11::headers``
[all …]
Dpybind11Common.cmake5 pybind11::pybind11 - link to headers and pybind11
6 pybind11::module - Adds module links
7 pybind11::embed - Adds embed links
8 pybind11::lto - Link time optimizations (manual selection)
9 pybind11::thin_lto - Link time optimizations (manual selection)
10 pybind11::python_link_helper - Adds link to Python libraries
11 pybind11::python2_no_register - Avoid warning/error with Python 2 + C++14/7
12 pybind11::windows_extras - MSVC bigobj and mp for building multithreaded
13 pybind11::opt_size - avoid optimizations that increase code size
23 if(TARGET pybind11::lto)
[all …]
Dpybind11NewTools.cmake1 # tools/pybind11NewTools.cmake -- Build system for the pybind11 modules
10 TARGET pybind11::headers
38 # If this behavior is not desired, FindPython _before_ pybind11.
61 message(AUTHOR_WARNING "Python2 and Python3 both present, pybind11 in "
109 FATAL_ERROR "pybind11 could not query the module file extension, likely the 'distutils'"
124 TARGET pybind11::pybind11
135 # This needs to be a target to be included after the local pybind11
136 # directory, just in case there there is an installed pybind11 sitting
138 add_library(pybind11::python_headers INTERFACE IMPORTED)
140 TARGET pybind11::python_headers PROPERTY INTERFACE_INCLUDE_DIRECTORIES
[all …]
Dpybind11Tools.cmake1 # tools/pybind11Tools.cmake -- Build system for the pybind11 modules
94 # This needs to be an target to it is included after the local pybind11
95 # directory, just in case there are multiple versions of pybind11, we want the
97 add_library(pybind11::python_headers INTERFACE IMPORTED)
98 set_property(TARGET pybind11::python_headers PROPERTY INTERFACE_INCLUDE_DIRECTORIES
101 TARGET pybind11::pybind11
103 PROPERTY INTERFACE_LINK_LIBRARIES pybind11::python_headers)
107 CACHE INTERNAL "Directories where pybind11 and possibly Python headers are located")
114 TARGET pybind11::pybind11
120 TARGET pybind11::module
[all …]
/external/python/pybind11/
DCMakeLists.txt1 # CMakeLists.txt -- Build system for the pybind11 modules
20 file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/include/pybind11/detail/common.h"
35 pybind11 project
45 message(STATUS "pybind11 v${pybind11_VERSION} ${pybind11_VERSION_TYPE}")
53 # Check if pybind11 is being used directly or via add_subdirectory
89 option(PYBIND11_INSTALL "Install pybind11 header files?" ${PYBIND11_MASTER_PROJECT})
90 option(PYBIND11_TEST "Build pybind11 test suite?" ${PYBIND11_MASTER_PROJECT})
95 "Install pybind11 headers in Python include directory instead of default installation prefix"
103 include/pybind11/detail/class.h
104 include/pybind11/detail/common.h
[all …]
DREADME.rst1 .. figure:: https://github.com/pybind/pybind11/raw/master/docs/pybind11-logo.png
2 :alt: pybind11 logo
4 **pybind11 — Seamless operability between C++11 and Python**
18 Combining older versions of pybind11 (< 2.6.0) with Python 3.9.0 will
26 the latest version of pybind11 (2.6.0 or newer), which includes a temporary
30 **pybind11** is a lightweight header-only library that exposes C++ types
58 `pybind11.readthedocs.io <https://pybind11.readthedocs.io/en/latest>`_.
60 `here <https://pybind11.readthedocs.io/_/downloads/en/latest/pdf/>`_.
62 `github.com/pybind/pybind11 <https://github.com/pybind/pybind11>`_.
69 pybind11 can map the following core C++ features to Python:
[all …]
DMANIFEST.in1 recursive-include pybind11/include/pybind11 *.h
2 recursive-include pybind11 *.py
3 recursive-include pybind11 py.typed
4 recursive-include pybind11 *.pyi
5 include pybind11/share/cmake/pybind11/*.cmake
/external/tflite-support/tensorflow_lite_support/codegen/python/
Dcodegen_lib.cc28 using overload_cast_ = pybind11::detail::overload_cast_impl<Args...>;
31 pybind11::class_<AndroidJavaGenerator>(m, "AndroidJavaGenerator") in PYBIND11_MODULE()
32 .def(pybind11::init<const std::string &>()) in PYBIND11_MODULE()
38 pybind11::class_<GenerationResult>(m, "GenerationResult") in PYBIND11_MODULE()
39 .def(pybind11::init<>()) in PYBIND11_MODULE()
41 pybind11::class_<GenerationResult::File>(m, "GenerationResultFile") in PYBIND11_MODULE()
42 .def(pybind11::init<>()) in PYBIND11_MODULE()
/external/libkmsxx/subprojects/
Dpybind11.wrap2 directory = pybind11-2.6.0
3 source_url = https://github.com/pybind/pybind11/archive/v2.6.0.zip
4 source_filename = pybind11-2.6.0.zip
6 patch_url = https://wrapdb.mesonbuild.com/v1/projects/pybind11/2.6.0/1/get_zip
7 patch_filename = pybind11-2.6.0-1-wrap.zip
11 pybind11 = pybind11_dep
/external/llvm-project/mlir/cmake/modules/
DMLIRDetectPythonEnv.cmake3 # Detects a pybind11 package installed in the current python environment
4 # and sets variables to allow it to be found. This allows pybind11 to be
9 …message(STATUS "Using explicit pybind11 cmake directory: ${pybind11_DIR} (-Dpybind11_DIR to change…
11 message(STATUS "Checking for pybind11 in python path...")
14 -c "import pybind11;print(pybind11.get_cmake_dir(), end='')"
20 message(STATUS "not found (install via 'pip install pybind11' or set pybind11_DIR)")
/external/python/pybind11/docs/advanced/
Dembedding.rst6 While pybind11 is mainly focused on extending Python using C++, it's also
9 general pybind11 usage. This section will cover a few extra things required
16 lines of CMake and the ``pybind11::embed`` target, as shown below. For more
24 find_package(pybind11 REQUIRED) # or `add_subdirectory(pybind11)`
27 target_link_libraries(example PRIVATE pybind11::embed)
33 #include <pybind11/embed.h> // everything needed for embedding
34 namespace py = pybind11;
43 all the functions and classes in pybind11. The RAII guard class `scoped_interpreter`
56 #include <pybind11/embed.h>
57 namespace py = pybind11;
[all …]
/external/tensorflow/tensorflow/python/profiler/internal/
Dtraceme_wrapper.h36 TraceMeWrapper(const pybind11::str& name, const pybind11::kwargs& kwargs) in TraceMeWrapper()
49 void SetMetadata(const pybind11::kwargs& kwargs) { in SetMetadata()
67 const pybind11::kwargs& kwargs) { in AppendMetadata()
70 absl::StrAppend(name, std::string(pybind11::str(kv.first)), "=", in AppendMetadata()
71 std::string(pybind11::str(kv.second)), ","); in AppendMetadata()

1234567891011