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

redefinition of half in imath when using with hip-runtime-amd #412

Open
t1nux opened this issue Jul 9, 2024 · 0 comments
Open

redefinition of half in imath when using with hip-runtime-amd #412

t1nux opened this issue Jul 9, 2024 · 0 comments

Comments

@t1nux
Copy link

t1nux commented Jul 9, 2024

I am using imath-3.1.11-2 together with hip-runtime-amd-6.0.2-4 on Arch Linux, and I am getting this error during compilation:

/usr/include/Imath/half.h:989:7: error: type alias redefinition with different types ('Imath_3_1::half' vs '__half')
using half = IMATH_INTERNAL_NAMESPACE::half;
      ^
/opt/rocm/include/hip/amd_detail/amd_hip_fp16.h:1743:19: note: previous definition is here
            using half = __half;

It seems to be caused by the combination of this and that.

This must have been introduced by ROCM recently, since I did not get this in the past. I would have written this on ROCM, but there seems to be an exception in imath for CUDA already (see first link above, line 988), so I guess an appropriate exception for ROCM would also make sense.

For my purposes, I temporarily removed using half = IMATH_INTERNAL_NAMESPACE::half;, but maybe a cleaner solution might be more widely accepted.

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

No branches or pull requests

1 participant