mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-21 19:18:55 +00:00
Add support for output seq(tensor) in python binding and test framework. Implement SequenceConstruct, SequenceEmpty, SequenceInsert and SequenceErase ops. (#2040)
29 lines
883 B
C++
29 lines
883 B
C++
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// Licensed under the MIT License.
|
|
|
|
#pragma once
|
|
|
|
#include <pybind11/iostream.h>
|
|
#include <pybind11/pybind11.h>
|
|
#include <pybind11/stl.h>
|
|
|
|
#include "core/common/logging/logging.h"
|
|
#include "core/common/logging/sinks/clog_sink.h"
|
|
#include "core/common/logging/sinks/cerr_sink.h"
|
|
#include "core/framework/allocatormgr.h"
|
|
#include "core/session/environment.h"
|
|
#include "core/framework/ml_value.h"
|
|
#include "core/session/inference_session.h"
|
|
|
|
namespace onnxruntime {
|
|
namespace python {
|
|
|
|
namespace py = pybind11;
|
|
|
|
int OnnxRuntimeTensorToNumpyType(const DataTypeImpl* tensor_type);
|
|
|
|
void CreateGenericMLValue(const onnxruntime::InputDefList* input_def_list, AllocatorPtr alloc, const std::string& name_input,
|
|
py::object& value, OrtValue* p_mlvalue);
|
|
|
|
} // namespace python
|
|
} // namespace onnxruntime
|