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 conv kernel for theano. tests work, but needs integration and some... #2002
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
fb66035
caffe conv kernel for theano. tests work, but needs integration and s…
stencilman 53630ed
changes after abergeron commented on the code
stencilman 41ab038
remove old code that isn't used.
nouiz 5a4e453
Add error about the missing implementation.
nouiz 5741566
remove old code and small fix for not yet used code.
nouiz ea8153b
Opt to use GpuConvMM in valid mode.
nouiz c5728f5
Better handling of transfer and better error reporting and fix refcount.
nouiz 598f485
warn about bugged code.
nouiz 998b9bc
Reuse the current gpu conv test for gpuconvmm
nouiz 2955b33
Reuse pre allocated memory.
nouiz 1df727f
Add check and better error message
nouiz 549c2fd
Partial fix
nouiz 9bf8ef2
code simplication
nouiz a1509a7
Indentation.
nouiz 80dd43e
Hi Fred, I tried it out, but for me, it doesnt find conv() in package…
stencilman f18c849
Look what I did on like 117 in file theano/sandbox/cuda/tests/test_co…
stencilman c649d66
- fixed a bug in cafe conv (values of _M, _N, _K)
stencilman 0d876f7
renamed to test_gemm
stencilman 6b078b2
renamed conv_gemm function
stencilman d823134
Some more fix.
nouiz 5174e47
Merge branch 'conv_gemm2' of https://github.com/nouiz/Theano into con…
stencilman 03ed592
Fix error detection and update tests to tests only case covered.
nouiz b6febcb
Remove warning as it work now!
nouiz 46f64a6
Merge commit 'refs/pullreqs/origin/pr/2' into conv_gemm after Fred's …
stencilman 497a2d9
Including support for 'full' convolutions. It uses the existing pad f…
stencilman 74ea01a
fixed the bug after which test_full also passes all tests.
stencilman 1e3de2c
Changes suggested by Fred
stencilman 4c55bc4
- added some documentaiton
stencilman File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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
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,53 @@ | ||
/* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here with the copyright notice. |
||
Copyright (c) 2014, The Regents of the University of California (Regents) | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
2. Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR | ||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
#ifndef CAFFE_COMMON_HPP_ | ||
#define CAFFE_COMMON_HPP_ | ||
|
||
#include <cublas_v2.h> | ||
#include <cuda.h> | ||
#include <driver_types.h> // cuda driver types | ||
|
||
// CUDA: grid stride looping | ||
#define CUDA_KERNEL_LOOP(i, n) \ | ||
for (int i = blockIdx.x * blockDim.x + threadIdx.x; \ | ||
i < (n); \ | ||
i += blockDim.x * gridDim.x) | ||
|
||
// CUDA: thread number configuration. | ||
// Use 1024 threads per block, which requires cuda sm_2x or above, | ||
// or fall back to attempt compatibility (best of luck to you). | ||
#if __CUDA_ARCH__ >= 200 | ||
const int CAFFE_CUDA_NUM_THREADS = 1024; | ||
#else | ||
const int CAFFE_CUDA_NUM_THREADS = 512; | ||
#endif | ||
|
||
// CUDA: number of blocks for threads. | ||
inline int CAFFE_GET_BLOCKS(const int N) { | ||
return (N + CAFFE_CUDA_NUM_THREADS - 1) / CAFFE_CUDA_NUM_THREADS; | ||
} | ||
|
||
#endif // CAFFE_COMMON_HPP_ |
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.
This isn't true anymore, you are passing the subsample parameters to the C code now.
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.
We don't pass it to validMM(), we just init the output memory to the right size, but will write to the full memory output region! So it is not working for now.