AnsweredAssumed Answered

AMD APP KernelAnalyzer and cl_amd_vec3

Question asked by settle on Aug 1, 2012
Latest reply on Aug 27, 2012 by rouellet

I'm using AMD APP KernelAnalyzer 1.12.1288 with CAL 12.4 and attempting to use vec3 data types in my kernels.

 

Source Code:

#pragma OPENCL EXTENSION cl_amd_vec3 : enable

__kernel void u3d(uint3 n, uint3 pitch, float h, __global float *u)

{

    uint3 global_offset = (uint3)(get_global_offset(0), get_global_id(1), get_global_id(2));

    uint3 global_id = (uint3)(get_global_id(0), get_global_id(1), get_global_id(2));

 

    uint l = dot(convert_float3(global_id - global_offset), convert_float3(pitch));

    float3 x = -1 + convert_float3(global_id - global_offset) * h;

 

    u[l] = dot(sin(M_PI_F * x), 1);

}

 

If I include the pragma line I get:

OpenCL Compile Error: clBuildProgram failed (CL_BUILD_PROGRAM_FAILURE).

 

error: can't enable all OpenCL extensions or unrecognized OpenCL extension

  #pragma OPENCL EXTENSION cl_amd_vec3 : enable

                                                                       ^

 

1 error detected.

 

 

If I exclude the pragma line I get:

OpenCL Compile Error: clBuildProgram failed (CL_BUILD_PROGRAM_FAILURE).

 

calclCompile failedError: Creating kernel u3d failed!

 

 

Can anyone tell me what I may be doing wrong or if this is a problem with the KernelAnalyzer?  Thanks!

Outcomes