-
Notifications
You must be signed in to change notification settings - Fork 73
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
chore: add another implementation of multiversion #446
Conversation
Signed-off-by: usamoi <[email protected]>
Signed-off-by: usamoi <[email protected]>
Signed-off-by: usamoi <[email protected]>
Signed-off-by: usamoi <[email protected]>
I have a question, why it's hard to test multiversions of a function? Could you explain it more detailed? Could we use same name for different version like: #[multiversion(targets("x86_64+avx"))]
#[cfg(test)]
fn g() {
...
}
#[multiversion(targets("aarch64+neon"))]
#[cfg(test)]
fn g() {
...
}
#[cfg(test)]
#[multiversion(targets("aarch64+neon", "x86_64+avx"))]
fn g_test() {
g();
} Or a flattened test: #[multiversion(targets("x86_64+avx"))]
#[cfg(test)]
fn xxx_x86_64_avx_test() {
g();
}
#[multiversion(targets("aarch64+neon"))]
#[cfg(test)]
fn xxx_aarch64_neon_test() {
g_aarch64_neon();
} |
It can be written incorrectly. Some cases:
I do not understand what do you mean. |
Signed-off-by: usamoi <[email protected]>
Can you help me with it? Edit:
|
Signed-off-by: usamoi <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need a comments for multiversion, other LGTM.
sparse vector should not have precision problem I think. 1e-5 should be enough, the failure might mean something is wrong |
Signed-off-by: usamoi <[email protected]>
a9d7444
to
2da3ede
Compare
Signed-off-by: usamoi <[email protected]>
9eba749
to
03ddcd7
Compare
Signed-off-by: usamoi <[email protected]>
silver-ymz@5f0bac3 can fix |
Also, in my tests.
|
100 times evaluation on emulator shows EPS should be larger than Are you testing on a real machine? Is the difference caused by emulating? |
I found if I just copy the code in
All tests should be stressful to get real EPS... |
Signed-off-by: usamoi <[email protected]>
Yes, I test on real machine.
I'm not sure. Could you provide the vectors which caused large EPS to reproduce? |
Signed-off-by: usamoi <[email protected]>
I think I know why now. I should copy code in left zone to my editor. |
Signed-off-by: Mingzhuo Yin <[email protected]>
Signed-off-by: usamoi <[email protected]>
Signed-off-by: usamoi <[email protected]>
Signed-off-by: usamoi <[email protected]>
b83a179
to
9cbd82b
Compare
Signed-off-by: usamoi <[email protected]>
* chore: add another implementation of multiversion Signed-off-by: usamoi <[email protected]> * chore: update rust-toolchain Signed-off-by: usamoi <[email protected]> * chore: use detect::multiversion Signed-off-by: usamoi <[email protected]> * test: use detect::multiversion Signed-off-by: usamoi <[email protected]> * ci: add sde test Signed-off-by: usamoi <[email protected]> * test: add dot_internal_v4_avx512vnni_test Signed-off-by: usamoi <[email protected]> * test: bvector tests Signed-off-by: usamoi <[email protected]> * chore: add comments for detect Signed-off-by: usamoi <[email protected]> * ci: do not run rust test 3 times Signed-off-by: usamoi <[email protected]> * fix: svector sl2_v4 Signed-off-by: usamoi <[email protected]> * test: run svector tests 10000 times Signed-off-by: usamoi <[email protected]> * fix: svecf32_sl2_v4 Signed-off-by: Mingzhuo Yin <[email protected]> * test: run vecf16 and veci8 test for 10000 times Signed-off-by: usamoi <[email protected]> * test: run bvecf32 test for 10000 times Signed-off-by: usamoi <[email protected]> * test: run tests for 300 times to reduce ci time Signed-off-by: usamoi <[email protected]> * chore: update rust toolchain Signed-off-by: usamoi <[email protected]> --------- Signed-off-by: usamoi <[email protected]> Signed-off-by: Mingzhuo Yin <[email protected]> Co-authored-by: Mingzhuo Yin <[email protected]> Signed-off-by: jinweios <[email protected]>
I noticed that it's hard to test multiversions of a function and the code can be written incorrectly easily.
Also, dispatching manual versions is not efficient.
So I reimplemented
multiversion
.Examples