Skip to content

Start adding some avx512 intrinsics #618

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

Merged
merged 1 commit into from
Dec 14, 2018

Conversation

alexcrichton
Copy link
Member

First one is the quite simple _mm512_abs_epi32 intrinsic!

@alexcrichton
Copy link
Member Author

I was actually quite surprised to learn but my local computer has avx512f at least, so I was even able to run and execute these tests!

@@ -391,6 +391,10 @@ types! {
pub struct __m512d(f64, f64, f64, f64, f64, f64, f64, f64);
}

/// The `__mmask16` type used in AVX-512 intrinsics, a 16-bit integer
#[allow(non_camel_case_types)]
pub type __mmask16 = i16;
Copy link
Member Author

Choose a reason for hiding this comment

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

FWIW this is definitely something we're going to want to debate/decide before stabilization. I've never used this type before (or these intrinsics) so this is the most naive way to translate it, but other options include:

  • A newtype struct wrapper
  • An unsigned number

I'm not sure what the best option is, but others I'm sure to!

First one is the quite simple `_mm512_abs_epi32` intrinsic!
@@ -10,7 +10,9 @@ exclude = [
[profile.release]
debug = true
opt-level = 3
incremental = true
Copy link
Contributor

Choose a reason for hiding this comment

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

Weird, why is this needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh it wasn't needed per se, but it made development a lot easier as it doesn't regress any codegen and it makes release builds (assert_instr) much faster

@alexcrichton alexcrichton merged commit da9f72d into rust-lang:master Dec 14, 2018
@alexcrichton alexcrichton deleted the avx512 branch December 14, 2018 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants