Showing results for 
Search instead for 
Did you mean: 

Drivers & Software

Journeyman III

clBuildProgram Crash executing simple kernel?

I am getting following error at clBuildProgram () : 0xC0000005: Access violation executing location 0x000007FEE0486278.

>   ntdll.dll!00007ffab9c1aed2()    Unknown    ntdll.dll!00007ffab9c2379e()    Unknown    ntdll.dll!00007ffab9c23aaa()    Unknown    ntdll.dll!00007ffab9bbebc1()    Unknown    ntdll.dll!00007ffab9bccfca()    Unknown    amdocl64.dll!00007ffa7d38ee58() Unknown    amdocl64.dll!00007ffa7bc1ea20() Unknown>   adlTest64D.exe!adl::KernelBuilderCLImpl::setFromStringListsImpl(const adl::Device * deviceData, const char * * src, int nSrc, const char * option) Line 260 C++

Following is my code to launch the kernel 

const int n = 512;Buffer<float4> frameBuff(m_d, n*n);BufferInfo bInfo[] = { BufferInfo(&frameBuff) };Launcher launcher(m_d, m_d->getKernel(SELECT_KERNELPATH1(m_d, "../test/", "GenerateColors"), "GenerateColors"));launcher.setBuffers(bInfo, sizeof(bInfo) / sizeof(BufferInfo));int4 res; res.x = n; res.y = n; res.z = meshes.size();launcher.setConst(res);launcher.launch1D(n*n);DeviceUtils::waitForCompletion(m_d);

Following is code for kernel 

__kernelvoid GenerateColors(__global float4* gDst, const int4 cRes ){    //calculate pixel position    const int gi = get_global_id(0)%cRes.x;    const int gj = get_global_id(0)/cRes.x;     float4 color = (float4)(1.0f, 0.0f, 0.0f, 1.0f);     gDst[ gj*cRes.x + gi ] = color;}

I have tried updating driver. I have also tried disabling the optimization using -O0 flag but it doesnt have any effect.

Can you guys please tell me what could be wrong? 

0 Replies