Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
dac6a3f6
Unverified
Commit
dac6a3f6
authored
May 10, 2024
by
Steve Grubb
Committed by
GitHub
May 10, 2024
Browse files
[Misc] Apply a couple g++ cleanups (#4719)
parent
64b77dfd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
2 deletions
+1
-2
csrc/cpu/cache.cpp
csrc/cpu/cache.cpp
+1
-1
csrc/cpu/pos_encoding.cpp
csrc/cpu/pos_encoding.cpp
+0
-1
No files found.
csrc/cpu/cache.cpp
View file @
dac6a3f6
...
...
@@ -84,7 +84,7 @@ void reshape_and_cache_cpu_impl(
void
copy_blocks
(
std
::
vector
<
torch
::
Tensor
>
&
key_caches
,
std
::
vector
<
torch
::
Tensor
>
&
value_caches
,
const
torch
::
Tensor
&
block_mapping
)
{
int
num_layers
=
key_caches
.
size
();
unsigned
num_layers
=
key_caches
.
size
();
TORCH_CHECK
(
num_layers
==
value_caches
.
size
());
if
(
num_layers
==
0
)
{
return
;
...
...
csrc/cpu/pos_encoding.cpp
View file @
dac6a3f6
...
...
@@ -19,7 +19,6 @@ void rotary_embedding_impl(
const
int
num_tokens
)
{
using
scalar_vec_t
=
vec_op
::
vec_t
<
scalar_t
>
;
constexpr
int
VEC_ELEM_NUM
=
scalar_vec_t
::
get_elem_num
();
constexpr
int
ELEM_SIZE
=
sizeof
(
scalar_t
);
const
int
embed_dim
=
rot_dim
/
2
;
TORCH_CHECK
(
embed_dim
%
VEC_ELEM_NUM
==
0
);
...
...
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