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
e42bd8c2
Unverified
Commit
e42bd8c2
authored
Nov 18, 2025
by
tiehexue
Committed by
GitHub
Nov 17, 2025
Browse files
Cast return value to int64_t for cache size (#28814)
Signed-off-by:
tiehexue
<
tiehexue@hotmail.com
>
parent
7f064491
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
csrc/cpu/cpu_attn_impl.hpp
csrc/cpu/cpu_attn_impl.hpp
+1
-1
No files found.
csrc/cpu/cpu_attn_impl.hpp
View file @
e42bd8c2
...
@@ -754,7 +754,7 @@ class AttentionScheduler {
...
@@ -754,7 +754,7 @@ class AttentionScheduler {
return
l2_cache_size
>>
1
;
// use 50% of L2 cache
return
l2_cache_size
>>
1
;
// use 50% of L2 cache
}
}
// Fallback if sysctlbyname fails
// Fallback if sysctlbyname fails
return
128
*
1024
>>
1
;
// use 50% of 128KB
return
128
LL
*
1024
>>
1
;
// use 50% of 128KB
#else
#else
long
l2_cache_size
=
sysconf
(
_SC_LEVEL2_CACHE_SIZE
);
long
l2_cache_size
=
sysconf
(
_SC_LEVEL2_CACHE_SIZE
);
TORCH_CHECK_NE
(
l2_cache_size
,
-
1
);
TORCH_CHECK_NE
(
l2_cache_size
,
-
1
);
...
...
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