From 9d1d788110f9490befae1e163950cfda340a7b74 Mon Sep 17 00:00:00 2001 From: JonathanLichtnerAMD Date: Tue, 11 Feb 2025 17:25:00 -0700 Subject: [PATCH] Conditionally log a DeviceGroupedConvBwdWeightTwoStage_Xdl_CShuffle warning (#1860) The code was emitting a warning if MIOpen did not create a workspace prior to invoking the IsSupportedArgument method, but the condition for MIOpen to create a workspace was not met, and so this condition was not really an error but more of a log message. This commit addresses this issue by using the CK_LOGGING facility to only generate the log message if the CK_LOGGING environment variable is set. [ROCm/composable_kernel commit: 3c7fef7f80ebefda76361b3f87868d91ff39e5b7] --- ...grouped_conv_bwd_weight_two_stage_xdl_cshuffle.hpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/include/ck/tensor_operation/gpu/device/impl/device_grouped_conv_bwd_weight_two_stage_xdl_cshuffle.hpp b/include/ck/tensor_operation/gpu/device/impl/device_grouped_conv_bwd_weight_two_stage_xdl_cshuffle.hpp index b4cf996a48..795995d9a3 100644 --- a/include/ck/tensor_operation/gpu/device/impl/device_grouped_conv_bwd_weight_two_stage_xdl_cshuffle.hpp +++ b/include/ck/tensor_operation/gpu/device/impl/device_grouped_conv_bwd_weight_two_stage_xdl_cshuffle.hpp @@ -1495,10 +1495,13 @@ struct DeviceGroupedConvBwdWeightTwoStage_Xdl_CShuffle // if workspace is not allocated if(!arg.p_workspace_) { - std::cerr << "Warning: Workspace for " - "DeviceGroupedConvBwdWeightTwoStage_Xdl_CShuffle::Argument is not " - "allocated, use SetWorkSpacePointer." - << std::endl; + if(ck::EnvIsEnabled(CK_ENV(CK_LOGGING))) + { + std::cout << "Warning: Workspace for " + "DeviceGroupedConvBwdWeightTwoStage_Xdl_CShuffle::Argument is not " + "allocated, use SetWorkSpacePointer." + << std::endl; + } return false; } if(!ck::is_xdl_supported())