0 Replies Latest reply on Mar 15, 2012 6:59 AM by aokomoriuta

    printf with vector3 returns CL_BUILD_PROGRAM_FAILURE

    aokomoriuta
      #pragma OPENCL EXTENSION cl_amd_printf: enable
      
      __kernel void MoveParticles()
      {
          float3 a = 2;
      
          printf("%v3f\n", a);
      }
      

      This OpenCL C code returns CL_BUILD_PROGRAM_FAILURE when I build this in both VS2010EE and KernelAnalyzer.

      Is there something wrong?

      • Windows7 x64 pro SP1
      • Radeon HD 6950 (8.930.0.0)
      • KennelAnalyzer ver 1.11.1172

       

      %v4f works well as following;

      #pragma OPENCL EXTENSION cl_amd_printf: enable
      
      __kernel void MoveParticles()
      {
          float4 a = 2;
      
          printf("%v4f\n", a);
      }
      

      or

      #pragma OPENCL EXTENSION cl_amd_printf: enable
      
      __kernel void MoveParticles()
      {
          float3 a = 2;
      
          printf("%v4f\n", a.xyzx);
      }