Skip to content

[SYCL][NVPTX][AMDGCN] Move MSVC math functions to headers #19718

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 5 commits into from
Aug 6, 2025

Conversation

bader
Copy link
Contributor

@bader bader commented Aug 5, 2025

MSVC's <complex> header uses a number of non-standard functions
defined in <cmath>. Move definitions of these functions to headers to
fix compiltion on Windows platform with MSVC.

MSVC's `<complex>` header uses a number of non-standard functions
defined in `<cmath>`. Move definitions of these functions to headers to
fix compiltion on Windows platform with MSVC.
New version uses macro defined by cmath, which is expected to be
included before using __sycl_cmath_wrapper_impl.hpp.
@bader bader temporarily deployed to WindowsCILock August 6, 2025 00:52 — with GitHub Actions Inactive
@bader bader marked this pull request as ready for review August 6, 2025 00:59
@bader bader requested a review from a team as a code owner August 6, 2025 00:59
@bader bader requested a review from maarquitos14 August 6, 2025 00:59
@bader bader temporarily deployed to WindowsCILock August 6, 2025 01:21 — with GitHub Actions Inactive
@bader bader temporarily deployed to WindowsCILock August 6, 2025 01:21 — with GitHub Actions Inactive
Copy link
Contributor

@maarquitos14 maarquitos14 left a comment

Choose a reason for hiding this comment

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

LGTM, just one question: should we mention AMDGCN in the title too? Changes in sycl/include/sycl/stl_wrappers/cmath affect AMDGCN too.

@bader bader changed the title [SYCL][NVPTX] Move MSVC math functions to headers [SYCL][NVPTX][AMDGCN] Move MSVC math functions to headers Aug 6, 2025
@bader
Copy link
Contributor Author

bader commented Aug 6, 2025

LGTM, just one question: should we mention AMDGCN in the title too? Changes in sycl/include/sycl/stl_wrappers/cmath affect AMDGCN too.

Added [AMDGCN] tag to the PR title.
I didn't add it from the beginning because libdevice/msvc_math.cpp is compiled only for NVPTX, so I guess MSVC std::complex (which uses these functions) is not supported on AMD GPUs.

@bader bader merged commit 9f8e480 into intel:sycl Aug 6, 2025
38 of 39 checks passed
@bader bader deleted the std-complex branch August 6, 2025 16:10
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