hughperkins / cltorch

An OpenCL backend for torch.
Other
291 stars 26 forks source link

cltorch.test failure ... Intel Xeon Phi (MIC) #27

Closed codeaudit closed 9 years ago

codeaudit commented 9 years ago

luajit -l cltorch -e 'cltorch.test()' running tests... aftter requiring cltorch.unitstorage Running 2 tests | ==> test_basic Using Intel(R) Corporation , OpenCL platform: Intel(R) OpenCL Using OpenCL device: Intel(R) Many Integrated Core Acceleration Card | ==> test_get
/tmp/luarocks_cltorch-scm-1-5694/cltorch/cltorch/src/lib/THClStorage.cpp build log: Compilation started Compilation done Linking started Linking done Device build started Device build done Build started Kernel was successfully vectorized (16) Done. /tmp/luarocks_cltorch-scm-1-5694/cltorch/cltorch/src/lib/THClStorage.cpp build log: Compilation started Compilation done Linking started Linking done Device build started Device build done Build started Kernel was successfully vectorized (16) Done.
_ ==> Done

Completed 15 asserts in 2 tests with 8 errors


test_basic 1 EQ(==) violation val= [torch.ClStorage of size 0] , condition=[torch.ClStorage of size 0]

/home/ceperez/torch/install/share/lua/5.1/torch/Tester.lua:42: in function 'asserteq'
...rez/torch/install/share/lua/5.1/cltorch/unit_storage.lua:25: in function 'v'

test_basic

EQ(==) violation val= 4 9 2 [torch.ClStorage of size 3] , condition= 4 9 2 [torch.ClStorage of size 3]

/home/ceperez/torch/install/share/lua/5.1/torch/Tester.lua:42: in function 'asserteq'
...rez/torch/install/share/lua/5.1/cltorch/unit_storage.lua:27: in function 'v'

test_basic

EQ(==) violation val= 1.5000 2.4000 5.3000 [torch.ClStorage of size 3] , condition= 1.5000 2.4000 5.3000 [torch.ClStorage of size 3]

/home/ceperez/torch/install/share/lua/5.1/torch/Tester.lua:42: in function 'asserteq'
...rez/torch/install/share/lua/5.1/cltorch/unit_storage.lua:28: in function 'v'

test_basic

EQ(==) violation val= 7 7 7 [torch.ClStorage of size 3] , condition= 7 7 7 [torch.ClStorage of size 3]

/home/ceperez/torch/install/share/lua/5.1/torch/Tester.lua:42: in function 'asserteq'
...rez/torch/install/share/lua/5.1/cltorch/unit_storage.lua:32: in function 'v'

test_basic

EQ(==) violation val= 1.5000 2.4000 5.3000 [torch.ClStorage of size 3] , condition= 1.5000 2.4000 5.3000 [torch.ClStorage of size 3]

/home/ceperez/torch/install/share/lua/5.1/torch/Tester.lua:42: in function 'asserteq'
...rez/torch/install/share/lua/5.1/cltorch/unit_storage.lua:36: in function 'v'

test_basic

EQ(==) violation val= 4 9 2 [torch.DoubleStorage of size 3] , condition= 4 9 2 [torch.DoubleStorage of size 3]

/home/ceperez/torch/install/share/lua/5.1/torch/Tester.lua:42: in function 'asserteq'
...rez/torch/install/share/lua/5.1/cltorch/unit_storage.lua:41: in function 'v'

test_basic

EQ(==) violation val= 4 9 2 [torch.ClStorage of size 3] , condition= 4 9 2 [torch.ClStorage of size 3]

/home/ceperez/torch/install/share/lua/5.1/torch/Tester.lua:42: in function 'asserteq'
...rez/torch/install/share/lua/5.1/cltorch/unit_storage.lua:51: in function 'v'

test_basic

EQ(==) violation val= 1 1 1 1 1 [torch.ClStorage of size 5] , condition= 1 1 1 1 1 [torch.ClStorage of size 5]

/home/ceperez/torch/install/share/lua/5.1/torch/Tester.lua:42: in function 'asserteq'
...rez/torch/install/share/lua/5.1/cltorch/unit_storage.lua:58: in function 'v'

tester.errors 8

res false luajit: /home/ceperez/torch/install/share/lua/5.1/cltorch/Test.lua:10: assertion failed! stack traceback: [C]: in function 'assert' /home/ceperez/torch/install/share/lua/5.1/cltorch/Test.lua:10: in function 'test' (command line):1: in main chunk [C]: at 0x004064d0

codeaudit commented 9 years ago

System is CentOS 7 with Xeon Phi. Here is clinfo:

Device Name Intel(R) Many Integrated Core Acceleration Card Device Vendor Intel(R) Corporation Device Vendor ID 0x8086 Device Version OpenCL 1.2 (Build 8) Driver Version 1.2 Device OpenCL C Version OpenCL C 1.2 Device Type Accelerator Device Profile FULL_PROFILE Max compute units 224 Max clock frequency 1100MHz Device Partition (core) Max number of sub-devices 0 Supported partition types None 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 / 16
int 1 / 16
long 1 / 8
half 1 / 0 (n/a) float 1 / 16
double 1 / 8 (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 Yes Round to infinity Yes IEEE754-2008 fused multiply-add Yes 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 6054604800 (5.639GiB) Error Correction support Yes Max memory allocation 2018201600 (1.88GiB) Unified memory for Host and Device No 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 No Local memory type Global Local memory size 32768 (32KiB) Max constant buffer size 131072 (128KiB) Max number of constant args 128 Max size of kernel argument 1024 Queue properties
Out-of-order execution Yes Profiling Yes Prefer user sync for interop No Profiling timer resolution 1100ns Execution capabilities
Run OpenCL kernels Yes Run native kernels No 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_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

codeaudit commented 9 years ago

./gpuinfo num platforms: 1

platform index: 0: platform id: 0x15e6460 platform vendor: Intel(R) Corporation platform name: Intel(R) OpenCL platform num devices: 2

device index: 0 device id: 0x15e73d8 device type: 2 global memory size: 31961MB local memory size: 32KB global cache size: 256KB global cacheline size: 64 max memory alloc size: 7990MB max compute units: 16 max workgroup size: 8192 max workitem dimensions: 3 max workitem sizes: 8192 8192 8192 device name: Intel(R) Xeon(R) CPU E5-2628L v2 @ 1.90GHz opencl c version: OpenCL C 1.2 opencl device version: OpenCL 1.2 (Build 8) frequency MHz: 1900

device index: 1 device id: 0x15eb678 device type: 8 global memory size: 5774MB local memory size: 32KB global cache size: 256KB global cacheline size: 64 max memory alloc size: 1924MB max compute units: 224 max workgroup size: 8192 max workitem dimensions: 3 max workitem sizes: 8192 8192 8192 device name: Intel(R) Many Integrated Core Acceleration Card opencl c version: OpenCL C 1.2 opencl device version: OpenCL 1.2 (Build 8) frequency MHz: 1100

hughperkins commented 9 years ago

Hmmm, yes, I suddenly get the same error too... odd... will check. (Edit: at least, on a brand new installation. I reckon maybe something changed in maybe the base torch7 package somehow)

Edit2: hmmm, yes, on torch7 commit 23c34e1a289 of torch7, it works for me. If I git pull on torch7, to get to commit fa6070ce33 , then I get this error. Checking...

Edit3: ah, I reckon it's commit a224e7f8a , which removes the leading newline from __tostring__

hughperkins commented 9 years ago

Addressed in commit fa9ba1c . Please reinstall cltorch, and try again.

hughperkins commented 9 years ago

Closing this. If still an issue, please go ahead and reopen.