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-sparse
Commits
2ff6d9be
Commit
2ff6d9be
authored
Jan 29, 2024
by
limm
Browse files
add __ldg fun definition
parent
ceb47f1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
csrc/cuda/utils.cuh
csrc/cuda/utils.cuh
+13
-0
No files found.
csrc/cuda/utils.cuh
View file @
2ff6d9be
...
@@ -16,3 +16,16 @@ __device__ __inline__ at::Half __shfl_down_sync(const unsigned mask,
...
@@ -16,3 +16,16 @@ __device__ __inline__ at::Half __shfl_down_sync(const unsigned mask,
const
unsigned
int
delta
)
{
const
unsigned
int
delta
)
{
return
__shfl_down_sync
(
mask
,
var
.
operator
__half
(),
delta
);
return
__shfl_down_sync
(
mask
,
var
.
operator
__half
(),
delta
);
}
}
#ifdef USE_ROCM
__device__
__inline__
at
::
Half
__ldg
(
const
at
::
Half
*
ptr
)
{
return
__ldg
(
reinterpret_cast
<
const
__half
*>
(
ptr
));
}
#define SHFL_UP_SYNC(mask, var, delta) __shfl_up(var, delta)
#define SHFL_DOWN_SYNC(mask, var, delta) __shfl_down(var, delta)
#define SHFL_SYNC(mask, var, delta) __shfl(var, delta)
#else
#define SHFL_UP_SYNC __shfl_up_sync
#define SHFL_DOWN_SYNC __shfl_down_sync
#define SHFL_SYNC __shfl_sync
#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