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:
Changming Sun 2023-04-23 20:21:59 -07:00 committed by GitHub
parent 9df1a5e605
commit c82bebde6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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"];