From 8c56088f4335f551a86ba14a0a5a1ff5f69610ed Mon Sep 17 00:00:00 2001
From: foreman
Date: Fri, 25 Nov 2016 15:21:59 -0500
Subject: [PATCH] P4 to Git Change 1346190 by gandryey@gera-w8 on 2016/11/25
15:12:02
SWDEV-86035 - Add PAL backend to OpenCL
- Correct a fix from CL#1346120. Just remove the asserts, since size is used in the abstraction layer setup and represents cl_mem object.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#27 edit
---
rocclr/runtime/device/pal/palkernel.cpp | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/rocclr/runtime/device/pal/palkernel.cpp b/rocclr/runtime/device/pal/palkernel.cpp
index 8c8c376156..17f542e944 100644
--- a/rocclr/runtime/device/pal/palkernel.cpp
+++ b/rocclr/runtime/device/pal/palkernel.cpp
@@ -248,7 +248,7 @@ GetHSAILArgSize(const aclArgData *argInfo)
case ARG_TYPE_IMAGE:
case ARG_TYPE_SAMPLER:
case ARG_TYPE_QUEUE:
- return sizeof(uint64_t);
+ return sizeof(void*);
default:
return -1;
}
@@ -1157,13 +1157,11 @@ HSAILKernel::loadArguments(
cb->uploadDataToHw(HsaImageObjectSize);
// Then use a pointer in aqlArgBuffer to CB1
uint64_t srd = cb->vmAddress() + cb->wrtOffset();
- assert(arg->size_ == sizeof(srd) && "check the sizes");
WriteAqlArg(&aqlArgBuf, &srd, sizeof(srd));
memList.push_back(cb);
}
else {
uint64_t srd = image->hwSrd();
- assert(arg->size_ == sizeof(srd) && "check the sizes");
WriteAqlArg(&aqlArgBuf, &srd, sizeof(srd));
srdResource = true;
}
@@ -1182,7 +1180,6 @@ HSAILKernel::loadArguments(
const Sampler* gpuSampler = static_cast
(sampler->getDeviceSampler(dev()));
uint64_t srd = gpuSampler->hwSrd();
- assert(arg->size_ == sizeof(srd) && "check the sizes");
WriteAqlArg(&aqlArgBuf, &srd, sizeof(srd));
srdResource = true;
}
@@ -1201,7 +1198,6 @@ HSAILKernel::loadArguments(
}
vmQueue = gpu.vQueue()->vmAddress();
}
- assert(arg->size_ == sizeof(vmQueue) && "check the sizes");
WriteAqlArg(&aqlArgBuf, &vmQueue, sizeof(vmQueue));
}
else {