Skip to content

[DO NOT REVIEW, PSDB ONLY][Clang][HIP/CUDA] Guard declarations of cmath comparisons when using Microsoft's STL#2726

Open
jmmartinez wants to merge 1 commit into
amd-stagingfrom
users/jmmartinez/fix_hip_build_in_windows_amd_staging_cp
Open

[DO NOT REVIEW, PSDB ONLY][Clang][HIP/CUDA] Guard declarations of cmath comparisons when using Microsoft's STL#2726
jmmartinez wants to merge 1 commit into
amd-stagingfrom
users/jmmartinez/fix_hip_build_in_windows_amd_staging_cp

Conversation

@jmmartinez
Copy link
Copy Markdown

It's upstream counterpart is on llvm#200395

…Microsoft's STL

In HIP, constexpr functions are treated as both, __host__ and
__device__.

A new version of the MS STL shipped with the build tools version 14.51.36231
has constexpr definitions for some cmath functions when the compiler in use is Clang.

These definitions conflict with the __device__ delcarations we provide in
the header wrappers.

This patch guards these declarations/definitions to use the ones coming
from the STL.
@jmmartinez jmmartinez self-assigned this May 29, 2026
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.

1 participant