onnxruntime/onnxruntime/test/shared_lib/test_session_options.cc
gwang-msft dee7596724
Add a generic collection of session configurations to the SessionOptions (#4718)
* adding generic configurations for session options

* fix a build break on linux

* fix training ci build break

* fix training ci build break

* addressed CR comments

* fix traning ci build break

* move config_key from enum to string

* add c# api

* add python api

* fix build break

* move prepacking from 2 new api entries to session options configs

* fix traning ci build break

* add python test, update some comments, move const key definition to avoid build break

* addressed comments

* move definitions of keys to common.h

* move api to version 5

* remove accidental change in build.py

* remove pragma to avoid build break

* addressed CR comments

* fix the python build break, and move location of config keys definition

* small typo changes
2020-08-18 13:40:40 -07:00

14 lines
473 B
C++

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/session/onnxruntime_cxx_api.h"
#include "core/optimizer/graph_transformer_level.h"
#include <gtest/gtest.h>
using namespace onnxruntime;
TEST(CApiTest, session_options_graph_optimization_level) {
// Test set optimization level succeeds when valid level is provided.
Ort::SessionOptions options;
options.SetGraphOptimizationLevel(ORT_ENABLE_EXTENDED);
}