Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CPU] [Snippets] Implement Convert for Snippets on ARM #25815

Merged
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
ba3fd33
[CPU] [Snippets] Implement load, store, convert emitters, and add con…
xuchen-intel Jul 2, 2024
d5e8174
Enable LoadConvertSaturation and three other counterparts
xuchen-intel Jul 23, 2024
5e13530
Fix the issue regarding initialization order
xuchen-intel Jul 31, 2024
b732403
Fix issue regarding incorrect path of headers
xuchen-intel Jul 31, 2024
b4c92bc
Support conversion between the same precision
xuchen-intel Aug 1, 2024
96c06c6
Fix issue regarding primitive type
xuchen-intel Aug 1, 2024
205e579
Skip test cases on unaligned conversion behavior
xuchen-intel Aug 5, 2024
b2c31a4
Apply review comments regarding conversion between f16 and i8(u8)
xuchen-intel Aug 6, 2024
ffeadd5
Revise CMakeLists
xuchen-intel Aug 7, 2024
6b03081
Apply arithmetic_mode to align with x64
xuchen-intel Aug 8, 2024
4d99437
Update precision assertion
xuchen-intel Aug 8, 2024
f03800b
Replace post_ptr with ptr
xuchen-intel Aug 9, 2024
63d16c2
Set IGNORE_CALLBACK if rank > 6
xuchen-intel Aug 19, 2024
1ea1b6b
Update isSuitableConvert
xuchen-intel Aug 19, 2024
da5a32d
Update jit_store_memory_emitter constructor
xuchen-intel Aug 19, 2024
7e8d9c0
Update enum class arithmetic_mode
xuchen-intel Aug 19, 2024
1747147
Call convert_emitter in load/store_emitter
xuchen-intel Aug 19, 2024
f7d4f11
Update arguments for instructions regarding f16 conversion
xuchen-intel Aug 20, 2024
b21c9dd
Make conversion between f16 and i8 compatible with ARMv8
xuchen-intel Aug 20, 2024
aa0b7eb
Update XReg prc
xuchen-intel Aug 22, 2024
f879613
Remove unnecessary aux_vec_idxs
xuchen-intel Aug 22, 2024
6365b00
Update mov logic
xuchen-intel Aug 22, 2024
19a43de
Update swtich-case for identical input and output precisions
xuchen-intel Aug 22, 2024
cb094a7
Update template for conversion functions
xuchen-intel Aug 22, 2024
d4dd709
Apply mov for conversion between i8 and u8 for truncation mode
xuchen-intel Aug 22, 2024
66b70da
Update jit_convert_emitter constructor
xuchen-intel Aug 22, 2024
f7ed03c
revert removing unnecessary aux_vec_idxs
xuchen-intel Aug 23, 2024
0fde0e2
Make conversion functions to be member functions of base class
xuchen-intel Aug 23, 2024
e547663
Add assertion
xuchen-intel Aug 23, 2024
431bf95
Update SNIPPETS_REGISTER_PASS_RELATIVE
xuchen-intel Aug 23, 2024
cb497a1
Apply convert_truncation_emitter
xuchen-intel Aug 23, 2024
c16fd38
Add condition for creating conversion emitters
xuchen-intel Aug 23, 2024
dda5225
Update assertion for element number
xuchen-intel Aug 23, 2024
7ec419a
Merge branch 'master' into feature/arm_snippets_convert
xuchen-intel Sep 2, 2024
11a8d58
Merge branch 'master' into feature/arm_snippets_convert
xuchen-intel Sep 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix issue regarding primitive type
xuchen-intel committed Aug 23, 2024
commit 96c06c6a6ab1d8512302302867396c9bf5aa6416
Original file line number Diff line number Diff line change
@@ -63,7 +63,17 @@ void ConvertCPULayerTest::SetUp() {
auto primitive = selectedType;
if (primitive.empty())
primitive = getPrimitiveType();
if (!isInOutPrecisionSupported(inPrc, outPrc))
#if defined(OPENVINO_ARCH_ARM64)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is method isInOutPrecisionSupported which exclude some test cases for acl on arm. Should we remove them if now Convert will be executed via Snippets?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Alexandra for the comment! You are right now Convert will be executed via Snippets. Yet tokenization of Snippets has other contraints besides precision. For example, thought i8 is generally supported by Snippets, but some i8 cases will not be tokenized because of for exmaple rank discussed in next comment. For such case, we still need to return false of isInOutPrecisionSupported for acl, when it does not support.

And as I added primitive != "jit" to the condition, isInOutPrecisionSupported will not be executed if primitive already equal to "jit". Please feel free to have further discussions.

if (inPrc == ov::element::u4 || inPrc == ov::element::i4)
primitive = "ref";
else if (shapes.first.is_static() && shapes.first.rank().get_length() <= 6 &&
inPrc != ov::element::bf16 && outPrc != ov::element::bf16 &&
inPrc != ov::element::i32 && outPrc != ov::element::i32) // Apply "jit" for the snippets cases
primitive = "jit";
else
primitive = "acl";
#endif
if (primitive != "jit" && !isInOutPrecisionSupported(inPrc, outPrc))
primitive = "ref";

validate_out_prc();