Skip to content

Commit

Permalink
SWDEV-478624 - Use readback workaround to ensure kernel arg coherence
Browse files Browse the repository at this point in the history
Use env var DEBUG_CLR_KERNARG_HDP_FLUSH_WA=1 to fall back to HDP flush
workaround. The default is 0

Change-Id: I7bdb9be61da60c30d15ac9991b7cd27351e1831c
  • Loading branch information
saleelk authored and rakesroy committed Sep 11, 2024
1 parent 7f04509 commit 65d174c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rocclr/device/rocm/rocsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ void Settings::setKernelArgImpl(const amd::Isa& isa, bool isXgmi, bool hasValidH

auto kernelArgImpl = KernelArgImpl::HostKernelArgs;

hasValidHDPFlush &= DEBUG_CLR_KERNARG_HDP_FLUSH_WA;

if (isXgmi) {
// The XGMI-connected path does not require the manual memory ordering
// workarounds that the PCIe connected path requires
Expand Down Expand Up @@ -284,6 +286,8 @@ void Settings::setKernelArgImpl(const amd::Isa& isa, bool isXgmi, bool hasValidH
if (!flagIsDefault(HIP_FORCE_DEV_KERNARG)) {
kernel_arg_impl_ = kernelArgImpl & (HIP_FORCE_DEV_KERNARG ? 0xF : 0x0);
}

ClPrint(amd::LOG_INFO, amd::LOG_INIT, "Using dev kernel arg wa = %d", kernel_arg_impl_);
}
} // namespace amd::roc

Expand Down
2 changes: 2 additions & 0 deletions rocclr/utils/flags.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ release(bool, DEBUG_HIP_GRAPH_DOT_PRINT, false, \
"Enable/Disable graph debug dot print dump") \
release(bool, HIP_ALWAYS_USE_NEW_COMGR_UNBUNDLING_ACTION, false, \
"Force to always use new comgr unbundling action") \
release(bool, DEBUG_CLR_KERNARG_HDP_FLUSH_WA, false, \
"Toggle kernel arg copy workaround") \

namespace amd {

Expand Down

0 comments on commit 65d174c

Please sign in to comment.