From c55f3476897d8afb2ac89e04b990e31c46dfbbf0 Mon Sep 17 00:00:00 2001 From: PeixuanZuo <94887879+PeixuanZuo@users.noreply.github.com> Date: Mon, 13 Mar 2023 16:19:23 +0800 Subject: [PATCH] [ROCm] change miopen_conv_use_max_workspace=true (#14982) Change miopen_conv_use_max_workspace=true to get best algorithm during `miopenFindConvolutionForwardAlgorithm` process. --- .../core/providers/rocm/rocm_execution_provider_info.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/onnxruntime/core/providers/rocm/rocm_execution_provider_info.h b/onnxruntime/core/providers/rocm/rocm_execution_provider_info.h index 56152699af..b7c308d13d 100644 --- a/onnxruntime/core/providers/rocm/rocm_execution_provider_info.h +++ b/onnxruntime/core/providers/rocm/rocm_execution_provider_info.h @@ -56,7 +56,10 @@ struct ROCMExecutionProviderInfo { // arena config. OrtArenaCfg* default_memory_arena_cfg{nullptr}; ROCMExecutionProviderExternalAllocatorInfo external_allocator_info{}; - bool miopen_conv_use_max_workspace{false}; + + // By default, try to use as much as possible memory for algo search. + // If set to false, use fix workspace size (32M) for Conv algo search, the final algo might not be the best. + bool miopen_conv_use_max_workspace{true}; rocm::TunableOpInfo tunable_op{};