HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
onnxruntime_run_options_config_keys.h
Go to the documentation of this file.
1 // Copyright (c) Microsoft Corporation. All rights reserved.
2 // Licensed under the MIT License.
3 
4 #pragma once
5 
6 /*
7  * This file defines RunOptions Config Keys and format of the Config Values.
8  *
9  * The Naming Convention for a RunOptions Config Key,
10  * "[Area][.[SubArea1].[SubArea2]...].[Keyname]"
11  * Such as "ep.cuda.use_arena"
12  * The Config Key cannot be empty
13  * The maximum length of the Config Key is 128
14  *
15  * The string format of a RunOptions Config Value is defined individually for each Config.
16  * The maximum length of the Config Value is 1024
17  */
18 
19 // Key for enabling shrinkages of user listed device memory arenas.
20 // Expects a list of semi-colon separated key value pairs separated by colon in the following format:
21 // "device_0:device_id_0;device_1:device_id_1"
22 // No white-spaces allowed in the provided list string.
23 // Currently, the only supported devices are : "cpu", "gpu" (case sensitive).
24 // If "cpu" is included in the list, DisableCpuMemArena() API must not be called (i.e.) arena for cpu should be enabled.
25 // Example usage: "cpu:0;gpu:0" (or) "gpu:0"
26 // By default, the value for this key is empty (i.e.) no memory arenas are shrunk
27 static const char* const kOrtRunOptionsConfigEnableMemoryArenaShrinkage = "memory.enable_memory_arena_shrinkage";
28 
29 // Set to '1' to not synchronize execution providers with CPU at the end of session run.
30 // Per default it will be set to '0'
31 // Taking CUDA EP as an example, it omit triggering cudaStreamSynchronize on the compute stream.
32 static const char* const kOrtRunOptionsConfigDisableSynchronizeExecutionProviders = "disable_synchronize_execution_providers";