Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenCL version #17

Open
aigujin opened this issue Mar 18, 2016 · 1 comment
Open

OpenCL version #17

aigujin opened this issue Mar 18, 2016 · 1 comment

Comments

@aigujin
Copy link

aigujin commented Mar 18, 2016

Hi,
Would it be hard, by including cltorch and clnn libraries, to modify your code to support an OpenCL GPU implementation? As you mentioned, you've adapted Andrei's code for this and it has an OpenCL option to run (e.g., -opencl 1)

@aigujin
Copy link
Author

aigujin commented Mar 18, 2016

Hi again,

I did a little of code modification and included option for using an OpenCL libraries. You can see that my GPU card has been recognized:

using OpenCL on GPU 0...    
loading data files...    
Word vocab size: 43617, Char vocab size: 84    
reshaping tensors...    
data load done. Number of batches in train: 653, val: 110, test: 1    
Word vocab size: 43617, Char vocab size: 84, Max word length (incl. padding):     53    
creating an LSTM-CNN with 2 layers    
Using Apple , OpenCL platform: Apple
Using OpenCL device: ATI Radeon HD 6770M
number of parameters in the model: 15431727    
cloning rnn    
cloning criterion 

However, the code breaks after that with this message:

/User/**/torch/install/bin/luajit: ...v/torch/install/share/lua/5.1/nn/TemporalConvolution.lua:41: attempt to call field 'TemporalConvolution_updateOutput' (a nil value)
stack traceback:
    .../torch/install/share/lua/5.1/nn/TemporalConvolution.lua:41: in function 'func'
    .../torch/install/share/lua/5.1/nngraph/gmodule.lua:311: in function 'neteval'
    .../torch/install/share/lua/5.1/nngraph/gmodule.lua:346: in function 'func'
    .../torch/install/share/lua/5.1/nngraph/gmodule.lua:311: in function 'neteval'
    .../torch/install/share/lua/5.1/nngraph/gmodule.lua:346: in function 'forward'
    main.lua:368: in function 'feval'
    main.lua:435: in main chunk
    [C]: in function 'dofile'
    .../torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
    [C]: at 0x010cf78bb0

I cannot get a hold of this error but I see they are from nn library. Does it mean that OpenCL project do not have the same set of operations in nn package when comparing to CUDA project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant