I want to ### use opencl backend for running the script but I am facing problem while testing cltorch
When I test cltorch with this command
" luajit -l cltorch -e 'cltorch.test()'"
I am getting this==>
running tests...
aftter requiring cltorch.unit_storage
Running 2 tests
1/2 test_get ............................................................ [WAIT]
1/2 test_get ............................................................ [ERROR]
2/2 test_basic .......................................................... [WAIT]
2/2 test_basic .......................................................... [ERROR]
Completed 0 asserts in 2 tests with 0 failures and 2 errors
test_get
Function call failed
No OpenCL-enabled devices available at /tmp/luarocks_cltorch-scm-1-407/cltorch/cltorch/src/lib/THClGeneral.cpp:139
stack traceback:
[C]: at 0x7f8b6f6e4600
[C]: in function 'ClStorage'
.../torch-cl/install/share/lua/5.1/cltorch/unit_storage.lua:64: in function 'v'
.../torch-cl/install/share/lua/5.1/cltorch/unit_storage.lua:84: in function <.../torch-cl/install/share/lua/5.1/cltorch/unit_storage.lua:82>
[C]: in function 'xpcall'
/home/ahmed/torch-cl/install/share/lua/5.1/torch/Tester.lua:477: in function '_pcall'
/home/ahmed/torch-cl/install/share/lua/5.1/torch/Tester.lua:437: in function '_run'
/home/ahmed/torch-cl/install/share/lua/5.1/torch/Tester.lua:356: in function 'run'
.../torch-cl/install/share/lua/5.1/cltorch/unit_storage.lua:91: in function 'test'
/home/ahmed/torch-cl/install/share/lua/5.1/cltorch/Test.lua:8: in function 'test'
(command line):1: in main chunk
[C]: at 0x00405e90
test_basic
Function call failed
No OpenCL-enabled devices available at /tmp/luarocks_cltorch-scm-1-407/cltorch/cltorch/src/lib/THClGeneral.cpp:139
stack traceback:
[C]: at 0x7f8b6f6e4600
[C]: in function 'ClStorage'
.../torch-cl/install/share/lua/5.1/cltorch/unit_storage.lua:25: in function 'v'
.../torch-cl/install/share/lua/5.1/cltorch/unit_storage.lua:84: in function <.../torch-cl/install/share/lua/5.1/cltorch/unit_storage.lua:82>
[C]: in function 'xpcall'
/home/ahmed/torch-cl/install/share/lua/5.1/torch/Tester.lua:477: in function '_pcall'
/home/ahmed/torch-cl/install/share/lua/5.1/torch/Tester.lua:437: in function '_run'
/home/ahmed/torch-cl/install/share/lua/5.1/torch/Tester.lua:356: in function 'run'
.../torch-cl/install/share/lua/5.1/cltorch/unit_storage.lua:91: in function 'test'
/home/ahmed/torch-cl/install/share/lua/5.1/cltorch/Test.lua:8: in function 'test'
(command line):1: in main chunk
[C]: at 0x00405e90
luajit: /home/ahmed/torch-cl/install/share/lua/5.1/torch/Tester.lua:364: An error was found while running tests!
stack traceback:
[C]: in function 'assert'
/home/ahmed/torch-cl/install/share/lua/5.1/torch/Tester.lua:364: in function 'run'
.../torch-cl/install/share/lua/5.1/cltorch/unit_storage.lua:91: in function 'test'
/home/ahmed/torch-cl/install/share/lua/5.1/cltorch/Test.lua:8: in function 'test'
(command line):1: in main chunk
[C]: at 0x00405e90
Also my clinfo output is
Number of platforms 1
Platform Name Intel(R) OpenCL
Platform Vendor Intel(R) Corporation
Platform Version OpenCL 1.2
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd 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 cl_khr_depth_images cl_khr_3d_image_writes cl_intel_exec_by_local_thread cl_khr_spir cl_khr_fp64
Platform Extensions function suffix INTEL
Platform Name Intel(R) OpenCL
Number of devices 1
Device Name Intel(R) Core(TM) i3 CPU 540 @ 3.07GHz
Device Vendor Intel(R) Corporation
Device Vendor ID 0x8086
Device Version OpenCL 1.2 (Build 475)
Driver Version 1.2.0.475
Device OpenCL C Version OpenCL C 1.2
Device Type CPU
Device Profile FULL_PROFILE
Max compute units 4
Max clock frequency 3070MHz
Device Partition (core)
Max number of sub-devices 4
Supported partition types by counts, equally, by names (Intel)
Max work item dimensions 3
Max work item sizes 8192x8192x8192
Max work group size 8192
Preferred work group size multiple 128
Preferred / native vector sizes
char 1 / 16
short 1 / 8
int 1 / 4
long 1 / 2
half 0 / 0 (n/a)
float 1 / 4
double 1 / 2 (cl_khr_fp64)
Half-precision Floating-point support (n/a)
Single-precision Floating-point support (core)
Denormals Yes
Infinity and NANs Yes
Round to nearest Yes
Round to zero No
Round to infinity No
IEEE754-2008 fused multiply-add No
Support is emulated in software No
Correctly-rounded divide and sqrt operations No
Double-precision Floating-point support (cl_khr_fp64)
Denormals Yes
Infinity and NANs Yes
Round to nearest Yes
Round to zero Yes
Round to infinity Yes
IEEE754-2008 fused multiply-add Yes
Support is emulated in software No
Correctly-rounded divide and sqrt operations No
Address bits 64, Little-Endian
Global memory size 3868246016 (3.603GiB)
Error Correction support No
Max memory allocation 967061504 (922.3MiB)
Unified memory for Host and Device Yes
Minimum alignment for any data type 128 bytes
Alignment of base address 1024 bits (128 bytes)
Global Memory cache type Read/Write
Global Memory cache size 262144
Global Memory cache line 64 bytes
Image support Yes
Max number of samplers per kernel 480
Max size for 1D images from buffer 60441344 pixels
Max 1D or 2D image array size 2048 images
Max 2D image size 16384x16384 pixels
Max 3D image size 2048x2048x2048 pixels
Max number of read image args 480
Max number of write image args 480
Local memory type Global
Local memory size 32768 (32KiB)
Max constant buffer size 131072 (128KiB)
Max number of constant args 480
Max size of kernel argument 3840 (3.75KiB)
Queue properties
Out-of-order execution Yes
Profiling Yes
Local thread execution (Intel) Yes
Prefer user sync for interop No
Profiling timer resolution 1ns
Execution capabilities
Run OpenCL kernels Yes
Run native kernels Yes
SPIR versions 1.2
printf() buffer size 1048576 (1024KiB)
Built-in kernels
Device Available Yes
Compiler Available Yes
Linker Available Yes
Device Extensions cl_khr_icd 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 cl_khr_depth_images cl_khr_3d_image_writes cl_intel_exec_by_local_thread cl_khr_spir cl_khr_fp64
NULL platform behavior
clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) No platform
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) No platform
clCreateContext(NULL, ...) [default] No platform
clCreateContext(NULL, ...) [other] Success [INTEL]
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) No platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) No platform
I want to ### use opencl backend for running the script but I am facing problem while testing cltorch When I test cltorch with this command " luajit -l cltorch -e 'cltorch.test()'" I am getting this==> running tests... aftter requiring cltorch.unit_storage Running 2 tests 1/2 test_get ............................................................ [WAIT] 1/2 test_get ............................................................ [ERROR] 2/2 test_basic .......................................................... [WAIT] 2/2 test_basic .......................................................... [ERROR] Completed 0 asserts in 2 tests with 0 failures and 2 errors
test_get Function call failed No OpenCL-enabled devices available at /tmp/luarocks_cltorch-scm-1-407/cltorch/cltorch/src/lib/THClGeneral.cpp:139 stack traceback: [C]: at 0x7f8b6f6e4600 [C]: in function 'ClStorage' .../torch-cl/install/share/lua/5.1/cltorch/unit_storage.lua:64: in function 'v' .../torch-cl/install/share/lua/5.1/cltorch/unit_storage.lua:84: in function <.../torch-cl/install/share/lua/5.1/cltorch/unit_storage.lua:82> [C]: in function 'xpcall' /home/ahmed/torch-cl/install/share/lua/5.1/torch/Tester.lua:477: in function '_pcall' /home/ahmed/torch-cl/install/share/lua/5.1/torch/Tester.lua:437: in function '_run' /home/ahmed/torch-cl/install/share/lua/5.1/torch/Tester.lua:356: in function 'run' .../torch-cl/install/share/lua/5.1/cltorch/unit_storage.lua:91: in function 'test' /home/ahmed/torch-cl/install/share/lua/5.1/cltorch/Test.lua:8: in function 'test' (command line):1: in main chunk [C]: at 0x00405e90
test_basic Function call failed No OpenCL-enabled devices available at /tmp/luarocks_cltorch-scm-1-407/cltorch/cltorch/src/lib/THClGeneral.cpp:139 stack traceback: [C]: at 0x7f8b6f6e4600 [C]: in function 'ClStorage' .../torch-cl/install/share/lua/5.1/cltorch/unit_storage.lua:25: in function 'v' .../torch-cl/install/share/lua/5.1/cltorch/unit_storage.lua:84: in function <.../torch-cl/install/share/lua/5.1/cltorch/unit_storage.lua:82> [C]: in function 'xpcall' /home/ahmed/torch-cl/install/share/lua/5.1/torch/Tester.lua:477: in function '_pcall' /home/ahmed/torch-cl/install/share/lua/5.1/torch/Tester.lua:437: in function '_run' /home/ahmed/torch-cl/install/share/lua/5.1/torch/Tester.lua:356: in function 'run' .../torch-cl/install/share/lua/5.1/cltorch/unit_storage.lua:91: in function 'test' /home/ahmed/torch-cl/install/share/lua/5.1/cltorch/Test.lua:8: in function 'test' (command line):1: in main chunk [C]: at 0x00405e90
luajit: /home/ahmed/torch-cl/install/share/lua/5.1/torch/Tester.lua:364: An error was found while running tests! stack traceback: [C]: in function 'assert' /home/ahmed/torch-cl/install/share/lua/5.1/torch/Tester.lua:364: in function 'run' .../torch-cl/install/share/lua/5.1/cltorch/unit_storage.lua:91: in function 'test' /home/ahmed/torch-cl/install/share/lua/5.1/cltorch/Test.lua:8: in function 'test' (command line):1: in main chunk [C]: at 0x00405e90
Also my clinfo output is
Number of platforms 1 Platform Name Intel(R) OpenCL Platform Vendor Intel(R) Corporation Platform Version OpenCL 1.2 Platform Profile FULL_PROFILE Platform Extensions cl_khr_icd 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 cl_khr_depth_images cl_khr_3d_image_writes cl_intel_exec_by_local_thread cl_khr_spir cl_khr_fp64 Platform Extensions function suffix INTEL Platform Name Intel(R) OpenCL Number of devices 1 Device Name Intel(R) Core(TM) i3 CPU 540 @ 3.07GHz Device Vendor Intel(R) Corporation Device Vendor ID 0x8086 Device Version OpenCL 1.2 (Build 475) Driver Version 1.2.0.475 Device OpenCL C Version OpenCL C 1.2 Device Type CPU Device Profile FULL_PROFILE Max compute units 4 Max clock frequency 3070MHz Device Partition (core) Max number of sub-devices 4 Supported partition types by counts, equally, by names (Intel) Max work item dimensions 3 Max work item sizes 8192x8192x8192 Max work group size 8192 Preferred work group size multiple 128 Preferred / native vector sizes
char 1 / 16
short 1 / 8
int 1 / 4
long 1 / 2
half 0 / 0 (n/a) float 1 / 4
double 1 / 2 (cl_khr_fp64) Half-precision Floating-point support (n/a) Single-precision Floating-point support (core) Denormals Yes Infinity and NANs Yes Round to nearest Yes Round to zero No Round to infinity No IEEE754-2008 fused multiply-add No Support is emulated in software No Correctly-rounded divide and sqrt operations No Double-precision Floating-point support (cl_khr_fp64) Denormals Yes Infinity and NANs Yes Round to nearest Yes Round to zero Yes Round to infinity Yes IEEE754-2008 fused multiply-add Yes Support is emulated in software No Correctly-rounded divide and sqrt operations No Address bits 64, Little-Endian Global memory size 3868246016 (3.603GiB) Error Correction support No Max memory allocation 967061504 (922.3MiB) Unified memory for Host and Device Yes Minimum alignment for any data type 128 bytes Alignment of base address 1024 bits (128 bytes) Global Memory cache type Read/Write Global Memory cache size 262144 Global Memory cache line 64 bytes Image support Yes Max number of samplers per kernel 480 Max size for 1D images from buffer 60441344 pixels Max 1D or 2D image array size 2048 images Max 2D image size 16384x16384 pixels Max 3D image size 2048x2048x2048 pixels Max number of read image args 480 Max number of write image args 480 Local memory type Global Local memory size 32768 (32KiB) Max constant buffer size 131072 (128KiB) Max number of constant args 480 Max size of kernel argument 3840 (3.75KiB) Queue properties
Out-of-order execution Yes Profiling Yes Local thread execution (Intel) Yes Prefer user sync for interop No Profiling timer resolution 1ns Execution capabilities
Run OpenCL kernels Yes Run native kernels Yes SPIR versions 1.2 printf() buffer size 1048576 (1024KiB) Built-in kernels
Device Available Yes Compiler Available Yes Linker Available Yes Device Extensions cl_khr_icd 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 cl_khr_depth_images cl_khr_3d_image_writes cl_intel_exec_by_local_thread cl_khr_spir cl_khr_fp64 NULL platform behavior clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) No platform clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) No platform clCreateContext(NULL, ...) [default] No platform clCreateContext(NULL, ...) [other] Success [INTEL] clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No platform clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) No platform clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No platform clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No platform clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) No platform