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-scatter
Commits
eadbf875
Commit
eadbf875
authored
Jan 29, 2024
by
yangzhong
Browse files
修复版本兼容报错__ldg问题
parent
c7c514c2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
csrc/cuda/utils.cuh
csrc/cuda/utils.cuh
+12
-0
No files found.
csrc/cuda/utils.cuh
View file @
eadbf875
...
@@ -17,3 +17,15 @@ __device__ __inline__ at::Half __shfl_down_sync(const unsigned mask,
...
@@ -17,3 +17,15 @@ __device__ __inline__ at::Half __shfl_down_sync(const unsigned mask,
const
unsigned
int
delta
)
{
const
unsigned
int
delta
)
{
return
__shfl_down_sync
(
mask
,
(
__half
)
var
,
delta
);
return
__shfl_down_sync
(
mask
,
(
__half
)
var
,
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)
#else
#define SHFL_UP_SYNC __shfl_up_sync
#define SHFL_DOWN_SYNC __shfl_down_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