AnsweredAssumed Answered

printf does not work properly

Question asked by cavit.vural on Mar 22, 2019
Latest reply on Mar 22, 2019 by elstaci

Here is the minimum kernel :

 

__kernel void PRINT_SIZEOFs  (void)
{
        printf("size_of_short                      : %u\n", sizeof(short));
        printf("size_of_int                        : %u\n", sizeof(int));
        printf("size_of_long                       : %u\n", sizeof(long));
        printf("size_of_float                      : %u\n", sizeof(float));
}

 

And the output :

 

Selected Device for OpenCL
==========================

Platform Profile : FULL_PROFILE
Platform Version : OpenCL 2.1 AMD-APP (2766.4)
Platform Name : AMD Accelerated Parallel Processing
Platform Vendor : Advanced Micro Devices, Inc.
Platform Extensions : cl_khr_icd cl_amd_event_callback cl_amd_offline_devices
Device Name : Ellesmere
Device Type : GPU - Graphical Process Unit
Device Profile : FULL_PROFILE
Device Vendor : Advanced Micro Devices, Inc.
Device Version : OpenCL 1.2 AMD-APP (2766.4)
Driver Version : 2766.4
Global Memory : 8186 MB
Speed : 1366 Mhz
Num of Cores : 36 core(s)
Max Parallel : 256 jobs

 

 

size_of_short : 2
size_of_short : 4
size_of_int : %u
size_of_short : 8
size_of_int : %u
size_of_long : %u
size_of_short : 4
size_of_int : %u
size_of_long : %u
size_of_float : %u

 

 

OS : Centos 7.6

GPU : Radeon RX 580

Driver : 18.50

Outcomes