From 2336e8d5bce273ebde978dda216523c1487cf8f6 Mon Sep 17 00:00:00 2001 From: foreman Date: Fri, 19 Sep 2014 14:59:34 -0400 Subject: [PATCH] P4 to Git Change 1078871 by gandryey@gera-dev-w7 on 2014/09/19 14:45:35 ECR #304775 - Add extra CP write operation for the resource warm-up - Vidmm will page in the constant buffers before the actual usage Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#192 edit [ROCm/clr commit: 2e23538a01477af24c1af7d149415dfc8c393cbf] --- projects/clr/rocclr/runtime/device/gpu/gpuresource.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/projects/clr/rocclr/runtime/device/gpu/gpuresource.cpp b/projects/clr/rocclr/runtime/device/gpu/gpuresource.cpp index 7035246240..ea107be614 100644 --- a/projects/clr/rocclr/runtime/device/gpu/gpuresource.cpp +++ b/projects/clr/rocclr/runtime/device/gpu/gpuresource.cpp @@ -1915,8 +1915,12 @@ void Resource::warmUpRenames(VirtualGPU& gpu) { for (uint i = 0; i < dev().settings().maxRenames_; ++i) { - const bool force = true; - rename(gpu, force); + uint dummy = 0; + const bool NoWait = false; + // Write 0 for the buffer paging by VidMM + writeRawData(gpu, sizeof(dummy), &dummy, NoWait); + const bool Force = true; + rename(gpu, Force); } }