|
@@ -103,7 +103,9 @@ int32_t _ghf_genrWS( _GHT_WRKSET* const pwSet,
|
|
|
clCtx=
|
|
clCtx=
|
|
|
clCreateContext(pclCtxProps, 1u, &clWrkDev,
|
|
clCreateContext(pclCtxProps, 1u, &clWrkDev,
|
|
|
_ghf_CtxEvent, NULL, &pwSet->APIErr);
|
|
_ghf_CtxEvent, NULL, &pwSet->APIErr);
|
|
|
- /* TODO: ^[Valg] 8 bytes are lost */
|
|
|
|
|
|
|
+ /* TODO: ^[Valg] 8 bytes in 1 blocks are definitely lost
|
|
|
|
|
+ * in loss record 12 of 1,583 by Intel library
|
|
|
|
|
+ * Intel::OpenCL::TaskExecutor::TBBTaskExecutor::Init */
|
|
|
if(pwSet->APIErr) {
|
|
if(pwSet->APIErr) {
|
|
|
/* обработка ситуации, при которой не обеспечивается
|
|
/* обработка ситуации, при которой не обеспечивается
|
|
|
* автоматическую синхронизация между разными API */
|
|
* автоматическую синхронизация между разными API */
|
|
@@ -111,7 +113,8 @@ int32_t _ghf_genrWS( _GHT_WRKSET* const pwSet,
|
|
|
if(clCtx) pwSet->APIErr=clReleaseContext(clCtx);
|
|
if(clCtx) pwSet->APIErr=clReleaseContext(clCtx);
|
|
|
clCtx=clCreateContext(pclCtxProps, 1u, &clWrkDev,
|
|
clCtx=clCreateContext(pclCtxProps, 1u, &clWrkDev,
|
|
|
_ghf_CtxEvent, NULL, &pwSet->APIErr);
|
|
_ghf_CtxEvent, NULL, &pwSet->APIErr);
|
|
|
- /* TODO: ^[Valg] подозрение в потере 8-ми байт */
|
|
|
|
|
|
|
+ /* TODO: ^[Valg] 4 bytes in 1 blocks are definitely lost
|
|
|
|
|
+ * in loss record 1 of 1,587 */
|
|
|
if(pwSet->APIErr)
|
|
if(pwSet->APIErr)
|
|
|
__CLAPI_ERR_ROUTINE_WITH_RET("clCreateContext")
|
|
__CLAPI_ERR_ROUTINE_WITH_RET("clCreateContext")
|
|
|
}
|
|
}
|
|
@@ -132,7 +135,7 @@ int32_t _ghf_genrWS( _GHT_WRKSET* const pwSet,
|
|
|
}
|
|
}
|
|
|
if(LogLvl==_GHE_LOG_DEFAULT)
|
|
if(LogLvl==_GHE_LOG_DEFAULT)
|
|
|
_ghf_logWS_DevInfoShort(*pwSet, _ghf_getWS_Dev(*pwSet), NULL);
|
|
_ghf_logWS_DevInfoShort(*pwSet, _ghf_getWS_Dev(*pwSet), NULL);
|
|
|
- { /* program */
|
|
|
|
|
|
|
+ if(pvCLProgramSources) { /* program */
|
|
|
cl_device_id clWrkDev=_ghf_getWS_Dev(*pwSet);
|
|
cl_device_id clWrkDev=_ghf_getWS_Dev(*pwSet);
|
|
|
switch(SourceType) {
|
|
switch(SourceType) {
|
|
|
case _GHE_HL_LISTINGS:
|
|
case _GHE_HL_LISTINGS:
|
|
@@ -204,6 +207,9 @@ int32_t _ghf_genrWS( _GHT_WRKSET* const pwSet,
|
|
|
#if !defined(__OCLH_COMPILER_ONLY_FLAG) && !defined(__OCLH_LINKER_ONLY_FLAG)
|
|
#if !defined(__OCLH_COMPILER_ONLY_FLAG) && !defined(__OCLH_LINKER_ONLY_FLAG)
|
|
|
pwSet->APIErr=clBuildProgram(pwSet->Program, 1u, &clWrkDev,
|
|
pwSet->APIErr=clBuildProgram(pwSet->Program, 1u, &clWrkDev,
|
|
|
pcBldOpts, NULL, NULL);
|
|
pcBldOpts, NULL, NULL);
|
|
|
|
|
+ /* TODO: ^[Valg] 326 bytes in 1 blocks are definitely lost in
|
|
|
|
|
+ * loss record 1,531 of 1,583 by Intel library
|
|
|
|
|
+ * Intel::OpenCL::Framework::ExecutionModule::Initialize */
|
|
|
#endif /* !defined(__OCLH_COMPILER_ONLY_FLAG) &&
|
|
#endif /* !defined(__OCLH_COMPILER_ONLY_FLAG) &&
|
|
|
!defined(__OCLH_LINKER_ONLY_FLAG) */
|
|
!defined(__OCLH_LINKER_ONLY_FLAG) */
|
|
|
#if defined(__OCLH_COMPILER_ONLY_FLAG) && !defined(__OCLH_LINKER_ONLY_FLAG)
|
|
#if defined(__OCLH_COMPILER_ONLY_FLAG) && !defined(__OCLH_LINKER_ONLY_FLAG)
|
|
@@ -316,6 +322,12 @@ int32_t _ghf_genrWS( _GHT_WRKSET* const pwSet,
|
|
|
cluNofKernels,
|
|
cluNofKernels,
|
|
|
pwSet->pKernels,
|
|
pwSet->pKernels,
|
|
|
&ctrlVal);
|
|
&ctrlVal);
|
|
|
|
|
+ /* TODO: ^[Valg] 192 (32 direct, 160 indirect) bytes
|
|
|
|
|
+ * in 1 blocks are definitely lost
|
|
|
|
|
+ * in loss record 1,508 of 1,583 by Intel library
|
|
|
|
|
+ * Intel::OpenCL::ClangFE::
|
|
|
|
|
+ * ClangFECompilerGetKernelArgInfoTask::
|
|
|
|
|
+ * GetKernelArgInfo */
|
|
|
if(pwSet->APIErr) {
|
|
if(pwSet->APIErr) {
|
|
|
if(_ghf_isLogValid(TmpLog)) {
|
|
if(_ghf_isLogValid(TmpLog)) {
|
|
|
_ghf_logWS_APIErr(*pwSet, pcLogMsg);
|
|
_ghf_logWS_APIErr(*pwSet, pcLogMsg);
|
|
@@ -394,6 +406,8 @@ int32_t _ghf_genrWS( _GHT_WRKSET* const pwSet,
|
|
|
}
|
|
}
|
|
|
if(pcBldOpts) { free(pcBldOpts); pcBldOpts=NULL; }
|
|
if(pcBldOpts) { free(pcBldOpts); pcBldOpts=NULL; }
|
|
|
}
|
|
}
|
|
|
|
|
+ } else {
|
|
|
|
|
+ _ghf_logWS_Msg(*pwSet, "No program sources");
|
|
|
}
|
|
}
|
|
|
/* work items and groups*/
|
|
/* work items and groups*/
|
|
|
pwSet->szMaxWGsz=_ghf_getWS_MaxWIinWG(*pwSet);
|
|
pwSet->szMaxWGsz=_ghf_getWS_MaxWIinWG(*pwSet);
|
|
@@ -447,7 +461,7 @@ int32_t _ghf_wipeWS(_GHT_WRKSET* const pwSet) {
|
|
|
#define __LOG_CLAPI_ERR_ROUTINE(___CLAPI_CALL) \
|
|
#define __LOG_CLAPI_ERR_ROUTINE(___CLAPI_CALL) \
|
|
|
{ char pcCLAPICall[_GHM_MAXLEN_OF_LOGMSG]; \
|
|
{ char pcCLAPICall[_GHM_MAXLEN_OF_LOGMSG]; \
|
|
|
snprintf(pcCLAPICall,_GHM_MAXLEN_OF_LOGMSG, "%s/%s", __func__,___CLAPI_CALL);\
|
|
snprintf(pcCLAPICall,_GHM_MAXLEN_OF_LOGMSG, "%s/%s", __func__,___CLAPI_CALL);\
|
|
|
- _ghf_logWS_APIErr(*pwSet, pcCLAPICall); \
|
|
|
|
|
|
|
+ _ghf_logWS_APIErr(*pwSet, pcCLAPICall); \
|
|
|
i32Res=_GHM_DECONSTRUCTION_OF_WORKSET_ERROR; }
|
|
i32Res=_GHM_DECONSTRUCTION_OF_WORKSET_ERROR; }
|
|
|
/**/
|
|
/**/
|
|
|
int32_t i32Res=_GHM_OK;
|
|
int32_t i32Res=_GHM_OK;
|
|
@@ -490,6 +504,10 @@ int32_t _ghf_wipeWS(_GHT_WRKSET* const pwSet) {
|
|
|
if(pwSet->APIErr) __LOG_CLAPI_ERR_ROUTINE("clReleaseProgram")
|
|
if(pwSet->APIErr) __LOG_CLAPI_ERR_ROUTINE("clReleaseProgram")
|
|
|
pwSet->Program=NULL; if(pRtWS) pRtWS->Program=NULL;
|
|
pwSet->Program=NULL; if(pRtWS) pRtWS->Program=NULL;
|
|
|
}
|
|
}
|
|
|
|
|
+ if(_ghf_getWS_Dev(*pwSet)) {
|
|
|
|
|
+ pwSet->APIErr=clReleaseDevice(_ghf_getWS_Dev(*pwSet));
|
|
|
|
|
+ if(pwSet->APIErr) __LOG_CLAPI_ERR_ROUTINE("clReleaseDevice")
|
|
|
|
|
+ }
|
|
|
if(pwSet->Queue) {
|
|
if(pwSet->Queue) {
|
|
|
pwSet->APIErr=clReleaseCommandQueue(pwSet->Queue);
|
|
pwSet->APIErr=clReleaseCommandQueue(pwSet->Queue);
|
|
|
if(pwSet->APIErr) __LOG_CLAPI_ERR_ROUTINE("clReleaseCommandQueue")
|
|
if(pwSet->APIErr) __LOG_CLAPI_ERR_ROUTINE("clReleaseCommandQueue")
|
|
@@ -997,7 +1015,10 @@ int32_t _ghf_buildDevList(_GHT_WRKSET wSet, cl_device_id** ppDevLst) {
|
|
|
cl_uint i=0u;
|
|
cl_uint i=0u;
|
|
|
/* get platforms */
|
|
/* get platforms */
|
|
|
wSet.APIErr=clGetPlatformIDs(0u, NULL, &cluNofPlatfs);
|
|
wSet.APIErr=clGetPlatformIDs(0u, NULL, &cluNofPlatfs);
|
|
|
- /* TODO: ^[Valg] 8 bytes are lost */
|
|
|
|
|
|
|
+ /* 278 (240 direct, 38 indirect) bytes in 1 blocks are definitely lost
|
|
|
|
|
+ * in loss record 1,525 of 1,583 by Intel library
|
|
|
|
|
+ * Intel::OpenCL::Framework::ExecutionModule::Initialize
|
|
|
|
|
+ * Intel::OpenCL::Framework::Device::CreateAndInitAllDevicesOfDeviceType */
|
|
|
if(wSet.APIErr) {
|
|
if(wSet.APIErr) {
|
|
|
char pcLogMsg[_GHM_MAXLEN_OF_LOGMSG];
|
|
char pcLogMsg[_GHM_MAXLEN_OF_LOGMSG];
|
|
|
snprintf(pcLogMsg, _GHM_MAXLEN_OF_LOGMSG,
|
|
snprintf(pcLogMsg, _GHM_MAXLEN_OF_LOGMSG,
|