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
ktransformers
Commits
5b4d9c41
Commit
5b4d9c41
authored
Apr 26, 2025
by
PC-DOS
Browse files
Replaced Chinese comments with English to avoid breaking MSVC compiling
parent
a7b99536
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
third_party/llamafile/iqk_mul_mat.inc
third_party/llamafile/iqk_mul_mat.inc
+6
-5
No files found.
third_party/llamafile/iqk_mul_mat.inc
View file @
5b4d9c41
...
...
@@ -2449,19 +2449,20 @@ struct EvenSignHelper {
IQK_ALWAYS_INLINE void sign_2_values(__m256i aux, __m256i * values) const {
aux = _mm256_and_si256(_mm256_srlv_epi32(aux, shifts), mask);
// fix for #829: 兼容Intel Cascade Lake架构的CPU,如果不支持AVX512VPOPCNTDQ扩展,则使用替代实现
// fix for #829: Compatibility with processors using Intel Cascade Lake architecture
// If AVX512VPOPCNTDQ extension is not supported, use alternative implementation
#if HAVE_AVX512_POPCNT
auto pcnt = _mm256_popcnt_epi32(aux);
#else
//
提供替代实现,使用标准的位计数方法
//
Alternative implementation: Using standard bit counting method
__m256i pcnt;
int* pcnt_ptr = reinterpret_cast<int*>(&pcnt);
int
*
aux_ptr
=
reinterpret_cast
<
int
*>
(
&
aux
);
//
直接获取 aux 的地址,避免不必要的复制
int* aux_ptr = reinterpret_cast<int*>(&aux); //
Get address of aux directly, avoid unnecessary copies
#pragma unroll 8 //
提示编译器展开循环,提高 SIMD 计算吞吐量
#pragma unroll 8 //
Hint compiler to unroll loops, increasing throughput of SIMD computing
for (int i = 0; i < 8; i++) {
pcnt_ptr
[
i
]
=
__builtin_popcount
(
aux_ptr
[
i
]);
//
使用编译器内置
popcount
pcnt_ptr[i] = __builtin_popcount(aux_ptr[i]); //
Use compiler builtin
popcount
}
#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