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
apex
Commits
03100f46
Commit
03100f46
authored
Apr 08, 2019
by
Michael Carilli
Browse files
Fix for #246
parent
e9bbfa59
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
csrc/layer_norm_cuda_kernel.cu
csrc/layer_norm_cuda_kernel.cu
+13
-10
No files found.
csrc/layer_norm_cuda_kernel.cu
View file @
03100f46
...
...
@@ -240,17 +240,20 @@ template<> double rsqrt(double v) {
namespace
{
// This is the un-specialized struct. Note that we prevent instantiation of this
// struct by putting an undefined symbol in the function body so it won't compile.
// template <typename T>
// struct SharedMemory
// {
// // Ensure that we won't compile any un-specialized types
// __device__ T *getPointer()
// {
// extern __device__ void error(void);
// error();
// return NULL;
// }
// };
// https://github.com/NVIDIA/apex/issues/246
template
<
typename
T
>
struct
SharedMemory
{
// Ensure that we won't compile any un-specialized types
__device__
T
*
getPointer
()
{
extern
__device__
void
error
(
void
);
error
();
return
NULL
;
}
};
struct
SharedMemory
;
template
<
>
struct
SharedMemory
<
float
>
...
...
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