hughperkins / cltorch

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

test errors- no opengl device where it should be #52

Closed rayset closed 8 years ago

rayset commented 8 years ago

Im sorry to bother you all with this problem, but I really cant figure it out.

running the test ``luajit -l cltorch -e 'cltorch.test()'

I get this report

running tests...
aftter requiring cltorch.unit_storage
Running 2 tests
|_  ==> test_basic
*|  ==> test_get  
**  ==> Done    

Completed 0 asserts in 2 tests with 2 errors

--------------------------------------------------------------------------------
test_basic
 Function call failed 
No OpenCL-enabled devices available at /tmp/luarocks_cltorch-scm-1-3606/cltorch/cltorch/src/lib/THClGeneral.cpp:139
stack traceback:
    [C]: at 0x7ff0dd2f4650
    [C]: in function 'ClStorage'
    ...ntu/torch/install/share/lua/5.1/cltorch/unit_storage.lua:25: in function 'v'
    ...ntu/torch/install/share/lua/5.1/cltorch/unit_storage.lua:84: in function <...ntu/torch/install/share/lua/5.1/cltorch/unit_storage.lua:82>
    [C]: in function 'xpcall'
    /home/ubuntu/torch/install/share/lua/5.1/torch/Tester.lua:115: in function 'pcall'
    /home/ubuntu/torch/install/share/lua/5.1/torch/Tester.lua:186: in function '_run'
    /home/ubuntu/torch/install/share/lua/5.1/torch/Tester.lua:161: in function 'run'
    ...ntu/torch/install/share/lua/5.1/cltorch/unit_storage.lua:91: in function 'test'
    /home/ubuntu/torch/install/share/lua/5.1/cltorch/Test.lua:8: in function 'test'
    (command line):1: in main chunk
    [C]: at 0x00405d70

--------------------------------------------------------------------------------
test_get
 Function call failed 
No OpenCL-enabled devices available at /tmp/luarocks_cltorch-scm-1-3606/cltorch/cltorch/src/lib/THClGeneral.cpp:139
stack traceback:
    [C]: at 0x7ff0dd2f4650
    [C]: in function 'ClStorage'
    ...ntu/torch/install/share/lua/5.1/cltorch/unit_storage.lua:64: in function 'v'
    ...ntu/torch/install/share/lua/5.1/cltorch/unit_storage.lua:84: in function <...ntu/torch/install/share/lua/5.1/cltorch/unit_storage.lua:82>
    [C]: in function 'xpcall'
    /home/ubuntu/torch/install/share/lua/5.1/torch/Tester.lua:115: in function 'pcall'
    /home/ubuntu/torch/install/share/lua/5.1/torch/Tester.lua:186: in function '_run'
    /home/ubuntu/torch/install/share/lua/5.1/torch/Tester.lua:161: in function 'run'
    ...ntu/torch/install/share/lua/5.1/cltorch/unit_storage.lua:91: in function 'test'
    /home/ubuntu/torch/install/share/lua/5.1/cltorch/Test.lua:8: in function 'test'
    (command line):1: in main chunk
    [C]: at 0x00405d70

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

I have a readeon R9 280x

``lspci | grep VGA
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Tahiti XT [Radeon HD 7970/8970 OEM / R9 280X]

and I managed to install opengl (or at least,I hope so). this should be my version:

glxinfo|grep "OpenGL version"
OpenGL version string: 3.0 Mesa 11.0.2

I installed clinfo and it returns Number of platforms 0

I`m running ubuntu from a usb live boot (permanent enabled). Thanks in advance to anyone who can help me.

hughperkins commented 8 years ago

Basically the key result here is the clinfo result. You need to somehow install and configure drivers such that this shows at least one 'GPU' device. Otherwise, cltorch wont do very much.