You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Related to #134) Ran hipify-clang /path/to/NVIDIA_CUDA-10.2_Samples/0_Simple/simpleMultiCopy/simpleMultiCopy.cu --skip-excluded-preprocessor-conditional-blocks -- -I/path/to/NVIDIA_CUDA-10.2_Samples/common/inc and got
/tmp/simpleMultiCopy.cu-2fb81b.hip:128:7: error: no matching function for call to 'max'
max((32.0f / (_ConvertSMVer2Cores(deviceProp.major, deviceProp.minor) *
...
...
/usr/local/cuda-10.2/include/crt/math_functions.hpp:1079:31: note: candidate function not viable: call to __device__ function from __host__ function
__MATH_FUNCTIONS_DECL__ float max(float a, float b)
even though __MATH_FUNCTIONS_DECL__ is defined as `__host__ __device__' in math_functions.hpp.
The text was updated successfully, but these errors were encountered:
wuren2020
changed the title
Errors when processing the NVIDIA sample "simpleMultiCopy"
[HIPIFY] Errors when processing the NVIDIA sample "simpleMultiCopy"
Jun 19, 2020
The simpleMultiCopy.cu file should be modified so that it includes the <algorithm> header and uses the std namespace because the std::max function is defined in that header, as explained here.
(Related to #134) Ran
hipify-clang /path/to/NVIDIA_CUDA-10.2_Samples/0_Simple/simpleMultiCopy/simpleMultiCopy.cu --skip-excluded-preprocessor-conditional-blocks -- -I/path/to/NVIDIA_CUDA-10.2_Samples/common/inc
and goteven though __MATH_FUNCTIONS_DECL__ is defined as `__host__ __device__' in math_functions.hpp.
The text was updated successfully, but these errors were encountered: