Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
torch-spline-conv
Commits
d1b3f976
Commit
d1b3f976
authored
Aug 07, 2018
by
rusty1s
Browse files
kernel boilerplate
parent
10e5ee86
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
cuda/basis_kernel.cu
cuda/basis_kernel.cu
+9
-0
No files found.
cuda/basis_kernel.cu
View file @
d1b3f976
...
...
@@ -179,6 +179,15 @@ template <typename scalar_t> struct BasisBackward {
return grad_pseudo; \
}
#define BASIS_BACKWARD_KERNEL(M, GRAD_PSEUDO, GRAD_BASIS, PSEUDO, KERNEL_SIZE, \
IS_OPEN_SPLINE, NUMEL, CODE, GRAD_CODE) \
[&] { \
const size_t index = blockIdx.x * blockDim.x + threadIdx.x; \
const size_t stride = blockDim.x * gridDim.x; \
for (ptrdiff_t i = index; i < NUMEL; i += stride) { \
} \
}()
at
::
Tensor
linear_bw_cuda
(
at
::
Tensor
grad_basis
,
at
::
Tensor
pseudo
,
at
::
Tensor
kernel_size
,
at
::
Tensor
is_open_spline
)
{
return
grad_basis
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment