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
The following source fails to compile on ROCm v1.7.1:
#include <hcc/hc.hpp>
#include <iostream>
#include <limits>
void f(float *data) [[hc]] [[cpu]] {
*data = std::numeric_limits<float>::infinity();
}
int main(void){
float data = 0.0f;
constexpr int N = 1;
hc::array_view<float, 1> v_data(N, &data);
hc::parallel_for_each( hc::extent<1>(N), [=](hc::index<1> i) [[hc]] { f(v_data.accelerator_pointer()); } );
v_data.synchronize();
std::cout << data << std::endl;
return 0;
}
with error:
error: 'std::numeric_limits<float>::infinity': no overloaded function has restriction specifiers that are
compatible with the ambient context 'f'
*data = std::numeric_limits<float>::infinity();
^
1 error generated.
Hi @ekondis , please refer to the updated comments from @AlexVlx in the original HIP issue. Essentially the usage is not officially supported in hip/hcc.
Could you fix it in your code base?
The following source fails to compile on ROCm v1.7.1:
with error:
This issue was first reported for HIP (Issue-374)
The text was updated successfully, but these errors were encountered: