From e5a38d89840fc537af3397341cce9bb5ccb79b43 Mon Sep 17 00:00:00 2001
From: foreman
Date: Tue, 30 Sep 2014 13:57:32 -0400
Subject: [PATCH] P4 to Git Change 1082817 by gandryey@gera-dev-w7 on
2014/09/30 13:47:59
ECR #304775 - Reduce the total number of renames to 16.
- Use 128KB for CB size on SI+
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#286 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#334 edit
[ROCm/clr commit: f48b935b4352623e60315029debb6042cd43e647]
---
.../clr/rocclr/runtime/device/gpu/gpusettings.cpp | 2 +-
.../clr/rocclr/runtime/device/gpu/gpuvirtual.cpp | 13 ++++++++++---
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp b/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp
index 13fd12f1d9..8a446bc4b5 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp
@@ -31,7 +31,7 @@ Settings::Settings()
// By Default persistent writes will be disabled.
stagingWritePersistent_ = GPU_STAGING_WRITE_PERSISTENT;
- maxRenames_ = 32;
+ maxRenames_ = 16;
maxRenameSize_ = 4 * Mi;
// The global heap settings
diff --git a/projects/clr/rocclr/runtime/device/gpu/gpuvirtual.cpp b/projects/clr/rocclr/runtime/device/gpu/gpuvirtual.cpp
index 1dadd25b4e..272273b476 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gpuvirtual.cpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gpuvirtual.cpp
@@ -3066,12 +3066,19 @@ bool
VirtualGPU::allocConstantBuffers()
{
// Allocate/reallocate constant buffers
- const static size_t MinCbSize = 64 * Ki;
+ size_t minCbSize;
+ if (dev().settings().siPlus_) {
+ // GCN doesn't really have a limit
+ minCbSize = 128 * Ki;
+ }
+ else {
+ minCbSize = 64 * Ki;
+ }
uint i;
// Create/reallocate constant buffer resources
for (i = 0; i < MaxConstBuffersArguments; ++i) {
- ConstBuffer* constBuf = new ConstBuffer(*this, ((MinCbSize +
+ ConstBuffer* constBuf = new ConstBuffer(*this, ((minCbSize +
ConstBuffer::VectorSize - 1) / ConstBuffer::VectorSize));
if ((constBuf != NULL) && constBuf->create()) {
@@ -3086,7 +3093,7 @@ VirtualGPU::allocConstantBuffers()
// 8xx workaround for num workgroups
if (!dev().settings().siPlus_) {
- numGrpCb_ = new ConstBuffer(*this, ((MinCbSize +
+ numGrpCb_ = new ConstBuffer(*this, ((minCbSize +
ConstBuffer::VectorSize - 1) / ConstBuffer::VectorSize));
if ((numGrpCb_ == NULL) || !numGrpCb_->create()) {
LogError("Could not allocate num groups constant buffer!");