Quantcast
Channel: Intel® Software - OpenCL*
Viewing all articles
Browse latest Browse all 1182

Eclipse Code Builder - kernel arguments and configuration locked

$
0
0

Hello,

I 'm currently trying to deploy Intel OpenCL on the GPU of my Intel(R) Xeon(R) CPU E3-1505M v5 @ 2.80GHz on Centos 7.1. My configuration is :

- intel_sdk_for_opencl_2016_6.3.0.1904_x64.tgz

- driver r3.1.58620

- eclipse Oxygen, jre-8u111-linux-x64, mono-4.0.1-4.x86_64

I'm following the Code Builder tutorial. Every thing works fine until this step : https://software.intel.com/en-us/node/671857

When I try to launch the kernel, I have an error message telling me that the buffers are not assigned:

execution analysis error: No variable assigned to kernel argument #0 (ptrInput)

So I go to the OpenCL Kernel Analysis Input view and the configuration as well as the assigned variables are all in grey. I cannot click on the configuration and the kernel variables fields are empty.

Can you please help me ?

Regards,

Mathieu

Here are the buffers I have declared :

<!--  Kernel Builder Variables Database  --><KernelBuilderBuffers><BufferDetails><Name>ptrInput</Name><DataType>uchar</DataType><MemoryFlags>CL_MEM_READ_WRITE</MemoryFlags><AccessQualifier>READ_ONLY</AccessQualifier><I_O_Mode>0</I_O_Mode><Source>/home/user/STI/THOREL/workspace_eclipse/Code Builder Sessions/session_0/bin_ptrInput.bin</Source><ReadOutput>true</ReadOutput><BufferSize>262144</BufferSize><InitByRandom>false</InitByRandom><InitByZero>true</InitByZero><UseAsSVM>false</UseAsSVM></BufferDetails><BufferDetails><Name>ptrOutput</Name><DataType>uchar</DataType><MemoryFlags>CL_MEM_READ_WRITE</MemoryFlags><AccessQualifier>READ_ONLY</AccessQualifier><I_O_Mode>1</I_O_Mode><Source></Source><ReadOutput>true</ReadOutput><BufferSize>262144</BufferSize><InitByRandom>false</InitByRandom><InitByZero>false</InitByZero><UseAsSVM>false</UseAsSVM></BufferDetails></KernelBuilderBuffers><KernelBuilderImages/><KernelBuilderSamplers/>

 

The kernel is :

 

#define FILTER_WIDTH ( 11 )
#define FILTER_SIZE  ( FILTER_WIDTH * FILTER_WIDTH )
#define FILTER_INF   ( 5 ) // Need to be calculated -> floor( FILTER_WIDTH / 2 )

__kernel void convolve_no_local( const __global unsigned char * restrict ptrInput,
                                       __global unsigned char * restrict ptrOutput,
                                 const          int                      iWidth,
                                 const          int                      iHeight )
{
    // Must be normalized
    const int arrFilter[ FILTER_SIZE ] = { -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,  0,
                                           -2, -2, -2, -2, -2, -2, -2, -2, -2,  0,  2,
                                           -2, -2, -2, -2, -2, -2, -2, -2,  0,  2,  2,
                                           -2, -2, -2, -2, -2, -2, -2,  0,  2,  2,  2,
                                           -2, -2, -2, -2, -2, -2,  0,  2,  2,  2,  2,
                                           -2, -2, -2, -2, -2,  0,  2,  2,  2,  2,  2,
                                           -2, -2, -2, -2,  0,  2,  2,  2,  2,  2,  2,
                                           -2, -2, -2,  0,  2,  2,  2,  2,  2,  2,  2,
                                           -2, -2,  0,  2,  2,  2,  2,  2,  2,  2,  2,
                                           -2,  0,  2,  2,  2,  2,  2,  2,  2,  2,  2,
                                            0,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2 };

    const int iWorkGlobalX = get_global_id( 0 );
    const int iWorkGlobalY = get_global_id( 1 );

    if( iWorkGlobalX >= FILTER_INF && iWorkGlobalX < iWidth  - FILTER_INF &&
        iWorkGlobalY >= FILTER_INF && iWorkGlobalY < iHeight - FILTER_INF )
    {
        const int iInputX = ( iWorkGlobalX - FILTER_INF );
        const int iInputY = ( iWorkGlobalY - FILTER_INF );

        int iInput;
        int iValue = 0;

#ifdef __UNROLL_3x3__
        iInput = iInputX + iInputY * iWidth;
        iValue = iValue + ( arrFilter[ 0 ] * convert_int( ptrInput[ iInput     ] ));
        iValue = iValue + ( arrFilter[ 1 ] * convert_int( ptrInput[ iInput + 1 ] ));
        iValue = iValue + ( arrFilter[ 2 ] * convert_int( ptrInput[ iInput + 2 ] ));
        iInput = iInput + iWidth;
        iValue = iValue + ( arrFilter[ 3 ] * convert_int( ptrInput[ iInput     ] ));
        iValue = iValue + ( arrFilter[ 4 ] * convert_int( ptrInput[ iInput + 1 ] ));
        iValue = iValue + ( arrFilter[ 5 ] * convert_int( ptrInput[ iInput + 2 ] ));
        iInput = iInput + iWidth;
        iValue = iValue + ( arrFilter[ 6 ] * convert_int( ptrInput[ iInput     ] ));
        iValue = iValue + ( arrFilter[ 7 ] * convert_int( ptrInput[ iInput + 1 ] ));
        iValue = iValue + ( arrFilter[ 8 ] * convert_int( ptrInput[ iInput + 2 ] ));
#else
        int iRow;
        int iCol;
        int iFilter = 0;

        for( iRow = 0 ; iRow < FILTER_WIDTH ; iRow++ )
        {
            iInput = iInputX + ( iInputY + iRow ) * iWidth;

            for( iCol = 0 ; iCol < FILTER_WIDTH ; iCol++ )
            {
                iValue = iValue + ( arrFilter[ iFilter ] * convert_int( ptrInput[ iInput ] ));

                iInput++;
                iFilter++;
            }
        }
#endif
        ptrOutput[ iWorkGlobalX + iWorkGlobalY * iWidth ] = convert_uchar_sat( iValue );
    }
}

 

Here are the view screeshots :

     

         

Thread Topic: 

Help Me

Viewing all articles
Browse latest Browse all 1182

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>