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
jerrrrry
infinicore
Commits
c17e3b83
Commit
c17e3b83
authored
Mar 05, 2026
by
wooway777
Browse files
issue/1033 - fix arg with cudart version
parent
9015e384
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
src/infiniop/ops/random_sample/nvidia/random_sample_kernel.cuh
...nfiniop/ops/random_sample/nvidia/random_sample_kernel.cuh
+11
-0
No files found.
src/infiniop/ops/random_sample/nvidia/random_sample_kernel.cuh
View file @
c17e3b83
...
...
@@ -16,10 +16,21 @@ static cudaError argMax_(
void
*
workspace_ptr
,
size_t
&
workspace_len
,
cudaStream_t
stream
)
{
#if CUDART_VERSION >= 11000
// New interface: separate value and index outputs
T
*
max_value
=
&
kv_pair
->
value
;
int
*
max_index
=
&
kv_pair
->
key
;
return
cub
::
DeviceReduce
::
ArgMax
(
workspace_ptr
,
workspace_len
,
logits
,
max_value
,
max_index
,
n
,
stream
);
#else
// Old interface
return
cub
::
DeviceReduce
::
ArgMax
(
workspace_ptr
,
workspace_len
,
logits
,
kv_pair
,
n
,
stream
);
#endif
}
template
<
class
Tval
,
class
Tidx
>
...
...
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