Searched refs:py_array (Results 1 – 6 of 6) sorted by relevance
/external/tensorflow/tensorflow/compiler/xla/python/ |
D | numpy_bridge.cc | 410 PyArrayObject* py_array = reinterpret_cast<PyArrayObject*>(o); in XlaLiteralFromPyObject() local 411 int rank = PyArray_NDIM(py_array); in XlaLiteralFromPyObject() 414 dimensions[i] = PyArray_DIM(py_array, i); in XlaLiteralFromPyObject() 416 int np_type = PyArray_TYPE(py_array); in XlaLiteralFromPyObject() 419 TF_RETURN_IF_ERROR(CopyNumpyArrayToLiteral(np_type, py_array, &literal)); in XlaLiteralFromPyObject() 427 Status CopyNumpyArrayToLiteral(int np_type, PyArrayObject* py_array, in CopyNumpyArrayToLiteral() argument 431 CopyNumpyArrayToLiteral<bool>(py_array, literal); in CopyNumpyArrayToLiteral() 434 CopyNumpyArrayToLiteral<int8>(py_array, literal); in CopyNumpyArrayToLiteral() 437 CopyNumpyArrayToLiteral<int16>(py_array, literal); in CopyNumpyArrayToLiteral() 440 CopyNumpyArrayToLiteral<int32>(py_array, literal); in CopyNumpyArrayToLiteral() [all …]
|
D | numpy_bridge.h | 106 Status CopyNumpyArrayToLiteral(int np_type, PyArrayObject* py_array, 110 PyArrayObject* py_array); 113 void CopyNumpyArrayToLiteral(PyArrayObject* py_array, Literal* literal) { in CopyNumpyArrayToLiteral() argument 114 NativeT* source = static_cast<NativeT*>(PyArray_DATA(py_array)); in CopyNumpyArrayToLiteral() 116 std::copy(source, source + PyArray_SIZE(py_array), dest.data()); in CopyNumpyArrayToLiteral() 121 PyArrayObject* py_array) { in CopyLiteralToNumpyArray() argument 122 NativeT* dest = static_cast<NativeT*>(PyArray_DATA(py_array)); in CopyLiteralToNumpyArray()
|
/external/tensorflow/tensorflow/python/client/ |
D | tf_session_helper.cc | 144 PyObject* py_array; in TF_Run_wrapper_helper() local 145 s = TF_TensorToPyArray(std::move(tf_outputs_safe[i]), &py_array); in TF_Run_wrapper_helper() 150 py_outputs_safe.emplace_back(make_safe(py_array)); in TF_Run_wrapper_helper() 274 PyObject* py_array; in RunCallableHelper() local 275 s = TensorToNdarray(output, &py_array); in RunCallableHelper() 280 py_outputs_safe.push_back(make_safe(py_array)); in RunCallableHelper() 427 PyObject* py_array; in TF_SessionRun_wrapper_helper() local 428 s = TF_TensorToPyArray(std::move(output_vals_safe[i]), &py_array); in TF_SessionRun_wrapper_helper() 433 py_outputs_safe.emplace_back(make_safe(py_array)); in TF_SessionRun_wrapper_helper()
|
/external/tensorflow/tensorflow/python/lib/core/ |
D | ndarray_tensor.cc | 393 PyArrayObject* py_array = in TF_TensorToPyArray() local 396 Status s = CopyTF_TensorStringsToPyArray(tensor.get(), nelems, py_array); in TF_TensorToPyArray() 400 } else if (static_cast<size_t>(PyArray_NBYTES(py_array)) != in TF_TensorToPyArray() 402 return errors::Internal("ndarray was ", PyArray_NBYTES(py_array), in TF_TensorToPyArray() 406 FastMemcpy(PyArray_DATA(py_array), TF_TensorData(tensor.get()), in TF_TensorToPyArray() 407 PyArray_NBYTES(py_array)); in TF_TensorToPyArray()
|
/external/bcc/tests/python/ |
D | CMakeLists.txt | 52 add_test(NAME py_array WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} 53 COMMAND ${TEST_WRAPPER} py_array sudo ${CMAKE_CURRENT_SOURCE_DIR}/test_array.py)
|
/external/tensorflow/tensorflow/lite/python/interpreter_wrapper/ |
D | interpreter_wrapper.cc | 366 PyArrayObject* py_array = reinterpret_cast<PyArrayObject*>(py_object); in GetTensor() local 367 PyObject** data = reinterpret_cast<PyObject**>(PyArray_DATA(py_array)); in GetTensor()
|