Recently bought Nexus 4 phone for the 4 cores and OpenCL support.
So wanted to do something on this phone & found Rahul Garg is doing some R&D on the Nexus devices.
So take the code from there and modified it include more information for getting extra details from Nexus phone.
Here are screen snapshots for CLInfo for Nexus 4:
Here is the extra information that I got from 'adb logcat'.
I/ActivityManager( 510): Start proc org.codedivine.testcln10 for activity org.codedivine.testcln10/.MainActivity: pid=15181 uid=10101 gids={50101, 1028}
D/dalvikvm(15181): Trying to load lib /data/app-lib/org.codedivine.testcln10-1/libhelloCL.so 0x4215d220
D/dalvikvm(15181): Added shared lib /data/app-lib/org.codedivine.testcln10-1/libhelloCL.so 0x4215d220
D/dalvikvm(15181): No JNI_OnLoad found in /data/app-lib/org.codedivine.testcln10-1/libhelloCL.so 0x4215d220, skipping init
D/overlay ( 159): Set pipe=VG1 dpy=0;
D/overlay ( 159): Unset pipe=VG0 dpy=0; Unset pipe=VG1 dpy=0; Unset pipe=RGB1 dpy=0;
D/libEGL (15181): loaded /system/lib/egl/libEGL_adreno200.so
I/CLInfo (15181): CLInfo:QUALCOMM Snapdragon(TM)
I/CLInfo (15181):
I/CLInfo (15181): 0:QUALCOMM Adreno(TM)
I/CLInfo (15181): Max Compute Units: 4
I/CLInfo (15181): Max work group size: 256
I/CLInfo (15181): Max Work Item Dimensions: 3
I/CLInfo (15181): Max work item dimensions: 3
I/CLInfo (15181): Max work items: (256,256,256)
I/CLInfo (15181): Preferred vector width char: 1
I/CLInfo (15181): Preferred vector width short: 1
I/CLInfo (15181): Preferred vector width int: 1
I/CLInfo (15181): Preferred vector width long: 1
I/CLInfo (15181): Preferred vector width float: 1
I/CLInfo (15181): Preferred vector width double: 0
I/CLInfo (15181): Max clock frequency: 325MHz
I/CLInfo (15181): Address bits: 32bits
I/CLInfo (15181): Max memory allocation: 981506048 bytes
I/CLInfo (15181): Image support: True
I/CLInfo (15181): Max size of kernel argument: 256
I/CLInfo (15181): Alignment of base addres: 512 bits
I/CLInfo (15181): Minimum alignment for any datatype: 64 bytes
I/CLInfo (15181): Denorms: False
I/CLInfo (15181): Quiet NaNs: False
I/CLInfo (15181): Round to nearest even: False
I/CLInfo (15181): Round to zero: False
I/CLInfo (15181): Round to +ve and infinity: False
I/CLInfo (15181): IEEE754-2008 fused multiply-add: False
I/CLInfo (15181): Cache type err:0
I/CLInfo (15181): Cache line size: 16 bytes
I/CLInfo (15181): Cache size: 32768 bytes
I/CLInfo (15181): Global memory size: 1963012096 bytes
I/CLInfo (15181): Constant buffer size: 4096 bytes
I/CLInfo (15181): Max number of constant args: 8
I/CLInfo (15181): Local memory type err:0
I/CLInfo (15181): Local memory size: 8192 bytes
I/CLInfo (15181): Profiling timer resolution: 1000
I/CLInfo (15181): Device endianess: True
I/CLInfo (15181): Available: True
I/CLInfo (15181): Compiler available: False
I/CLInfo (15181): Execution capabilities:
I/CLInfo (15181): Execute OpenCL kernels: True
I/CLInfo (15181): Execute native kernels: True
I/CLInfo (15181): Queue properties:
I/CLInfo (15181): Out-of-Order: False
I/CLInfo (15181): Profiling: False
I/CLInfo (15181): Name: QUALCOMM Adreno(TM)
I/CLInfo (15181): Vendor: QUALCOMM
I/CLInfo (15181): Error:CL_DRIVER_VERSION:-30
I/CLInfo (15181): Profile: EMBEDDED_PROFILE
I/CLInfo (15181): Version: OpenCL 1.1 Adreno(TM) 320
I/CLInfo (15181): Extensions: cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_gl_sharing cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_qcom_default_relaxed_math cl_qcom_perf_monitor
I/CLInfo (15181):
I/CLInfo (15181): 1:QUALCOMM Krait(TM)
I/CLInfo (15181): Max Compute Units: 4
I/CLInfo (15181): Max work group size: 1
I/CLInfo (15181): Max Work Item Dimensions: 3
I/CLInfo (15181): Max work item dimensions: 3
I/CLInfo (15181): Max work items: (1,1,1)
I/CLInfo (15181): Preferred vector width char: 16
I/CLInfo (15181): Preferred vector width short: 16
I/CLInfo (15181): Preferred vector width int: 16
I/CLInfo (15181): Preferred vector width long: 1
I/CLInfo (15181): Preferred vector width float: 16
I/CLInfo (15181): Preferred vector width double: 0
I/CLInfo (15181): Max clock frequency: 1500MHz
I/CLInfo (15181): Address bits: 32bits
I/CLInfo (15181): Max memory allocation: 981506048 bytes
I/CLInfo (15181): Image support: True
I/CLInfo (15181): Max size of kernel argument: 256
I/CLInfo (15181): Alignment of base addres: 1024 bits
I/CLInfo (15181): Minimum alignment for any datatype: 128 bytes
I/CLInfo (15181): Denorms: False
I/CLInfo (15181): Quiet NaNs: False
I/CLInfo (15181): Round to nearest even: False
I/CLInfo (15181): Round to zero: False
I/CLInfo (15181): Round to +ve and infinity: False
I/CLInfo (15181): IEEE754-2008 fused multiply-add: False
I/CLInfo (15181): Cache type err:0
I/CLInfo (15181): Cache line size: 64 bytes
I/CLInfo (15181): Cache size: 1048576 bytes
I/CLInfo (15181): Global memory size: 981506048 bytes
I/CLInfo (15181): Constant buffer size: 65536 bytes
I/CLInfo (15181): Max number of constant args: 8
I/CLInfo (15181): Local memory type err:0
I/CLInfo (15181): Local memory size: 32768 bytes
I/CLInfo (15181): Profiling timer resolution: 0
I/CLInfo (15181): Device endianess: True
I/CLInfo (15181): Available: True
I/CLInfo (15181): Compiler available: True
I/CLInfo (15181): Execution capabilities:
I/CLInfo (15181): Execute OpenCL kernels: False
I/CLInfo (15181): Execute native kernels: False
I/CLInfo (15181): Queue properties:
I/CLInfo (15181): Out-of-Order: False
I/CLInfo (15181): Profiling: False
I/CLInfo (15181): Name: QUALCOMM Krait(TM)
I/CLInfo (15181): Vendor: QUALCOMM
I/CLInfo (15181): Error:CL_DRIVER_VERSION:-30
I/CLInfo (15181): Profile: EMBEDDED_PROFILE
I/CLInfo (15181): Version: OpenCL 1.1 Krait(TM)
I/CLInfo (15181): Extensions: cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cles_khr_int64 cl_khr_fp16
I will post the code for the above shortly.
Special Thanks:
So wanted to do something on this phone & found Rahul Garg is doing some R&D on the Nexus devices.
So take the code from there and modified it include more information for getting extra details from Nexus phone.
Here are screen snapshots for CLInfo for Nexus 4:
Here is the extra information that I got from 'adb logcat'.
I/ActivityManager( 510): Start proc org.codedivine.testcln10 for activity org.codedivine.testcln10/.MainActivity: pid=15181 uid=10101 gids={50101, 1028}
D/dalvikvm(15181): Trying to load lib /data/app-lib/org.codedivine.testcln10-1/libhelloCL.so 0x4215d220
D/dalvikvm(15181): Added shared lib /data/app-lib/org.codedivine.testcln10-1/libhelloCL.so 0x4215d220
D/dalvikvm(15181): No JNI_OnLoad found in /data/app-lib/org.codedivine.testcln10-1/libhelloCL.so 0x4215d220, skipping init
D/overlay ( 159): Set pipe=VG1 dpy=0;
D/overlay ( 159): Unset pipe=VG0 dpy=0; Unset pipe=VG1 dpy=0; Unset pipe=RGB1 dpy=0;
D/libEGL (15181): loaded /system/lib/egl/libEGL_adreno200.so
I/CLInfo (15181): CLInfo:QUALCOMM Snapdragon(TM)
I/CLInfo (15181):
I/CLInfo (15181): 0:QUALCOMM Adreno(TM)
I/CLInfo (15181): Max Compute Units: 4
I/CLInfo (15181): Max work group size: 256
I/CLInfo (15181): Max Work Item Dimensions: 3
I/CLInfo (15181): Max work item dimensions: 3
I/CLInfo (15181): Max work items: (256,256,256)
I/CLInfo (15181): Preferred vector width char: 1
I/CLInfo (15181): Preferred vector width short: 1
I/CLInfo (15181): Preferred vector width int: 1
I/CLInfo (15181): Preferred vector width long: 1
I/CLInfo (15181): Preferred vector width float: 1
I/CLInfo (15181): Preferred vector width double: 0
I/CLInfo (15181): Max clock frequency: 325MHz
I/CLInfo (15181): Address bits: 32bits
I/CLInfo (15181): Max memory allocation: 981506048 bytes
I/CLInfo (15181): Image support: True
I/CLInfo (15181): Max size of kernel argument: 256
I/CLInfo (15181): Alignment of base addres: 512 bits
I/CLInfo (15181): Minimum alignment for any datatype: 64 bytes
I/CLInfo (15181): Denorms: False
I/CLInfo (15181): Quiet NaNs: False
I/CLInfo (15181): Round to nearest even: False
I/CLInfo (15181): Round to zero: False
I/CLInfo (15181): Round to +ve and infinity: False
I/CLInfo (15181): IEEE754-2008 fused multiply-add: False
I/CLInfo (15181): Cache type err:0
I/CLInfo (15181): Cache line size: 16 bytes
I/CLInfo (15181): Cache size: 32768 bytes
I/CLInfo (15181): Global memory size: 1963012096 bytes
I/CLInfo (15181): Constant buffer size: 4096 bytes
I/CLInfo (15181): Max number of constant args: 8
I/CLInfo (15181): Local memory type err:0
I/CLInfo (15181): Local memory size: 8192 bytes
I/CLInfo (15181): Profiling timer resolution: 1000
I/CLInfo (15181): Device endianess: True
I/CLInfo (15181): Available: True
I/CLInfo (15181): Compiler available: False
I/CLInfo (15181): Execution capabilities:
I/CLInfo (15181): Execute OpenCL kernels: True
I/CLInfo (15181): Execute native kernels: True
I/CLInfo (15181): Queue properties:
I/CLInfo (15181): Out-of-Order: False
I/CLInfo (15181): Profiling: False
I/CLInfo (15181): Name: QUALCOMM Adreno(TM)
I/CLInfo (15181): Vendor: QUALCOMM
I/CLInfo (15181): Error:CL_DRIVER_VERSION:-30
I/CLInfo (15181): Profile: EMBEDDED_PROFILE
I/CLInfo (15181): Version: OpenCL 1.1 Adreno(TM) 320
I/CLInfo (15181): Extensions: cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_gl_sharing cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_qcom_default_relaxed_math cl_qcom_perf_monitor
I/CLInfo (15181):
I/CLInfo (15181): 1:QUALCOMM Krait(TM)
I/CLInfo (15181): Max Compute Units: 4
I/CLInfo (15181): Max work group size: 1
I/CLInfo (15181): Max Work Item Dimensions: 3
I/CLInfo (15181): Max work item dimensions: 3
I/CLInfo (15181): Max work items: (1,1,1)
I/CLInfo (15181): Preferred vector width char: 16
I/CLInfo (15181): Preferred vector width short: 16
I/CLInfo (15181): Preferred vector width int: 16
I/CLInfo (15181): Preferred vector width long: 1
I/CLInfo (15181): Preferred vector width float: 16
I/CLInfo (15181): Preferred vector width double: 0
I/CLInfo (15181): Max clock frequency: 1500MHz
I/CLInfo (15181): Address bits: 32bits
I/CLInfo (15181): Max memory allocation: 981506048 bytes
I/CLInfo (15181): Image support: True
I/CLInfo (15181): Max size of kernel argument: 256
I/CLInfo (15181): Alignment of base addres: 1024 bits
I/CLInfo (15181): Minimum alignment for any datatype: 128 bytes
I/CLInfo (15181): Denorms: False
I/CLInfo (15181): Quiet NaNs: False
I/CLInfo (15181): Round to nearest even: False
I/CLInfo (15181): Round to zero: False
I/CLInfo (15181): Round to +ve and infinity: False
I/CLInfo (15181): IEEE754-2008 fused multiply-add: False
I/CLInfo (15181): Cache type err:0
I/CLInfo (15181): Cache line size: 64 bytes
I/CLInfo (15181): Cache size: 1048576 bytes
I/CLInfo (15181): Global memory size: 981506048 bytes
I/CLInfo (15181): Constant buffer size: 65536 bytes
I/CLInfo (15181): Max number of constant args: 8
I/CLInfo (15181): Local memory type err:0
I/CLInfo (15181): Local memory size: 32768 bytes
I/CLInfo (15181): Profiling timer resolution: 0
I/CLInfo (15181): Device endianess: True
I/CLInfo (15181): Available: True
I/CLInfo (15181): Compiler available: True
I/CLInfo (15181): Execution capabilities:
I/CLInfo (15181): Execute OpenCL kernels: False
I/CLInfo (15181): Execute native kernels: False
I/CLInfo (15181): Queue properties:
I/CLInfo (15181): Out-of-Order: False
I/CLInfo (15181): Profiling: False
I/CLInfo (15181): Name: QUALCOMM Krait(TM)
I/CLInfo (15181): Vendor: QUALCOMM
I/CLInfo (15181): Error:CL_DRIVER_VERSION:-30
I/CLInfo (15181): Profile: EMBEDDED_PROFILE
I/CLInfo (15181): Version: OpenCL 1.1 Krait(TM)
I/CLInfo (15181): Extensions: cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cles_khr_int64 cl_khr_fp16
I will post the code for the above shortly.
Special Thanks:
- Rahul Garg for the base code for generic way of getting data from .so files using dlsym approach
- University of Bordeaux for getting extra CLInfo details
Just wondering if online compiler is available?
ReplyDeleteI/CLInfo (15181): Compiler available: False
Have you tried with any opencl kernels? (not using SDK)
I have written native exe for helloworld(c based)/helloworld2 (c++ based). OpenCL kernel content is taken directly from c/c++ code. In future it will take from Android-Assets.
ReplyDeleteWill shortly write corresponding JNI based versions.