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

feat(tfhe): replace asm with rust intrinsics #1491

Merged
merged 1 commit into from
Aug 29, 2024
Merged

Conversation

sarah-quinones
Copy link

@sarah-quinones sarah-quinones commented Aug 26, 2024

closes: please link all relevant issues

PR content/description

Check-list:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • Relevant issues are marked as resolved/closed, related issues are linked in the description
  • Check for breaking changes (including serialization changes) and add them to commit message following the conventional commit specification

@cla-bot cla-bot bot added the cla-signed label Aug 26, 2024
Copy link
Member

@IceTDrinker IceTDrinker left a comment

Choose a reason for hiding this comment

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

Thanks, just a few questions, I might be misremembering some things

// SAFETY: simd contains an instance of avx512dq, that matches the target feature of
// `implementation`
unsafe { implementation(x) }
_ = simd;
unsafe { _mm512_cvttpd_epi64(x) }
Copy link
Member

Choose a reason for hiding this comment

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

is this going to get inlined if we don't have the target feature on the function itself ?

also could we maybe replace our function call by this intrinsics directly ?

last question, I think you said you had an improvement in performance by changing the conversion function ? here it seems it's the same ?

Copy link
Author

Choose a reason for hiding this comment

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

should get inlined if it works like the other intrinsics.
i also figured I'd leave the instruction change for a separate pr

Copy link
Member

Choose a reason for hiding this comment

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

sounds good then !

// SAFETY: simd contains an instance of avx512dq, that matches the target feature of
// `implementation`
unsafe { implementation(x) }
_ = simd;
unsafe { _mm512_cvtepi64_pd(x) }
Copy link
Member

Choose a reason for hiding this comment

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

same questions here :)

Copy link
Member

@IceTDrinker IceTDrinker left a comment

Choose a reason for hiding this comment

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

Thanks a lot :)

@IceTDrinker IceTDrinker merged commit d3d06c9 into main Aug 29, 2024
90 checks passed
@IceTDrinker IceTDrinker deleted the sk/feat/replace-asm branch August 29, 2024 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants