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
infinilm
Commits
c41055b5
Unverified
Commit
c41055b5
authored
Aug 20, 2025
by
PanZezhong1725
Committed by
GitHub
Aug 20, 2025
Browse files
Merge pull request #28 from InfiniTensor/issue/27
issue/27 - fixed slicing for req offset
parents
c6512611
23fdcd0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/models/jiuge/jiuge.cpp
src/models/jiuge/jiuge.cpp
+2
-2
No files found.
src/models/jiuge/jiuge.cpp
View file @
c41055b5
...
@@ -282,8 +282,8 @@ void inferDeviceBatch(const JiugeMeta &meta, DeviceResource &rsrc,
...
@@ -282,8 +282,8 @@ void inferDeviceBatch(const JiugeMeta &meta, DeviceResource &rsrc,
for
(
uint32_t
req
=
0
;
req
<
nreq
;
req
++
)
{
for
(
uint32_t
req
=
0
;
req
<
nreq
;
req
++
)
{
auto
seq_len
=
req_lens
[
req
];
auto
seq_len
=
req_lens
[
req
];
float
random_val
=
std
::
uniform_real_distribution
<
float
>
(
0
,
1
)(
gen
);
float
random_val
=
std
::
uniform_real_distribution
<
float
>
(
0
,
1
)(
gen
);
randomSample
(
result_buf
->
memShare
({},
result_buf
->
dtype
()
),
randomSample
(
result_buf
->
slice
(
0
,
req
,
1
)
->
view_as
({},
{}
),
prob_buf
->
view_as
({
dvoc
},
{
1
}),
prob_buf
->
slice
(
0
,
req
,
1
)
->
view_as
({
dvoc
},
{
1
}),
random_val
,
topp
[
req
],
topk
[
req
],
temperature
[
req
]);
random_val
,
topp
[
req
],
topk
[
req
],
temperature
[
req
]);
token_offset
+=
seq_len
;
token_offset
+=
seq_len
;
}
}
...
...
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