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

[SYCL][CUDA] Revert https://github.com/intel/llvm/pull/6386 and remove c++17 usage. #6400

Merged
merged 7 commits into from
Jul 11, 2022

Conversation

JackAKirk
Copy link
Contributor

@JackAKirk JackAKirk commented Jul 5, 2022

Reverts #6386 so that experimental/builtins.hpp is included in sycl.hpp. This avoids users being required to include this header when using printf or experimental math functions.

Corresponding update here: intel/llvm-test-suite#1076.

Signed-off-by: JackAKirk <jack.kirk@codeplay.com>
Signed-off-by: JackAKirk <jack.kirk@codeplay.com>
bader
bader previously approved these changes Jul 5, 2022
@JackAKirk
Copy link
Contributor Author

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

@pvchupin
Copy link
Contributor

pvchupin commented Jul 6, 2022

All testing passed except validation on Windows with intel/llvm-test-suite#1076 and this Windows portion hangs currently due to machines reconfiguration. :(
This can be merged.

@pvchupin
Copy link
Contributor

pvchupin commented Jul 6, 2022

Windows issue is not relevant and same as https://github.com/intel/llvm/runs/7206588798?check_suite_focus=true

Comment on lines 186 to 191
#if __cplusplus >= 201703L
if constexpr (N % 2)
#else
if (N % 2)
#endif // __cplusplus >= 201703L
{
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need to be this explicit that this is a constexpr? Is this a performance critical place? Why not just remove constexpr?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that all math functions count as performance critical places since they will often be called many many times when used. I think that we could remove constexpr here since at least at O3 there is no difference in the final asm code whether or not constexpr is explicitly used. However I was requested in the review to use c++17 where possible.

Do you want me to remove constexpr usage here?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd remove it, but I'll let you to make final call.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK I've removed it. Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry - I've made further commits to remove some C++17 usage consistent with #6415. if constexpr usage is necessary in joint_matrix_tensorcore.hpp.

smaslov-intel
smaslov-intel previously approved these changes Jul 10, 2022
Signed-off-by: JackAKirk <jack.kirk@codeplay.com>
@JackAKirk JackAKirk dismissed stale reviews from smaslov-intel and bader via dd5bc26 July 11, 2022 09:58
Signed-off-by: JackAKirk <jack.kirk@codeplay.com>
Signed-off-by: JackAKirk <jack.kirk@codeplay.com>
@bader bader requested a review from smaslov-intel July 11, 2022 10:42
Signed-off-by: JackAKirk <jack.kirk@codeplay.com>
smaslov-intel
smaslov-intel previously approved these changes Jul 11, 2022
@JackAKirk JackAKirk changed the title [SYCL][CUDA] Revert https://github.com/intel/llvm/pull/6386 and add C++17 guard [SYCL][CUDA] Revert https://github.com/intel/llvm/pull/6386 and remove c++17 usage. Jul 11, 2022
Signed-off-by: JackAKirk <jack.kirk@codeplay.com>
@JackAKirk
Copy link
Contributor Author

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

@bader bader merged commit 354d057 into intel:sycl Jul 11, 2022
bader pushed a commit to intel/llvm-test-suite that referenced this pull request Jul 11, 2022
Reverts experimental/builtins.hpp includes added in #1072 and #1075.

Requires: intel/llvm#6400
aelovikov-intel pushed a commit that referenced this pull request Feb 17, 2023
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.

None yet

4 participants