mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-04 23:59:56 +00:00
Fix the TestCUDAProviderOptions test error (#15649)
The test limits GPU's running memory requirements to 20MB. It might be enough in the past, but it seems not enough now when we upgrade CUDA to a newer version or add more kernels/graph transformers to our code. Therefore we need to increase it. Our test log shows sometimes the model needs 128MB memory. So I set the limit to 256MB.
This commit is contained in:
parent
9df1a5e605
commit
c82bebde6a
1 changed files with 3 additions and 2 deletions
|
|
@ -80,7 +80,8 @@ namespace Microsoft.ML.OnnxRuntime.Tests
|
|||
|
||||
var providerOptionsDict = new Dictionary<string, string>();
|
||||
providerOptionsDict["device_id"] = "0";
|
||||
providerOptionsDict["gpu_mem_limit"] = "20971520";
|
||||
// 256MB
|
||||
providerOptionsDict["gpu_mem_limit"] = "268435456";
|
||||
providerOptionsDict["arena_extend_strategy"] = "kSameAsRequested";
|
||||
providerOptionsDict["cudnn_conv_algo_search"] = "DEFAULT";
|
||||
providerOptionsDict["do_copy_in_default_stream"] = "1";
|
||||
|
|
@ -96,7 +97,7 @@ namespace Microsoft.ML.OnnxRuntime.Tests
|
|||
value = resultProviderOptionsDict["device_id"];
|
||||
Assert.Equal("0", value);
|
||||
value = resultProviderOptionsDict["gpu_mem_limit"];
|
||||
Assert.Equal("20971520", value);
|
||||
Assert.Equal("268435456", value);
|
||||
value = resultProviderOptionsDict["arena_extend_strategy"];
|
||||
Assert.Equal("kSameAsRequested", value);
|
||||
value = resultProviderOptionsDict["cudnn_conv_algo_search"];
|
||||
|
|
|
|||
Loading…
Reference in a new issue