Skip to content

Commit 65d174c

Browse files
saleelkrakesroy
authored andcommitted
SWDEV-478624 - Use readback workaround to ensure kernel arg coherence
Use env var DEBUG_CLR_KERNARG_HDP_FLUSH_WA=1 to fall back to HDP flush workaround. The default is 0 Change-Id: I7bdb9be61da60c30d15ac9991b7cd27351e1831c
1 parent 7f04509 commit 65d174c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

rocclr/device/rocm/rocsettings.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ void Settings::setKernelArgImpl(const amd::Isa& isa, bool isXgmi, bool hasValidH
256256

257257
auto kernelArgImpl = KernelArgImpl::HostKernelArgs;
258258

259+
hasValidHDPFlush &= DEBUG_CLR_KERNARG_HDP_FLUSH_WA;
260+
259261
if (isXgmi) {
260262
// The XGMI-connected path does not require the manual memory ordering
261263
// workarounds that the PCIe connected path requires
@@ -284,6 +286,8 @@ void Settings::setKernelArgImpl(const amd::Isa& isa, bool isXgmi, bool hasValidH
284286
if (!flagIsDefault(HIP_FORCE_DEV_KERNARG)) {
285287
kernel_arg_impl_ = kernelArgImpl & (HIP_FORCE_DEV_KERNARG ? 0xF : 0x0);
286288
}
289+
290+
ClPrint(amd::LOG_INFO, amd::LOG_INIT, "Using dev kernel arg wa = %d", kernel_arg_impl_);
287291
}
288292
} // namespace amd::roc
289293

rocclr/utils/flags.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ release(bool, DEBUG_HIP_GRAPH_DOT_PRINT, false, \
251251
"Enable/Disable graph debug dot print dump") \
252252
release(bool, HIP_ALWAYS_USE_NEW_COMGR_UNBUNDLING_ACTION, false, \
253253
"Force to always use new comgr unbundling action") \
254+
release(bool, DEBUG_CLR_KERNARG_HDP_FLUSH_WA, false, \
255+
"Toggle kernel arg copy workaround") \
254256

255257
namespace amd {
256258

0 commit comments

Comments
 (0)