microsoft/onnxruntime-extensions

Public

mirrored from https://github.com/microsoft/onnxruntime-extensionsAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
bfbfa5a3044ec8d1312f3782c78ea3b9246bf667

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

test/shared_test/test_kernel.hpp

28lines · modecode

1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT License.
3
4#pragma once
5
6#include <math.h>
7
8const char* GetLibraryPath();
9
10struct TestValue {
11 const char* name = nullptr;
12 ONNXTensorElementDataType element_type;
13 std::vector<int64_t> dims;
14 std::vector<float> values_float;
15 std::vector<int32_t> values_int32;
16 std::vector<int64_t> values_int64;
17 std::vector<std::string> values_string;
18 std::vector<bool> value_bool;
19};
20
21void RunSession(Ort::Session& session_object,
22 const std::vector<TestValue>& inputs,
23 const std::vector<TestValue>& outputs);
24
25void TestInference(Ort::Env& env, const ORTCHAR_T* model_uri,
26 const std::vector<TestValue>& inputs,
27 const std::vector<TestValue>& outputs,
28 const char* custom_op_library_filename);
29