MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / get_npy_output_accessor

Function get_npy_output_accessor

utils/GraphUtils.h:616–630  ·  view source on GitHub ↗

Generates appropriate npy output accessor according to the specified npy_path * * @note If npy_path is empty will generate a DummyAccessor else will generate a NpyAccessor * * @param[in] npy_path Path to npy file. * @param[in] shape Shape of the numpy tensor data. * @param[in] data_type DataType of the numpy tensor data. * @param[in] data_layout DataLayout of the nump

Source from the content-addressed store, hash-verified

614 * @return An appropriate tensor accessor
615 */
616inline std::unique_ptr<graph::ITensorAccessor> get_npy_output_accessor(const std::string &npy_path,
617 TensorShape shape,
618 DataType data_type,
619 DataLayout data_layout = DataLayout::NCHW,
620 std::ostream &output_stream = std::cout)
621{
622 if (npy_path.empty())
623 {
624 return std::make_unique<DummyAccessor>(0);
625 }
626 else
627 {
628 return std::make_unique<NumPyAccessor>(npy_path, shape, data_type, data_layout, output_stream);
629 }
630}
631
632/** Generates appropriate npy output accessor according to the specified npy_path
633 *

Callers 3

do_setupMethod · 0.85
create_graph_qasymmMethod · 0.85
setupMethod · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected