-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Caffe OpenCL support #2610
Closed
Closed
Caffe OpenCL support #2610
Changes from 82 commits
Commits
Show all changes
405 commits
Select commit
Hold shift + click to select a range
95a0194
Update README.md
75c1e9b
Update README.md
d197026
Update README.md
723f4cd
Malis debugging version.
naibaf7 5da63bb
Disabled debug in Malis-loss layer.
naibaf7 da4b704
Preparations for ND-SK kernels and build system fixes.
naibaf7 6e34c7d
Lint fix.
naibaf7 a4c9703
Fixed CMAKE build.
naibaf7 7fa198d
Separated Malis loss layer into connected component, affinity and mal…
naibaf7 bcf9d3f
Resetting loss memory blobs.
naibaf7 52818c7
MALIS loss memory resetting.
naibaf7 7b38bb9
Merge branch 'master' of github.com:naibaf7/caffe
naibaf7 614bff7
MALIS loss memory reset.
naibaf7 7066d27
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 a136e4b
Caffe tool initialization fix.
naibaf7 5f6ce45
TryCatch block for broken OpenCL implementations.
naibaf7 5bf9e26
My Makefile configuration. Without OpenMP for now.
b06162c
ND-SK forward/backward layers for CUDA and OpenCL.
naibaf7 7bf78c1
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 fa384d4
Fixed prefetch thread conflicts with OpenCL.
naibaf7 d732db3
Fixed test binary for CMAKE compilation.
naibaf7 0313a56
Fixed CMAKE test target build (runtest).
naibaf7 52bd791
Changed CPU-OpenCL memory paradigmas, fixed OpenCL kernel for MVN.
naibaf7 fa95ef8
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 c1948cb
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 ffda2d5
Unit-tested ND-SK convolution layer, improved CPU memory model on Ope…
naibaf7 b7921dd
Update for CPU mode when compiling with Greentea or CUDA.
naibaf7 7de2f44
LINT fix.
naibaf7 d685823
Revised ND-SK kernels for convolution and pooling.
naibaf7 6c7821c
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 ad781ee
Removed logfile.
naibaf7 1bdbbf6
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 0bbbcdf
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 d99153d
Fixed draw_net.py for ND, SK and new repeated fields in those layers.
naibaf7 f5ab436
Updated MergeCrop layer parameters.
naibaf7 b2bceb8
Fixed loss division by zero bug.
naibaf7 5bc7afe
2nd attempt fixing zero valid labels present.
naibaf7 642ea00
NaN failure.
naibaf7 e060fbf
Another attempt at NaN loss fixing.
naibaf7 51d9be6
Fixed div by zero bug in MALIS loss function.
naibaf7 03f7afb
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 df74233
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 2970da7
Include CUDA only if uing CUDA. Using OpenCL and CPU only didn't need…
tzutalin 1b9b37b
Merge pull request #5 from tzutalin/master
3a2e976
Updated drawing scripts for ND-SK networks.
naibaf7 3cc3a45
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 61d8808
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 036e2c9
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 78a464b
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 9ebb32c
Makefile fix for OS X.
naibaf7 b28b2dc
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 dd99072
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 d712392
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 3a301a0
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 38c0cfe
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 9a9d11e
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 84794f7
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 e1c83b2
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 e056ede
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 2bf3a3e
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 8f76789
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 da5926b
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 d5ba37d
Added preparations for device abstraction and Multi-GPU training.
naibaf7 7aaa39d
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 19f756b
Removed include for CUDA when not present.
naibaf7 5bfcdf6
Excluded CUDA Multi-GPU code in Greentea-only build.
naibaf7 afc89be
GPU device vector fixed in caffe.cpp
naibaf7 c066af7
Fixed gradient solver test CUDA exclusions.
naibaf7 a8ca694
CPU only fix
naibaf7 5cc8147
Fixed CPU only (second).
naibaf7 3930017
Fixed CPU only (3rd).
naibaf7 6d0ec67
CPU only initialization fix.
naibaf7 a6e0eec
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 4e709ea
Updated pointer types for Caffe object.
naibaf7 2806b26
Python GPU device initialization compability fix.
naibaf7 e8eaeec
cuDNN compability fix.
naibaf7 7ea76a3
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 ced83da
Fix includes for Greentea build with CMake.
naibaf7 0d137e9
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 2d24b88
CPU only fix.
naibaf7 dbdd223
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 e828cf2
Critical bugfix with OpenCL queues.
naibaf7 7cbe93e
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 082d35e
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 f84c2a4
Catching up with BVLC master.
naibaf7 30f2a0b
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 4a687d4
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 ac9d92a
Synchronization bugfix.
naibaf7 4715ab6
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 eb2bf8d
Embed layer OpenCL preparations. Will still fail during runtest. Open…
naibaf7 78c4b81
OpenCL/CPU fix.
naibaf7 84757de
Cleanup in embed_layer.cu.
naibaf7 451337b
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 765f5b1
EmbedLayer and TileLayer support in OpenCL.
naibaf7 5a2b4b5
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 522bf16
Cleanup.
naibaf7 cfbd0f6
Device capability check for EmbedLayer (64 bit atomics).
naibaf7 b3f8cf1
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 2ed20a4
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 c6ba512
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 891d4f4
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 e513947
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 05ded2e
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 a18a4fa
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 5c211c2
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 afaa6dc
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 b5eec63
Update README.md
66a1cec
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 539ae6a
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 6ed797e
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 079af2c
Merge branch 'master' of https://github.com/naibaf7/caffe
bd7953b
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 383f092
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 dd07c6f
Change DeviceContext to device, refactoring convolution layer.
naibaf7 6654fe7
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 05641a3
Fusing convolution layer code.
naibaf7 0d63694
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 eab0c29
Consolidation of PoolingND, PoolingSK, Pooling layers.
naibaf7 0dd688c
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 c963f5c
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 d8d5373
Grouped convolution fix.
naibaf7 1e92888
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 3eb9619
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 117b029
Removed temporary txt file.
naibaf7 6afda54
Convolution bias fix.
naibaf7 04bce35
SPP/Pooling layer padding fix.
naibaf7 e37972a
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 3335be6
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 d06ee17
OpenCL convolution adapted.
naibaf7 eb44091
im2col_nd kernel fix in OpenCL
naibaf7 f9f8720
CUDA im2col fix.
naibaf7 ce411d7
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 5cdbd66
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 5d1539a
Merge branch 'master' of https://github.com/naibaf7/caffe
456e24d
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 346af4d
Merge branch 'master' of https://github.com/naibaf7/caffe
61a05f3
Python update, Lint fixes.
naibaf7 faf003a
Pycaffe check update.
naibaf7 9b9c8de
Merge branch 'master' of https://github.com/naibaf7/caffe
733b328
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 d62911c
LINT fix.
naibaf7 09fa574
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 8c64b14
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 977bd72
Reworked MALIS (flexibility/feature), added batch reindex layer for O…
naibaf7 202473d
Memory Data Layer fix.
naibaf7 20edccc
Merge branch 'master' of https://github.com/naibaf7/caffe
b63ed18
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 288e981
LINT fix.
naibaf7 5d200ca
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 0df8d82
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 5037c27
Merge branch 'master' of https://github.com/naibaf7/caffe
dc11681
64 bit indexing support throughout Caffe.
naibaf7 d02c1ae
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 8169691
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 f332d2c
Full 64 bit indexing support throughout Caffe.
naibaf7 037b724
LINT fix.
naibaf7 5ebebfb
Pycaffe fixed.
naibaf7 5095917
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 d82979b
Softmax fix for >4 shape dims.
naibaf7 01139b0
Fix for Malis, Softmax.
naibaf7 0797331
ViennaCL fix.
naibaf7 a9612f3
Merge branch 'master' of https://github.com/naibaf7/caffe
srinituraga 8a7bb1f
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 2ef972e
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 165d231
Removed duplicate function.
naibaf7 f33e280
CL pooling SK kernel fix.
naibaf7 23d6ffd
ND pooling fix.
naibaf7 af4667e
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 551ad62
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 2ed8b65
Merge branch 'master' of https://github.com/naibaf7/caffe
srinituraga b55c9b9
changed to square loss
srinituraga 4ee23f6
remove my personal config file
srinituraga 181f195
Merge pull request #14 from srinituraga/master
2bdba45
Malis cleanup, OpenCL ND pooling fix
naibaf7 aecda3c
Malis niceification for Srini.
naibaf7 f4c7360
Malis fix (2).
naibaf7 bd906d9
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 abb8846
Fixed malis loss for aniso.
naibaf7 9606b54
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 1d47ba5
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 39bb9c5
Malis correction.
naibaf7 f4ce3c3
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 70f290b
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 85794ea
Affinity layer cleanup.
naibaf7 6643498
Fixed connected components.
naibaf7 842464f
Affinity offset fix.
naibaf7 2243213
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 d534293
Fixed MALIS for 2 and > 3 edges with !(x==y==z) input sizes.
naibaf7 bc5b3b8
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 91b022c
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 3a51391
Malis small indexing change.
naibaf7 dbc1d1d
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 1148d80
Lint fix.
naibaf7 48ecfee
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 984745d
Expose SolverParameter to Python.
naibaf7 e2f8e70
Improved pycaffe interface.
naibaf7 576a347
Extended python interface.
naibaf7 a1a0d7f
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 52732be
Merge, stronger PyCaffe interface.
naibaf7 5b9bad5
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 97f9648
Multi-device advancements.
naibaf7 0cc7dc2
Updated device initialization.
naibaf7 03276d4
updated pycaffe init
naibaf7 d41646f
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 2de1d73
Euclidean loss rescaling.
naibaf7 a247341
Euclidean loss cast update.
naibaf7 d96e148
Euclid zero loss bug.
naibaf7 adf0049
Fixed euclid scaling.
naibaf7 615f802
Malis loss averaging.
naibaf7 923146a
Merge branch 'master' of github.com:naibaf7/caffe
naibaf7 2104120
CuDNN ND support
naibaf7 f2fcc37
CuDNN Pooling/Convolution ND fix.
naibaf7 677e844
Fallback to Caffe SK convolution/pooling when using cuDNN.
naibaf7 c40513d
Removed legacy accessor.Removed legacy accessor.
naibaf7 2d2052c
Colbuffer allocation prevention in cuDNN.
naibaf7 a38d44a
deterministic GEMM backard.
naibaf7 6e9fba4
Layer factory and dropout ND update.
naibaf7 7fd1f1e
Update layer_factory.cpp
ae61b64
32/64 bit indexing
naibaf7 f1a46f9
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 c366816
Selectable 64/32bit indexing compilation.
naibaf7 3dacf6f
Merge branch 'master' of github.com:naibaf7/caffe
naibaf7 0e998aa
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 4d5edc0
Cleanup
naibaf7 938b362
Index64 definition in Makefile.
naibaf7 14537bf
Convolution kernel update, queue count update.
naibaf7 5c99e6c
Cleanup.
naibaf7 c1cdaa7
Convolution kernel fixes.
naibaf7 30cab07
Intel Beignet 1.1.1 kernel fixes.
naibaf7 fdd7efb
Linking ISAAC option.
naibaf7 5efd4f9
ISAAC support.
naibaf7 2860463
typo fix.
naibaf7 c0d52ce
CuDNN at least 4 dimensional tensors fix.
naibaf7 96b84b6
Expose snapshot format to python
naibaf7 2d0881e
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 146687d
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 f85058b
Type int_tp fix.
naibaf7 d7962d1
OpenCL stochastic kernel backward bugfix.
naibaf7 782b8ac
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 5f2578e
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 87a2417
Merge branch 'master' of github.com:naibaf7/caffe
naibaf7 164218e
LINT fix.
naibaf7 84354bf
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 762d512
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 38cf580
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 8865334
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 cd7277b
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 8473f67
OpenCL Bias and Scale layers.
naibaf7 3181e8f
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 4085154
Merge branch 'master' of github.com:BVLC/caffe
naibaf7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
GREENTEA BUILDING BLOCKS: | ||
|
||
viennacl::ocl::context &ctx = viennacl::ocl::get_context( | ||
this->device_context_.id()); | ||
viennacl::ocl::program &program = Caffe::Get().GetDeviceProgram( | ||
this->device_context_.id()); | ||
|
||
viennacl::ocl::kernel &oclk_kernel = program.get_kernel( | ||
CL_KERNEL_SELECT("kernel")); | ||
viennacl::ocl::enqueue( | ||
oclk_kernel(WrapHandle((cl_mem) data, ctx)), | ||
ctx.get_queue()); | ||
|
||
if (this->device_context_.backend() == BACKEND_CUDA) { | ||
#ifdef USE_CUDA | ||
#endif // USE_CUDA | ||
} else { | ||
#ifdef USE_GREENTEA | ||
#endif // USE_GREENTEA | ||
} | ||
|
||
#ifdef USE_GREENTEA | ||
#include "caffe/greentea/greentea.hpp" | ||
#include "caffe/greentea/greentea_math_functions.hpp" | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ty for the big contribution 👍 .
Would -std=c++0x work? I think travis runs GCC 4.6 and only GCC 4.7 and later support -std=c++11.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: it's trivial to install a newer toolchain on Travis, see krasin/CuraEngine@976b373