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
a6f332d0
Unverified
Commit
a6f332d0
authored
Nov 07, 2024
by
Li, Jiang
Committed by
GitHub
Nov 07, 2024
Browse files
[Hardware][CPU][bugfix] Fix half dtype support on AVX2-only target (#10108)
Signed-off-by:
jiang1.li
<
jiang1.li@intel.com
>
parent
0dfba97b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
cmake/cpu_extension.cmake
cmake/cpu_extension.cmake
+1
-1
csrc/cpu/cpu_types_x86.hpp
csrc/cpu/cpu_types_x86.hpp
+10
-0
No files found.
cmake/cpu_extension.cmake
View file @
a6f332d0
...
...
@@ -93,7 +93,7 @@ if (AVX512_FOUND AND NOT AVX512_DISABLED)
FetchContent_Declare
(
oneDNN
GIT_REPOSITORY https://github.com/oneapi-src/oneDNN.git
GIT_TAG v3.
5.3
GIT_TAG v3.
6
GIT_PROGRESS TRUE
GIT_SHALLOW TRUE
)
...
...
csrc/cpu/cpu_types_x86.hpp
View file @
a6f332d0
...
...
@@ -432,6 +432,16 @@ struct FP32Vec16 : public Vec<FP32Vec16> {
explicit
FP32Vec16
(
const
FP32Vec8
&
data
)
:
reg_low
(
data
.
reg
),
reg_high
(
data
.
reg
)
{}
explicit
FP32Vec16
(
const
FP16Vec16
&
v
)
{
__m128i
low
=
_mm256_extractf128_si256
(
v
.
reg
,
0
);
__m128i
high
=
_mm256_extractf128_si256
(
v
.
reg
,
1
);
reg_low
=
_mm256_cvtph_ps
(
low
);
reg_high
=
_mm256_cvtph_ps
(
high
);
}
explicit
FP32Vec16
(
const
FP16Vec8
&
v
)
:
FP32Vec16
(
FP32Vec8
(
v
))
{}
explicit
FP32Vec16
(
const
BF16Vec16
&
v
)
{
__m128i
low
=
_mm256_extractf128_si256
(
v
.
reg
,
0
);
__m128i
high
=
_mm256_extractf128_si256
(
v
.
reg
,
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