Searched refs:Safe_PyObjectPtr (Results 1 – 15 of 15) sorted by relevance
/external/tensorflow/tensorflow/python/util/ |
D | util.cc | 101 Safe_PyObjectPtr raw_result(PyObject_CallMethod(o, key_method_name, nullptr)); in MappingKeys() 242 Safe_PyObjectPtr cls(PyObject_GetAttrString(to_check, "__class__")); in IsAttrsHelper() 332 virtual Safe_PyObjectPtr next() = 0; 361 Safe_PyObjectPtr next() override { in next() 362 Safe_PyObjectPtr result; in next() 363 Safe_PyObjectPtr key(PyIter_Next(iter_.get())); in next() 380 Safe_PyObjectPtr keys_; 381 Safe_PyObjectPtr iter_; 396 Safe_PyObjectPtr next() override { in next() 397 Safe_PyObjectPtr result; in next() [all …]
|
D | py_checkpoint_reader.i | 28 tensorflow::Safe_PyObjectPtr output_map(tensorflow::make_safe(PyDict_New())); 31 tensorflow::Safe_PyObjectPtr key( 35 tensorflow::Safe_PyObjectPtr key( 43 tensorflow::Safe_PyObjectPtr value(tensorflow::make_safe(PyList_New(dims))); 49 tensorflow::Safe_PyObjectPtr dim_value( 52 tensorflow::Safe_PyObjectPtr dim_value( 72 tensorflow::Safe_PyObjectPtr output_map(tensorflow::make_safe(PyDict_New())); 75 tensorflow::Safe_PyObjectPtr key( 78 tensorflow::Safe_PyObjectPtr key( 85 tensorflow::Safe_PyObjectPtr value(tensorflow::make_safe(PyLong_FromLong(v.second))); [all …]
|
/external/tensorflow/tensorflow/compiler/xla/python/ |
D | numpy_bridge.h | 45 using Safe_PyObjectPtr = std::unique_ptr<PyObject, PyDecrefDeleter>; variable 47 Safe_PyObjectPtr make_safe(PyObject* object); 67 Safe_PyObjectPtr PyShapeInfoFromXlaShape(const Shape& shape); 72 Safe_PyObjectPtr PyProgramShapeInfoFromXlaProgramShape( 93 StatusOr<Safe_PyObjectPtr> PyObjectFromXlaLiteral(const LiteralSlice& literal);
|
D | numpy_bridge.cc | 29 Safe_PyObjectPtr make_safe(PyObject* object) { in make_safe() 30 return Safe_PyObjectPtr(object); in make_safe() 130 Safe_PyObjectPtr PyShapeInfoFromXlaShape(const Shape& shape) { in PyShapeInfoFromXlaShape() 134 Safe_PyObjectPtr dimensions; in PyShapeInfoFromXlaShape() 155 Safe_PyObjectPtr PyProgramShapeInfoFromXlaProgramShape( in PyProgramShapeInfoFromXlaProgramShape() 157 Safe_PyObjectPtr arg_shapes = make_safe(PyTuple_New(shape.parameters_size())); in PyProgramShapeInfoFromXlaProgramShape() 163 Safe_PyObjectPtr result_shape = PyShapeInfoFromXlaShape(shape.result()); in PyProgramShapeInfoFromXlaProgramShape() 370 StatusOr<Safe_PyObjectPtr> PyObjectFromXlaLiteral(const LiteralSlice& literal) { in PyObjectFromXlaLiteral() 373 std::vector<Safe_PyObjectPtr> elems(num_elements); in PyObjectFromXlaLiteral() 378 Safe_PyObjectPtr tuple = make_safe(PyTuple_New(num_elements)); in PyObjectFromXlaLiteral() [all …]
|
D | xla_data.i | 210 %typemap(out) Literal (StatusOr<numpy::Safe_PyObjectPtr> obj_status) { 219 %typemap(out) StatusOr<Literal> (StatusOr<numpy::Safe_PyObjectPtr> obj_status) {
|
/external/tensorflow/tensorflow/python/lib/core/ |
D | py_seq_tensor.cc | 89 Safe_PyObjectPtr repr_obj = make_safe(PyObject_Repr(obj)); in PyRepr() 123 Safe_PyObjectPtr iter(PyObject_GetIter(seq)); in SampleElementFromSequence() 144 std::vector<Safe_PyObjectPtr> refs_to_clean; in InferShapeAndType() 239 Safe_PyObjectPtr seq = make_safe(PySequence_Fast(obj, "")); \ 252 Safe_PyObjectPtr seq = make_safe(PySequence_Fast(obj, "")); \ 307 Safe_PyObjectPtr as_int = make_safe(PyNumber_Int(v)); in ConvertOneInt64() 309 Safe_PyObjectPtr as_int = make_safe(PyNumber_Long(v)); in ConvertOneInt64() 333 Safe_PyObjectPtr as_int = make_safe(PyNumber_Int(v)); in ConvertOneInt32() 335 Safe_PyObjectPtr as_int = make_safe(PyNumber_Long(v)); in ConvertOneInt32() 388 Safe_PyObjectPtr as_float = make_safe(PyNumber_Float(v)); in ConvertOneFloat() [all …]
|
D | safe_ptr.cc | 20 Safe_PyObjectPtr make_safe(PyObject* object) { in make_safe() 21 return Safe_PyObjectPtr(object); in make_safe()
|
D | safe_ptr.h | 49 using Safe_PyObjectPtr = std::unique_ptr<PyObject, detail::PyDecrefDeleter>; variable 50 Safe_PyObjectPtr make_safe(PyObject* o);
|
D | bfloat16.cc | 96 Safe_PyObjectPtr PyBfloat16_FromBfloat16(bfloat16 x) { in PyBfloat16_FromBfloat16() 97 Safe_PyObjectPtr ref = in PyBfloat16_FromBfloat16() 538 Safe_PyObjectPtr numpy_str = make_safe(MakePyString("numpy")); in Initialize() 542 Safe_PyObjectPtr numpy = make_safe(PyImport_Import(numpy_str.get())); in Initialize() 609 Safe_PyObjectPtr ufunc_obj = in Initialize()
|
D | ndarray_tensor.cc | 170 Safe_PyObjectPtr iter = tensorflow::make_safe( in PyBytesArrayMap() 388 Safe_PyObjectPtr safe_out_array = in TF_TensorToPyArray() 420 Safe_PyObjectPtr array_safe(make_safe( in PyArrayToTF_Tensor()
|
D | strings.i | 90 std::vector<tensorflow::Safe_PyObjectPtr> converted;
|
/external/tensorflow/tensorflow/python/eager/ |
D | pywrap_tfe_src.cc | 192 tensorflow::Safe_PyObjectPtr dimension_value( in ParseDimensionValue() 251 tensorflow::Safe_PyObjectPtr py_type_enum( in ParseTypeValue() 285 tensorflow::Safe_PyObjectPtr py_value(PySequence_ITEM(py_list, i)); \ in SetOpAttrList() 294 tensorflow::Safe_PyObjectPtr py_value(PySequence_ITEM(py_list, i)); in SetOpAttrList() 319 tensorflow::Safe_PyObjectPtr py_value(PySequence_ITEM(py_list, i)); in SetOpAttrList() 344 tensorflow::Safe_PyObjectPtr py_value(PySequence_ITEM(py_list, i)); in SetOpAttrList() 358 tensorflow::Safe_PyObjectPtr inner_py_value( in SetOpAttrList() 376 tensorflow::Safe_PyObjectPtr py_value(PySequence_ITEM(py_list, i)); in SetOpAttrList() 572 tensorflow::Safe_PyObjectPtr inner_py_value( in SetOpAttrScalar() 835 tensorflow::Safe_PyObjectPtr val( in MaybeRaiseExceptionFromTFStatus() [all …]
|
D | pywrap_tensor.cc | 223 tensorflow::Safe_PyObjectPtr value_decrefer; in ConvertToEagerTensor() 446 tensorflow::Safe_PyObjectPtr value_str(PyObject_Str(value)); in EagerTensor_init() 914 tensorflow::Safe_PyObjectPtr base_class_module( in TFE_Py_InitEagerTensor()
|
/external/tensorflow/tensorflow/python/client/ |
D | tf_session_helper.cc | 142 std::vector<Safe_PyObjectPtr> py_outputs_safe; in TF_Run_wrapper_helper() 220 Safe_PyObjectPtr feed_values_holder(make_safe(feed_values)); in RunCallableHelper() 271 std::vector<Safe_PyObjectPtr> py_outputs_safe; in RunCallableHelper() 425 std::vector<Safe_PyObjectPtr> py_outputs_safe; in TF_SessionRun_wrapper_helper()
|
D | tf_session.i | 248 tensorflow::Safe_PyObjectPtr temp_string_list( 308 std::vector<tensorflow::Safe_PyObjectPtr> out_values_safe;
|