SWDEV-470612 - Add the optimized multistream path

- Added the optimized multi stream path in graph execution. It uses a fixed number of async streams in the execution
- Optimize the launch latency, where commands
creation and execution is done at the same time
- Optimize the scheduling to use less barriers and waiting signals if
the same queue  can be detected
- The new path is controlled by  DEBUG_HIP_FORCE_GRAPH_QUEUES
environment variable, where 0 will use the original path and any other
value will force the number of asynchronous queues for execution
- DEBUG_HIP_FORCE_ASYNC_QUEUE can force single queue async
execution in graphs(applicable for Navi families only)

Change-Id: I7eb40bc15c45f508d6911868a6f6d4c3598d380e
Bu işleme şunda yer alıyor:
German Andryeyev
2024-07-29 11:08:51 -04:00
ebeveyn bd3a35bde1
işleme 9db52f9a46
6 değiştirilmiş dosya ile 367 ekleme ve 35 silme
+3
Dosyayı Görüntüle
@@ -1384,6 +1384,9 @@ bool VirtualGPU::initPool(size_t kernarg_pool_size) {
roc_device_.info().largeBar_) {
kernarg_pool_base_ =
reinterpret_cast<address>(roc_device_.deviceLocalAlloc(kernarg_pool_size_));
// @note Workaround first access penalty.
// KFD may update CPU page tables on the first CPU access
*kernarg_pool_base_ = 0;
} else {
kernarg_pool_base_ = reinterpret_cast<address>(roc_device_.hostAlloc(kernarg_pool_size_, 0,
Device::MemorySegment::kKernArg));
+6
Dosyayı Görüntüle
@@ -152,6 +152,12 @@ class Event : public RuntimeObject {
}
public:
//! Use profiling info to force a tracking signal on command
void SetProfiling() {
EnableProfiling();
profilingInfo_.marker_ts_ = true;
}
//! Return the context for this event.
virtual const Context& context() const = 0;
+4
Dosyayı Görüntüle
@@ -249,6 +249,10 @@ release(bool, HIP_VMEM_MANAGE_SUPPORT, true, \
"Virtual Memory Management Support") \
release(bool, DEBUG_HIP_GRAPH_DOT_PRINT, false, \
"Enable/Disable graph debug dot print dump") \
release(bool, DEBUG_HIP_FORCE_ASYNC_QUEUE, false, \
"Forces grpahs into async queue mode. DEBUG_HIP_FORCE_GRAPH_QUEUES must be 1") \
release(uint, DEBUG_HIP_FORCE_GRAPH_QUEUES, 4, \
"Forces the number of streams for the graph parallel execution") \
release(bool, HIP_ALWAYS_USE_NEW_COMGR_UNBUNDLING_ACTION, false, \
"Force to always use new comgr unbundling action") \
release(bool, DEBUG_HIP_KERNARG_COPY_OPT, true, \