jcjohnson / neural-style

Torch implementation of neural style algorithm
MIT License
18.31k stars 2.7k forks source link

Getting OpenCl to run with new distrocl #246

Closed slessie closed 8 years ago

slessie commented 8 years ago

I can run neural-style fine with cpu but trying to run opencl fails. Using a 8gb amd card. I'm fairly new to Ubuntu, but my best guess is that the new way of installing cltorch and clnn through distro-cl is not getting picked up correctly. I passed all the tests without errors running install tests for cltorch source ~/torch-cl/install/bin/torch-activate luajit -l torch -e 'torch.test()' luajit -l nn -e 'nn.test()' luajit -l cltorch -e 'cltorch.test()' luajit -l clnn -e 'clnn.test()

Here is what i get when I run the neural-style opencl example

zed@zed-desktop:~/neural-style$ th neural_style.lua -style_image examples/inputs/picasso_selfport1907.jpg -content_image examples/inputs/brad_pitt.jpg -output_image profile.png -model_file models/nin_imagenet_conv.caffemodel -proto_file models/train_val.prototxt -gpu 0 -backend clnn -num_iterations 1000 -seed 123 -content_layers relu0,relu3,relu7,relu12 -style_layers relu0,relu3,relu7,relu12 -content_weight 10 -style_weight 1000 -image_size 512 -optimizer adam libthclnn_searchpath /home/zed/torch-cl/install/lib/lua/5.1/libTHCLNN.so Successfully loaded models/nin_imagenet_conv.caffemodel MODULE data UNDEFINED warning: module 'data [type 5]' not found conv1: 96 3 11 11 cccp1: 96 96 1 1 cccp2: 96 96 1 1 conv2: 256 96 5 5 cccp3: 256 256 1 1 cccp4: 256 256 1 1 conv3: 384 256 3 3 cccp5: 384 384 1 1 cccp6: 384 384 1 1 conv4-1024: 1024 384 3 3 cccp7-1024: 1024 1024 1 1 cccp8-1024: 1000 1024 1 1 Using Advanced Micro Devices, Inc. , OpenCL platform: AMD Accelerated Parallel Processing Using OpenCL device: Hawaii Setting up content layer 2 : relu0
Setting up style layer 2 : relu0
WARNING: Skipping content loss
Setting up content layer 9 : relu3
THClReduceAll.cl build log: "/tmp/OCL24627T10.cl", line 51: warning: function "IndexToOffset_999_get" was declared but never referenced static inline unsigned int IndexToOffset_999_get(unsigned int linearId, global const TensorInfoCl *info) { ^

"/tmp/OCL24627T10.cl", line 66: warning: function "getLinearBlockId" was declared but never referenced static inline unsigned int getLinearBlockId() { ^

THClReduceAll.cl build log: "/tmp/OCL24627T11.cl", line 9: warning: variable "in1" was declared but never referenced float *in1 = &_in1; ^

"/tmp/OCL24627T11.cl", line 10: warning: variable "out" was declared but never referenced float *out = &_out; ^

"/tmp/OCL24627T11.cl", line 51: warning: function "IndexToOffset_999_get" was declared but never referenced static inline unsigned int IndexToOffset_999_get(unsigned int linearId, global const TensorInfoCl *info) { ^

"/tmp/OCL24627T11.cl", line 66: warning: function "getLinearBlockId" was declared but never referenced static inline unsigned int getLinearBlockId() { ^

Setting up style layer 9 : relu3
WARNING: Skipping content loss
Setting up content layer 16 : relu7
Setting up style layer 16 : relu7
WARNING: Skipping content loss
Setting up content layer 28 : relu12
Setting up style layer 28 : relu12
WARNING: Skipping content loss
Running optimization with ADAM
/home/zed/torch/install/bin/luajit: /home/zed/torch/install/share/lua/5.1/nn/Container.lua:67: In 34 module of nn.Sequential: /home/zed/torch/install/share/lua/5.1/nn/THNN.lua:109: bad argument #8 to 'v' (cannot convert 'number' to 'struct THClTensor *') stack traceback: [C]: in function 'v' /home/zed/torch/install/share/lua/5.1/nn/THNN.lua:109: in function 'SpatialConvolutionMM_updateGradInput' ...ed/torch/install/share/lua/5.1/nn/SpatialConvolution.lua:133: in function <...ed/torch/install/share/lua/5.1/nn/SpatialConvolution.lua:127> [C]: in function 'xpcall' /home/zed/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors' /home/zed/torch/install/share/lua/5.1/nn/Sequential.lua:55: in function 'updateGradInput' neural_style.lua:320: in function 'opfunc' /home/zed/torch/install/share/lua/5.1/optim/adam.lua:33: in function 'adam' neural_style.lua:343: in function 'main' neural_style.lua:500: in main chunk [C]: in function 'dofile' .../zed/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk [C]: at 0x00406670

WARNING: If you see a stack trace below, it doesn't point to the place where this error occured. Please use only the one above. stack traceback: [C]: in function 'error' /home/zed/torch/install/share/lua/5.1/nn/Container.lua:67: in function 'rethrowErrors' /home/zed/torch/install/share/lua/5.1/nn/Sequential.lua:55: in function 'updateGradInput' neural_style.lua:320: in function 'opfunc' /home/zed/torch/install/share/lua/5.1/optim/adam.lua:33: in function 'adam' neural_style.lua:343: in function 'main' neural_style.lua:500: in main chunk [C]: in function 'dofile' .../zed/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk [C]: at 0x00406670

Since the new cltorch install uses its own distribution of torch there might be an issue there but might just be my install. Any help would be appreciated.

jcjohnson commented 8 years ago

You don't need to use distro-cl; if you already have torch installed and working on CPU then you should be able to install cltorch and clnn with luarocks:

luarocks install cltorch
luarocks install clnn
slessie commented 8 years ago
luarocks install cltorch
luarocks install clnn 

From what I can tell these seem to be disabled they failed when I tried them on a different ubuntu install.

jcjohnson commented 8 years ago

What is the error message?

slessie commented 8 years ago

zed@zed-desktop:~/neural-style$ luarocks install cltorch Installing https://raw.githubusercontent.com/torch/rocks/master/cltorch-scm-1.rockspec... Using https://raw.githubusercontent.com/torch/rocks/master/cltorch-scm-1.rockspec... switching to 'build' mode Cloning into 'cltorch'... remote: Counting objects: 123, done. remote: Compressing objects: 100% (118/118), done. remote: Total 123 (delta 10), reused 32 (delta 2), pack-reused 0 Receiving objects: 100% (123/123), 213.23 KiB | 0 bytes/s, done. Resolving deltas: 100% (10/10), done. Checking connectivity... done. git clone --recursive git://github.com/hughperkins/cltorch.git && cd cltorch && cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH="/home/zed/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/zed/torch/install/lib/luarocks/rocks/cltorch/scm-1" && make -j$(getconf _NPROCESSORS_ONLN) install

Cloning into 'cltorch'... remote: Counting objects: 4827, done. remote: Compressing objects: 100% (17/17), done. remote: Total 4827 (delta 5), reused 0 (delta 0), pack-reused 4810 Receiving objects: 100% (4827/4827), 1.01 MiB | 1.74 MiB/s, done. Resolving deltas: 100% (3327/3327), done. Checking connectivity... done. Submodule 'src/EasyCL' (https://github.com/hughperkins/EasyCL.git) registered for path 'src/EasyCL' Submodule 'src/clMathLibraries/clBLAS' (https://github.com/hughperkins/clBLAS) registered for path 'src/clMathLibraries/clBLAS' Cloning into 'src/EasyCL'... remote: Counting objects: 1851, done. remote: Total 1851 (delta 0), reused 0 (delta 0), pack-reused 1851 Receiving objects: 100% (1851/1851), 863.53 KiB | 1.67 MiB/s, done. Resolving deltas: 100% (1219/1219), done. Checking connectivity... done. Submodule path 'src/EasyCL': checked out 'ef17a3e1b3d70b7ba89f94682500bc2d95ecb273' Submodule 'thirdparty/clew' (https://github.com/hughperkins/clew.git) registered for path 'thirdparty/clew' Cloning into 'thirdparty/clew'... remote: Counting objects: 262, done. remote: Total 262 (delta 0), reused 0 (delta 0), pack-reused 262 Receiving objects: 100% (262/262), 92.78 KiB | 0 bytes/s, done. Resolving deltas: 100% (102/102), done. Checking connectivity... done. Submodule path 'src/EasyCL/thirdparty/clew': checked out 'ea11370417c1935e49f1f90e45089473334db824' Cloning into 'src/clMathLibraries/clBLAS'... remote: Counting objects: 3186, done. remote: Total 3186 (delta 0), reused 0 (delta 0), pack-reused 3186 Receiving objects: 100% (3186/3186), 2.59 MiB | 2.55 MiB/s, done. Resolving deltas: 100% (1979/1979), done. Checking connectivity... done. Submodule path 'src/clMathLibraries/clBLAS': checked out '6df2f999a80789efee3376e8fffeb26d891b464c' -- The C compiler identification is GNU 4.8.4 -- The CXX compiler identification is GNU 4.8.4 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Found Torch7 in /home/zed/torch/install git version 1.9.1 using git setting USE_GIT 1 Warning: Failed loading manifest for /home/zed/.luarocks/lib/luarocks/rocks: /home/zed/.luarocks/lib/luarocks/rocks/manifest: No such file or directory CMAKE_PREFIX_PATH /home/zed/torch/install/bin/.. Warning: Failed loading manifest for /home/zed/.luarocks/lib/luarocks/rocks: /home/zed/.luarocks/lib/luarocks/rocks/manifest: No such file or directory

Installed rocks:

argcheck scm-1 (installed) - /home/zed/torch/install/lib/luarocks/rocks

cwrap scm-1 (installed) - /home/zed/torch/install/lib/luarocks/rocks

dok scm-1 (installed) - /home/zed/torch/install/lib/luarocks/rocks

env scm-1 (installed) - /home/zed/torch/install/lib/luarocks/rocks

fftw3 scm-1 (installed) - /home/zed/torch/install/lib/luarocks/rocks

gnuplot scm-1 (installed) - /home/zed/torch/install/lib/luarocks/rocks

graph scm-1 (installed) - /home/zed/torch/install/lib/luarocks/rocks

graphicsmagick 1.scm-0 (installed) - /home/zed/torch/install/lib/luarocks/rocks

image 1.1.alpha-0 (installed) - /home/zed/torch/install/lib/luarocks/rocks

loadcaffe 1.0-0 (installed) - /home/zed/torch/install/lib/luarocks/rocks

lua-cjson 2.1devel-1 (installed) - /home/zed/torch/install/lib/luarocks/rocks

luaffi scm-1 (installed) - /home/zed/torch/install/lib/luarocks/rocks

luafilesystem 1.6.3-1 (installed) - /home/zed/torch/install/lib/luarocks/rocks

nn scm-1 (installed) - /home/zed/torch/install/lib/luarocks/rocks

nngraph scm-1 (installed) - /home/zed/torch/install/lib/luarocks/rocks

nnx 0.1-1 (installed) - /home/zed/torch/install/lib/luarocks/rocks

optim 1.0.5-0 (installed) - /home/zed/torch/install/lib/luarocks/rocks

paths scm-1 (installed) - /home/zed/torch/install/lib/luarocks/rocks

penlight scm-1 (installed) - /home/zed/torch/install/lib/luarocks/rocks

qtlua scm-1 (installed) - /home/zed/torch/install/lib/luarocks/rocks

qttorch scm-1 (installed) - /home/zed/torch/install/lib/luarocks/rocks

signal scm-1 (installed) - /home/zed/torch/install/lib/luarocks/rocks

sundown scm-1 (installed) - /home/zed/torch/install/lib/luarocks/rocks

sys 1.1-0 (installed) - /home/zed/torch/install/lib/luarocks/rocks

threads scm-1 (installed) - /home/zed/torch/install/lib/luarocks/rocks

torch scm-1 (installed) - /home/zed/torch/install/lib/luarocks/rocks

trepl scm-1 (installed) - /home/zed/torch/install/lib/luarocks/rocks

xlua 1.0-0 (installed) - /home/zed/torch/install/lib/luarocks/rocks

CMake Error at CMakeLists.txt:41 (message):

Please install cltorch from https://github.com/hughperkins/distro-cl

-- Configuring incomplete, errors occurred! See also "/tmp/luarocks_cltorch-scm-1-269/cltorch/cltorch/build/CMakeFiles/CMakeOutput.log".

Error: Build error: Failed building.

jcjohnson commented 8 years ago

Hrm, I'm getting the same error. Something must have changed recently in cltorch; try opening an issue over at https://github.com/hughperkins/cltorch.

hughperkins commented 8 years ago

Hmmmm, well, running from torch-cl seems to work ok for me?

ubuntu@peach:~/git/neural-style$ torch
torch-cl activated
ubuntu@peach:~/git/neural-style$ ./runcl.sh 
libthclnn_searchpath    /home/ubuntu/torch-cl/install/lib/lua/5.1/libTHCLNN.so  
Successfully loaded models/vgg_normalised.caffemodel
conv1_1: 64 3 3 3
conv1_2: 64 64 3 3
conv2_1: 128 64 3 3
conv2_2: 128 128 3 3
conv3_1: 256 128 3 3
conv3_2: 256 256 3 3
conv3_3: 256 256 3 3
conv3_4: 256 256 3 3
conv4_1: 512 256 3 3
conv4_2: 512 512 3 3
conv4_3: 512 512 3 3
conv4_4: 512 512 3 3
conv5_1: 512 512 3 3
conv5_2: 512 512 3 3
conv5_3: 512 512 3 3
conv5_4: 512 512 3 3
Using NVIDIA Corporation , OpenCL platform: NVIDIA CUDA
Using OpenCL device: GeForce 940M
Setting up style layer      2   :   relu1_1 
Replacing max pooling at layer 5 with average pooling   
Setting up style layer      7   :   relu2_1 
Replacing max pooling at layer 10 with average pooling  
Setting up style layer      12  :   relu3_1 
Replacing max pooling at layer 19 with average pooling  
Setting up style layer      21  :   relu4_1 
Setting up content layer    23  :   relu4_2 
Replacing max pooling at layer 28 with average pooling  
Setting up style layer      30  :   relu5_1 
Running optimization with L-BFGS    
<optim.lbfgs>   creating recyclable direction/step/history buffers  
Iteration 50 / 700  
  Content 1 loss: 69249.922903  
  Style 1 loss: 1.133451    
  Style 2 loss: 0.243755    
  Style 3 loss: 0.036350    
  Style 4 loss: 0.002463    
  Style 5 loss: 0.002799    
  Total loss: 69251.341721  
hughperkins commented 8 years ago

But yes, luarocks install cltorch and luarocks install clnn are not currently supported. There were lots of changes with THNN, that were breaking cltorch every few days, which meant it spent more time being broken than not. If you run from distro-cl, it should be stable, and just keep working. Why it's not working for you though is unclear. As you can see fro mthe above, it runs ok on my own distro-cl installation, which should ideally be identical to your own.

hughperkins commented 8 years ago

I'm running it like this:

ubuntu@peach:~/git/neural-style$ cat runcl.sh 
#!/bin/bash

name=$1
source settings.sh

th neural_style.lua -style_image examples/inputs/picasso_selfport1907.jpg -content_image examples/inputs/brad_pitt.jpg -gpu 0 -output_image cl_$name.png -image_size $size -model_file models/vgg_normalised.caffemodel -num_iterations $its -save_iter $saveits -normalize_gradients -content_weight 50000 -style_weight 90000 -backend clnn -optimizer lbfgs -pooling avg -seed 123
hughperkins commented 8 years ago
ubuntu@peach:~/git/neural-style$ cat settings.sh 
#!/bin/bash

#its=30000
its=700
saveits=50
size=200
hughperkins commented 8 years ago

ah, you're not running from torch-cl, look at your error message:

/home/zed/torch/install/bin/luajit: /home/zed/torch/install/share/lua/5.1/nn/Container.lua:67:

The path i nthe error message is /home/zed/torch, it should be /home/zed/torch-cl. Can you try doing:

source ~/torch-cl/install/bin/torch-activate

th neural_style.lua -style_image examples/inputs/picasso_selfport1907.jpg -content_image examples/inputs/brad_pitt.jpg -output_image profile.png -model_file models/nin_imagenet_conv.caffemodel -proto_file models/train_val.prototxt -gpu 0 -backend clnn -num_iterations 1000 -seed 123 -content_layers relu0,relu3,relu7,relu12 -style_layers relu0,relu3,relu7,relu12 -content_weight 10 -style_weight 1000 -image_size 512 -optimizer adam
slessie commented 8 years ago

Ran

source ~/torch-cl/install/bin/torch-activate

th neural_style.lua -style_image examples/inputs/picasso_selfport1907.jpg -content_image examples/inputs/brad_pitt.jpg -output_image profile.png -model_file models/nin_imagenet_conv.caffemodel -proto_file models/train_val.prototxt -gpu 0 -backend clnn -num_iterations 1000 -seed 123 -content_layers relu0,relu3,relu7,relu12 -style_layers relu0,relu3,relu7,relu12 -content_weight 10 -style_weight 1000 -image_size 512 -optimizer adam

and got an error but realized it was because I had installed loadcaffe only into ~/torch and not ~/torch-cl After installing loadcaffe in torch-cl it works now.

Thanks for the help @hughperkins @jcjohnson ! Maybe an update to the readme with more instructions on setting up open-cl will be useful for others. This is amazingly fast now compared to cpu. Now i'm going to try to do it with an image sequence to style videos.

hughperkins commented 8 years ago

Cool. awesome :-) maybe I will just add loadcaffe to distro-cl. It seems like it's a standard enough thing to simply add. Will ponder this. Thanks for figuring this out!

hughperkins commented 8 years ago

(added loadcaffe to distro-cl https://github.com/hughperkins/distro-cl/commit/66fda53343cf662d1a50da75eda94e2719bba968 )

pizzacoin commented 8 years ago

Sorry if I write in closed topic, but i try opencl with torch-cl; any advice? ubuntu 14.04.04

goemon@asrock-linux:~/neural-style$ th neural_style.lua -style_image examples/inputs/picasso_selfport1907.jpg -content_image examples/inputs/brad_pitt.jpg -output_image profile.png -model_file models/nin_imagenet_conv.caffemodel -proto_file models/train_val.prototxt -gpu 0 -backend clnn -num_iterations 1000 -seed 123 -content_layers relu0,relu3,relu7,relu12 -style_layers relu0,relu3,relu7,relu12 -content_weight 10 -style_weight 1000 -image_size 512 -optimizer adam libthclnn_searchpath /home/goemon/torch-cl/install/lib/lua/5.2/libTHCLNN.so
Successfully loaded models/nin_imagenet_conv.caffemodel MODULE data UNDEFINED warning: module 'data [type 5]' not found conv1: 96 3 11 11 cccp1: 96 96 1 1 cccp2: 96 96 1 1 conv2: 256 96 5 5 cccp3: 256 256 1 1 cccp4: 256 256 1 1 conv3: 384 256 3 3 cccp5: 384 384 1 1 cccp6: 384 384 1 1 conv4-1024: 1024 384 3 3 cccp7-1024: 1024 1024 1 1 cccp8-1024: 1000 1024 1 1 Using Advanced Micro Devices, Inc. , OpenCL platform: AMD Accelerated Parallel Processing Using OpenCL device: Tahiti Setting up content layer 2 : relu0
/home/goemon/torch-cl/install/bin/lua: symbol lookup error: /home/goemon/torch-cl/install/lib/libEasyCL.so: undefined symbol: lua_pcall

hughperkins commented 8 years ago

Hmmmm.... I'm not sure.... I tried doing a full installation and running neural-style on a 14.04 box https://gist.github.com/hughperkins/b53cc8dc1e84b84d306a3f32d781d69b The only things that occur to me is that maybe you're pulling down lua from somehwer eother than torch-cl? What is the output of doing:

which lua
which th
which luajit
echo $PATH

?

pizzacoin commented 8 years ago

Hi, Thanks.. There is the output (cpu mode -gpu -1 is working)

goemon@asrock-linux:~$ which lua /home/goemon/torch-cl/install/bin/lua goemon@asrock-linux:~$ which th /home/goemon/torch-cl/install/bin/th goemon@asrock-linux:~$ which luajit /usr/bin/luajit goemon@asrock-linux:~$ echo $PATH /home/goemon/torch-cl/install/bin:/home/goemon/torch-cl/install/bin:/home/goemon/torch-cl/install/bin:/home/goemon/torch-cl/install/bin:/home/goemon/torch-cl/install/bin:/home/goemon/torch/install/bin:/home/goemon/torch/install/bin:/home/goemon/torch-cl/install/bin:/home/goemon/torch-cl/install/bin:/home/goemon/torch-cl/install/bin:/home/goemon/torch-cl/install/bin:/home/goemon/torch-cl/install/bin:/home/goemon/torch/install/bin:/home/goemon/torch/install/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games goemon@asrock-linux:~$

hughperkins commented 8 years ago

hmmm, my which luajit looks different:

ubuntu@peach:~$ which luajit
/home/ubuntu/torch-cl/install/bin/luajit

Can you also do:

th -e 'print(_VERSION)'
th -e 'print(_ENV)'

...and use th to run the following script (save it as eg /tmp/test.lua) ? :

local i_min = 0
while arg[ i_min ] do i_min = i_min - 1 end
local lua_exe = arg[ i_min + 1 ]
print('lua_exe', lua_exe)
pizzacoin commented 8 years ago

I did a clean install; ubuntu 16.04; only torch-cl (distro-cl) and neural style (neuralstyle is working in cpu mode) I runned the test

luajit -l torch -e 'torch.test()' - ok luajit -l nn -e 'nn.test()' - ok luajit -l cltorch -e 'cltorch.test()' - NO luajit -l clnn -e 'clnn.test()' -ok

goemon@asrock-pc:~$ luajit -l cltorch -e 'cltorch.test()' running tests... aftter requiring cltorch.unitstorage Running 2 tests | ==> testbasic | ==> testget
*
==> Done

Completed 0 asserts in 2 tests with 2 errors


test_basic Function call failed Something went wrong: OpenCL library not found at /home/goemon/torch-cl/opencl/cltorch/src/torch/generic/Storage.cpp:101 stack traceback: [C]: at 0x7fc248ecc5c0 [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' ...e/goemon/torch-cl/install/share/lua/5.1/torch/Tester.lua:115: in function 'pcall' ...e/goemon/torch-cl/install/share/lua/5.1/torch/Tester.lua:186: in function '_run' ...e/goemon/torch-cl/install/share/lua/5.1/torch/Tester.lua:161: in function 'run' .../torch-cl/install/share/lua/5.1/cltorch/unit_storage.lua:91: in function 'test' ...e/goemon/torch-cl/install/share/lua/5.1/cltorch/Test.lua:8: in function 'test' (command line):1: in main chunk [C]: at 0x00405e90


test_get Function call failed No OpenCL-enabled devices available at /home/goemon/torch-cl/opencl/cltorch/src/lib/THClGeneral.cpp:139 stack traceback: [C]: at 0x7fc248ecc5c0 [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' ...e/goemon/torch-cl/install/share/lua/5.1/torch/Tester.lua:115: in function 'pcall' ...e/goemon/torch-cl/install/share/lua/5.1/torch/Tester.lua:186: in function '_run' ...e/goemon/torch-cl/install/share/lua/5.1/torch/Tester.lua:161: in function 'run' .../torch-cl/install/share/lua/5.1/cltorch/unit_storage.lua:91: in function 'test' ...e/goemon/torch-cl/install/share/lua/5.1/cltorch/Test.lua:8: in function 'test' (command line):1: in main chunk [C]: at 0x00405e90


tester.errors 2

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

pizzacoin commented 8 years ago

and th -e 'print(_VERSION)' th -e 'print(_ENV)'

goemon@asrock-pc:~$ which luajit /home/goemon/torch-cl/install/bin/luajit goemon@asrock-pc:~$ th -e 'print(_VERSION)' Lua 5.1 goemon@asrock-pc:~$ th -e 'print(_ENV)' nil

hughperkins commented 8 years ago

Cool. 16.04 is good. Thats what I'm using, so will make it tons easier :-) Can yo ucheck the output of:

clinfo

Tihs should show your GPU. if it doesnt, you might need to install GPU drivers. You might also need to sudo apt-get install -y clinfo first, for this command to work.

pizzacoin commented 8 years ago

In 14.04 i installed fgrlx from Ubuntu Software; in 16.04 the new beta driver don't support my 7950 :/ http://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Beta-Driver-for-Vulkan-Release-Notes.aspx I can use opensource driver? I must also install the SDK?

hughperkins commented 8 years ago

Ah. Well, if by opensource, you mean Clover, it lacks basic things, like tanh, so you probably wont get very far with it. I guess back to 14.04 you go. cltorch runs just fine on 14.04, so there's no reason why it wont work on your system . There's something not quite expected about your system, which I suspect is something to do with some combination of your PATH and / or lua version, which we cna probably figure out. Might need a bit of patience though, since I dont have direct access to see what is happening.

pizzacoin commented 8 years ago

Thanks! All works. (I was wrong something with torch and distro-cl installed together)

hughperkins commented 8 years ago

Super cool! Great! :-)