SWDEV-504383 - Cleaned up kForcedTimeout10us and removed IsHwEventReadyForcedWait
Also removed active_wait_timeout Change-Id: I7a429f003c09a4df267b5c0983050704260094c6
This commit is contained in:
committed by
Saleel Kudchadker
parent
32daa8f384
commit
4872b420c9
@@ -518,14 +518,8 @@ inline bool DmaBlitManager::rocrCopyBuffer(address dst, hsa_agent_t& dstAgent,
|
||||
}
|
||||
|
||||
gpu().Barriers().SetActiveEngine(engine);
|
||||
// Check if host wait has to be forced
|
||||
bool forceHostWait = forceHostWaitFunc(size);
|
||||
|
||||
constexpr bool kIgnoreHostWait = false;
|
||||
// Ignore waiting on any previous kernel dispatch and queue a signal to ROCr copy api instead
|
||||
auto wait_events = gpu().Barriers().WaitingSignal(engine, kIgnoreHostWait);
|
||||
hsa_signal_t active = gpu().Barriers().ActiveSignal(kInitSignalValueOne, gpu().timestamp(),
|
||||
forceHostWait);
|
||||
auto wait_events = gpu().Barriers().WaitingSignal(engine);
|
||||
hsa_signal_t active = gpu().Barriers().ActiveSignal(kInitSignalValueOne, gpu().timestamp());
|
||||
|
||||
if (!kUseRegularCopyApi && engine != HwQueueEngine::Unknown) {
|
||||
if (copyMask == 0) {
|
||||
@@ -2635,26 +2629,6 @@ amd::Memory* DmaBlitManager::pinHostMemory(const void* hostMem, size_t pinSize,
|
||||
return amdMemory;
|
||||
}
|
||||
|
||||
bool DmaBlitManager::forceHostWaitFunc(size_t copy_size) const {
|
||||
// 10us wait is true for all other targets.
|
||||
bool forceHostWait = true;
|
||||
// Based on the profiled results, do not wait for copy size > 24 KB.
|
||||
static constexpr size_t kGfx90aCopyThreshold = 24;
|
||||
|
||||
if ((dev().isa().versionMajor() == 9 && dev().isa().versionMinor() == 0
|
||||
&& dev().isa().versionStepping() == 10) && (copy_size >= kGfx90aCopyThreshold * Ki)) {
|
||||
// Check if this is gfx90a and restrict small copy to 24K.
|
||||
forceHostWait = false;
|
||||
} else if ((dev().isa().versionMajor() == 9) && (dev().isa().versionMinor() == 4)
|
||||
&& (dev().isa().versionStepping() == 0 || dev().isa().versionStepping() == 1
|
||||
|| dev().isa().versionStepping() == 2)) {
|
||||
// for gfx940, gfx941, gfx942, dependency signal resolution is fast, so no Host wait at all.
|
||||
forceHostWait = false;
|
||||
}
|
||||
|
||||
return forceHostWait;
|
||||
}
|
||||
|
||||
Memory* KernelBlitManager::createView(const Memory& parent, cl_image_format format,
|
||||
cl_mem_flags flags) const {
|
||||
assert((parent.owner()->asBuffer() == nullptr) && "View supports images only");
|
||||
|
||||
Reference in New Issue
Block a user