Closed gdh1995 closed 1 year ago
@gdh1995 ,
Thanks for report this. Can you share your patch with a PR? We'd like try it locally. Thanks
Um, I didn't make any meaningful change. All the logic keeps the same as commit f8741b4 .
My test code looks like:
// src/tim/vx/internal/src/kernel/vsi_nn_kernel.c:523
static vsi_status _gpu_register
{
// ...
obj = vxAddKernelInProgram(
program,
info->name,
info->enumeration,
info->numParams,
info->validate,
info->initialize,
info->deinitialize
);
// region: I only added these 5 lines
status = vxGetStatus( (vx_reference)obj );
if (VSI_SUCCESS != status)
{
VSILOGE( "vxAddKernelInProgram %s fail: %d.", info->name, (int) status);
}
// endregion
if( obj )
{
status = _kernel_init_obj( info, obj );
// here status is -10.
//vxReleaseKernel( &obj );
}
}
Um, I didn't make any meaningful change. All the logic keeps the same as commit f8741b4 .
My test code looks like:
// src/tim/vx/internal/src/kernel/vsi_nn_kernel.c:523 static vsi_status _gpu_register { // ... obj = vxAddKernelInProgram( program, info->name, info->enumeration, info->numParams, info->validate, info->initialize, info->deinitialize ); // region: I only added these 5 lines status = vxGetStatus( (vx_reference)obj ); if (VSI_SUCCESS != status) { VSILOGE( "vxAddKernelInProgram %s fail: %d.", info->name, (int) status); } // endregion if( obj ) { status = _kernel_init_obj( info, obj ); // here status is -10. //vxReleaseKernel( &obj ); } }
Hi,
It looks like the kernel is invalid, please the kernel info
The original code without vxGetStatus( (vx_reference)obj );
still stops in the below _kernel_init_obj(info, obj)
, in which vxAddParameterToKernel
returns -12
, and then vxRemoveKernel
returns -10
.
vxAddKernelInProgram returns failure, please check the parameters info and program.
I want to use the
PRE_PROCESS
node to convertnhwc-uint8-from-cv_imread
intonchw-uint8-quant_per_tensor
, but with the prebuilt SDK of 6.4.10.2, an A311D board reports such an error:I've debugged the code, but it seems
obj = vxAddKernelInProgram(...)
has contains some errors - an insertedvxGetStatus((vx_reference)obj)
returns-1
, althoughobj
is not NULL.The CPU version named
com.vivantecorp.extension.cpu.pre_process_rgb_sw
can be created byvxAddUserKernel
without any error.So I wonder why the evis version breaks, and how I can work around it?