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

Compilation Warning resulting from non-trivial half precision type (MacOS build, homebrew gcc-10) #4

Closed
bjoo opened this issue Jan 5, 2021 · 0 comments

Comments

@bjoo
Copy link
Contributor

bjoo commented Jan 5, 2021

Hi,
As discussed in my MacOS documentation PR, the compilation gives a warning related to using memcpy to copy a non-trivial type used for half precision

/Users/36j/Devel/HIP-CPU/HIP-CPU/examples/bit_extract/../../include/hip/hip_fp16.h:898:43:   required from here
/Users/36j/Devel/HIP-CPU/HIP-CPU/examples/bit_extract/../../include/hip/../../src/include/hip/detail/helpers.hpp:46:32: warning: 'void* memcpy(void*, const void*, size_t)' copying an object of non-trivial type 'class half_float::half' from an array of 'const short int' [-Wclass-memaccess]
   46 |                     std::memcpy(&r, &v, sizeof(T));
      |                     ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~

This appearst to be known (and is benign) I am just noting it here for later cleanup.

@bjoo bjoo changed the title Compilation Warning resulting from non-trivial half precision type (MacOS build) Compilation Warning resulting from non-trivial half precision type (MacOS build, homebrew gcc-10) Jan 5, 2021
@AlexVlx AlexVlx closed this as completed in 9b1f60d Jan 6, 2021
AlexVlx added a commit that referenced this issue Jan 6, 2021
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