Move symbols and linkerInput from Program to BuildInfo

these members should be kept per root device

Related-To: NEO-5001
Change-Id: Ie5e06deed234706cc41943d3c5e932c7d877127b
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2020-09-08 18:23:10 +02:00
committed by sys_ocldev
parent 88ee48498b
commit b52aec07dd
8 changed files with 79 additions and 67 deletions

View File

@@ -5320,14 +5320,15 @@ cl_int CL_API_CALL clGetDeviceGlobalVariablePointerINTEL(
DBG_LOG_INPUTS("device", device, "program", program,
"globalVariableName", globalVariableName,
"globalVariablePointerRet", globalVariablePointerRet);
retVal = validateObjects(device, program);
Program *pProgram = nullptr;
ClDevice *pDevice = nullptr;
retVal = validateObjects(WithCastToInternal(program, &pProgram), WithCastToInternal(device, &pDevice));
if (globalVariablePointerRet == nullptr) {
retVal = CL_INVALID_ARG_VALUE;
}
if (CL_SUCCESS == retVal) {
Program *pProgram = (Program *)(program);
const auto &symbols = pProgram->getSymbols();
const auto &symbols = pProgram->getSymbols(pDevice->getRootDeviceIndex());
auto symbolIt = symbols.find(globalVariableName);
if ((symbolIt == symbols.end()) || (symbolIt->second.symbol.segment == NEO::SegmentType::Instructions)) {
retVal = CL_INVALID_ARG_VALUE;
@@ -5352,14 +5353,16 @@ cl_int CL_API_CALL clGetDeviceFunctionPointerINTEL(
DBG_LOG_INPUTS("device", device, "program", program,
"functionName", functionName,
"functionPointerRet", functionPointerRet);
retVal = validateObjects(device, program);
Program *pProgram = nullptr;
ClDevice *pDevice = nullptr;
retVal = validateObjects(WithCastToInternal(program, &pProgram), WithCastToInternal(device, &pDevice));
if ((CL_SUCCESS == retVal) && (functionPointerRet == nullptr)) {
retVal = CL_INVALID_ARG_VALUE;
}
if (CL_SUCCESS == retVal) {
Program *pProgram = (Program *)(program);
const auto &symbols = pProgram->getSymbols();
const auto &symbols = pProgram->getSymbols(pDevice->getRootDeviceIndex());
auto symbolIt = symbols.find(functionName);
if ((symbolIt == symbols.end()) || (symbolIt->second.symbol.segment != NEO::SegmentType::Instructions)) {
retVal = CL_INVALID_ARG_VALUE;