Skip to content

[SYCL][libclc][CUDA] Add --ffast-math support #5801

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 4 commits into from
Apr 25, 2022

Conversation

pgorlani
Copy link
Contributor

@pgorlani pgorlani commented Mar 14, 2022

This patch allows the --ffast-math compiler flag to substitute the regular genfloatf math built-ins with their ::native versions.

Moreover, this patch completes the support of natives built-ins for libclc/ptx-nvidiacl connecting them with the __nv_fast functions present in libdevice. If a fast function is not available in libdevice the corresponding nvvm intrinsic is used.

Tests in intel/llvm-test-suite#919

This patch allows the `--ffast-math` compiler
flag to substitute the regular `genfloatf` math
built-ins with their `::native` versions.

Moreover, this patch completes the support of natives
built-ins for `libclc/ptx-nvidiacl` connecting
them with the `__nv_fast` functions present in
libdevice. If a fast function is not available in
libdevice the corresponding `nvvm` intrinsic is used.
Fznamznon
Fznamznon previously approved these changes Mar 14, 2022
mlychkov
mlychkov previously approved these changes Mar 14, 2022
Copy link
Contributor

@mlychkov mlychkov left a comment

Choose a reason for hiding this comment

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

llvm changes LGTM.

smanna12
smanna12 previously approved these changes Mar 14, 2022
Copy link
Contributor

@smanna12 smanna12 left a comment

Choose a reason for hiding this comment

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

FE changes LGTM.

@s-kanaev
Copy link
Contributor

/verify with intel/llvm-test-suite#919

@pgorlani pgorlani requested a review from bader March 29, 2022 08:59
bader
bader previously approved these changes Mar 29, 2022
Copy link
Contributor

@bader bader left a comment

Choose a reason for hiding this comment

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

Recovering my approve.
@pgorlani, to get this PR merged, you should ping @intel/llvm-reviewers-runtime team and investigate why new test added by intel/llvm-test-suite#919 doesn't pass.

@pgorlani
Copy link
Contributor Author

Hi @bader, thanks for the prompt answer!

and investigate why new test added by intel/llvm-test-suite#919 doesn't pass.

Are you referring to the outcome of /verify with intel/llvm#5801? How can I see those results?

If not, the test introduced by intel/llvm-test-suite#919 is expected to fail if it is run on a branch that doesn't support the --ffast-math flag, i.e., it passes just in case #5801 is applied.

@bader
Copy link
Contributor

bader commented Mar 29, 2022

and investigate why new test added by intel/llvm-test-suite#919 doesn't pass.

Are you referring to the outcome of /verify with intel/llvm#5801? How can I see those results?

If not, the test introduced by intel/llvm-test-suite#919 is expected to fail if it is run on a branch that doesn't support the --ffast-math flag, i.e., it passes just in case #5801 is applied.

I see that there were two runs:

  1. From this PR - [SYCL][libclc][CUDA] Add --ffast-math support #5801 (comment) - logs can be found here or click on "Details" for Jenkins/verify-test-suite-logs.
  2. From [SYCL] Add --ffast-math tests llvm-test-suite#919 - [SYCL] Add --ffast-math tests llvm-test-suite#919 (comment) - logs can be found here or click on "Details" for Jenkins/verify-test-suite-logs.

@pgorlani pgorlani dismissed stale reviews from bader, smanna12, mlychkov, and Fznamznon via ffad8ef March 30, 2022 13:14
@pgorlani pgorlani requested a review from a team as a code owner March 30, 2022 13:14
bader
bader previously approved these changes Mar 30, 2022
smanna12
smanna12 previously approved these changes Mar 30, 2022
Copy link
Contributor

@smanna12 smanna12 left a comment

Choose a reason for hiding this comment

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

FE changes LGTM

@pgorlani
Copy link
Contributor Author

Thank you so much for the info, @bader.

I had missed the failings in Windows. I pushed a commit that should fix them.

mlychkov
mlychkov previously approved these changes Mar 30, 2022
Copy link
Contributor

@mlychkov mlychkov left a comment

Choose a reason for hiding this comment

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

LLVM changes LGTM.

Remove empty line.

Co-authored-by: Mikhail Lychkov <[email protected]>
@pgorlani pgorlani dismissed stale reviews from mlychkov, smanna12, and bader via d2d9055 March 30, 2022 13:29
Remove empty line.

Co-authored-by: Mikhail Lychkov <[email protected]>
Copy link
Contributor

@smanna12 smanna12 left a comment

Choose a reason for hiding this comment

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

FE changes LGTM

@pgorlani
Copy link
Contributor Author

/verify with intel/llvm-test-suite#919

@pgorlani
Copy link
Contributor Author

All the tests passed.
Jenkins/Pre-ci-logs failed for Assert/assert_in_simultaneously_multiple_tus.cpp, which is now disabled.

Ping @intel/llvm-reviewers-runtime

@pgorlani
Copy link
Contributor Author

Ping @v-klochkov

@pgorlani
Copy link
Contributor Author

Thanks to everybody!

Would it be possible to merge this PR?

@againull againull self-requested a review April 25, 2022 15:01
@againull againull merged commit 0f0c5d1 into intel:sycl Apr 25, 2022
steffenlarsen pushed a commit to intel/llvm-test-suite that referenced this pull request Jun 24, 2022
aelovikov-intel pushed a commit to aelovikov-intel/llvm that referenced this pull request Mar 27, 2023
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.

9 participants