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
dlib
Commits
49314c12
Commit
49314c12
authored
Apr 10, 2022
by
Adrià Arrufat
Committed by
Davis E. King
Apr 12, 2022
Browse files
Use CUDA in LayerNorm gradient computation
I don't know how I could miss this.
parent
3a267db5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
dlib/cuda/tensor_tools.cpp
dlib/cuda/tensor_tools.cpp
+4
-0
No files found.
dlib/cuda/tensor_tools.cpp
View file @
49314c12
...
...
@@ -687,7 +687,11 @@ namespace dlib { namespace tt
tensor
&
beta_grad
)
{
#ifdef DLIB_USE_CUDA
cuda
::
layer_normalize_gradient
(
eps
,
gradient_input
,
means
,
invstds
,
src
,
gamma
,
src_grad
,
gamma_grad
,
beta_grad
);
#else
cpu
::
layer_normalize_gradient
(
eps
,
gradient_input
,
means
,
invstds
,
src
,
gamma
,
src_grad
,
gamma_grad
,
beta_grad
);
#endif
}
// ----------------------------------------------------------------------------------------
...
...
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