SWDEV-305016 - Improve MGPU scaling in Tensorflow

Add a threshold for ROCR/SDMA P2P transfers. ROCR copy path
requires extra barriers in compute for synchronization. That costs
extra performance with tiny transfers.
Reduce active wait time to 10us. Tensorflow uses extra thread
per GPU with constant hipEventQuery() calls. Longer active waits
in ROCr affect CPU performance.

Change-Id: I9020358438615fa2d4617f862f00a562f0a588e7
Tá an tiomantas seo le fáil i:
German Andryeyev tiomanta 2021-12-08 11:59:37 -05:00
1 tuismitheoir 587cda0c91
tiomantas 008133cf41
3 comhad athraithe
+7 -4

Níor tháinig aon chomhaid le do chuardach

+1 -1
Féach ar an gComhad
@@ -1249,7 +1249,7 @@ void* VirtualGPU::allocKernArg(size_t size, size_t alignment) {
// ================================================================================================
address VirtualGPU::allocKernelArguments(size_t size, size_t alignment) {
if (ROCR_SKIP_KERNEL_ARG_COPY) {
if (ROC_SKIP_KERNEL_ARG_COPY) {
// Make sure VirtualGPU has an exclusive access to the resources
amd::ScopedLock lock(execution());
return reinterpret_cast<address>(allocKernArg(size, alignment));