-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Enable CUDA provider option configuration for C# #10188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
0b8e652
Initial commit
hariharans29 72569d0
More changes
hariharans29 9b22253
More changes
hariharans29 db1ae79
More changes
hariharans29 cb01b2b
Add C# test
hariharans29 a4e5660
Fix builds
hariharans29 6a67e84
More fixes
hariharans29 f6afc8c
Fix minimal build
hariharans29 9a77c11
PR comment
hariharans29 62868fd
Merge branch 'hari/cuda_options' of https://github.com/microsoft/onnx…
hariharans29 da85d50
Update comments
hariharans29 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
include/onnxruntime/core/providers/cuda/cuda_provider_options.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| #pragma once | ||
|
|
||
| #include "onnxruntime_c_api.h" | ||
| #include "core/framework/arena_extend_strategy.h" | ||
|
|
||
| /// <summary> | ||
| /// Options for the CUDA provider that are passed to SessionOptionsAppendExecutionProvider_CUDA_V2. | ||
| /// Please note that this struct is *similar* to OrtCUDAProviderOptions but only to be used internally. | ||
| /// Going forward, new cuda provider options are to be supported via this struct and usage of the publicly defined | ||
| /// OrtCUDAProviderOptions will be deprecated over time. | ||
| /// User can only get the instance of OrtCUDAProviderOptionsV2 via CreateCUDAProviderOptions. | ||
| /// </summary> | ||
| struct OrtCUDAProviderOptionsV2 { | ||
| int device_id; // cuda device id. | ||
| int has_user_compute_stream; // indicator of user specified CUDA compute stream. | ||
| void* user_compute_stream; // user specified CUDA compute stream. | ||
| int do_copy_in_default_stream; // flag specifying if the default stream is to be used for copying. | ||
| OrtCudnnConvAlgoSearch cudnn_conv_algo_search; // cudnn algo search enum. | ||
| size_t gpu_mem_limit; // BFC Arena memory limit for CUDA. | ||
| // (will be overridden by contents of `default_memory_arena_cfg` is it exists) | ||
| onnxruntime::ArenaExtendStrategy arena_extend_strategy; // BFC Arena extension strategy. | ||
| // (will be overridden by contents of `default_memory_arena_cfg` is it exists) | ||
| OrtArenaCfg* default_memory_arena_cfg; // BFC Arena config flags. | ||
| int cudnn_conv_use_max_workspace; // flag specifying if maximum workspace can be used in cudnn conv algo search. | ||
| }; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.