P4 to Git Change 1436555 by rili@rili-new-stg-pal-opencl on 2017/07/19 18:26:28
SWDEV-126720 - Use 64bits instead of 32bits for allocation size
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palresource.cpp#29 edit
[ROCm/clr commit: 7f451bbcec]
This commit is contained in:
@@ -922,7 +922,7 @@ bool Resource::create(MemoryType memType, CreateParams* params) {
|
|||||||
|
|
||||||
if (memoryType() == Pinned) {
|
if (memoryType() == Pinned) {
|
||||||
PinnedParams* pinned = reinterpret_cast<PinnedParams*>(params);
|
PinnedParams* pinned = reinterpret_cast<PinnedParams*>(params);
|
||||||
uint allocSize = static_cast<uint>(pinned->size_);
|
size_t allocSize = pinned->size_;
|
||||||
void* pinAddress;
|
void* pinAddress;
|
||||||
hostMemRef = pinned->hostMemRef_;
|
hostMemRef = pinned->hostMemRef_;
|
||||||
pinAddress = address_ = hostMemRef->hostMem();
|
pinAddress = address_ = hostMemRef->hostMem();
|
||||||
@@ -989,7 +989,7 @@ bool Resource::create(MemoryType memType, CreateParams* params) {
|
|||||||
}
|
}
|
||||||
if (desc_.SVMRes_) {
|
if (desc_.SVMRes_) {
|
||||||
// @todo 64K alignment is too big
|
// @todo 64K alignment is too big
|
||||||
uint allocSize = amd::alignUp(desc().width_ * elementSize_, MaxGpuAlignment);
|
size_t allocSize = amd::alignUp(desc().width_ * elementSize_, MaxGpuAlignment);
|
||||||
if ((memoryType() == RemoteUSWC) || (memoryType() == Remote)) {
|
if ((memoryType() == RemoteUSWC) || (memoryType() == Remote)) {
|
||||||
Pal::SvmGpuMemoryCreateInfo createInfo = {};
|
Pal::SvmGpuMemoryCreateInfo createInfo = {};
|
||||||
createInfo.isUsedForKernel = desc_.isAllocExecute_;
|
createInfo.isUsedForKernel = desc_.isAllocExecute_;
|
||||||
|
|||||||
مرجع در شماره جدید
Block a user