ROCm / hip-tests

MIT License
29 stars 31 forks source link

[Issue]: Tests fail to compile `error: assigning to 'float' from incompatible type '__hip_bfloat16'` #461

Closed pvelesko closed 5 months ago

pvelesko commented 5 months ago

Problem Description

[2/733] Building CXX object catch_tests/unit/deviceLib/CMakeFiles/UnitDeviceTests.dir/bfloat16.cc.o
FAILED: catch_tests/unit/deviceLib/CMakeFiles/UnitDeviceTests.dir/bfloat16.cc.o
/opt/rocm/bin/hipcc -DKERNELS_PATH=\"/home/pvelesko/hip-tests/catch/kernels/\" -I/home/pvelesko/hip-tests/catch/external/Catch2 -I/home/pvelesko/hip-tests/catch/./include -I/home/pvelesko/hip-tests/catch/./kernels -I/opt/rocm/include -I/home/pvelesko/hip-tests/catch/external/picojson --std=c++17 --offload-arch=gfx906   -Wall -Wextra -Wvla -Werror -Wno-deprecated -Wno-option-ignored -MD -MT catch_tests/unit/deviceLib/CMakeFiles/UnitDeviceTests.dir/bfloat16.cc.o -MF catch_tests/unit/deviceLib/CMakeFiles/UnitDeviceTests.dir/bfloat16.cc.o.d -o catch_tests/unit/deviceLib/CMakeFiles/UnitDeviceTests.dir/bfloat16.cc.o -c /home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc
/home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc:411:14: error: assigning to 'float' from incompatible type '__hip_bfloat16'
  411 |     out[i] = __hip_bfloat16(in[i]);
      |              ^~~~~~~~~~~~~~~~~~~~~
/home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc:472:20: error: no viable conversion from 'float' to '__hip_bfloat16'
  472 |     __hip_bfloat16 val = in[i];
      |                    ^     ~~~~~
/opt/rocm-6.1.0/include/hip/amd_detail/amd_hip_bf16.h:122:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'float' to 'const __hip_bfloat16 &' for 1st argument
  122 | struct __hip_bfloat16 {
      |        ^~~~~~~~~~~~~~
/opt/rocm-6.1.0/include/hip/amd_detail/amd_hip_bf16.h:122:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'float' to '__hip_bfloat16 &&' for 1st argument
  122 | struct __hip_bfloat16 {
      |        ^~~~~~~~~~~~~~
/home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc:473:20: error: no viable conversion from 'float' to '__hip_bfloat16'
  473 |     __hip_bfloat16 other_val = __hne(__float2bfloat16(1.0f), val) ? 1.0f : 2.0f;
      |                    ^           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/rocm-6.1.0/include/hip/amd_detail/amd_hip_bf16.h:122:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'float' to 'const __hip_bfloat16 &' for 1st argument
  122 | struct __hip_bfloat16 {
      |        ^~~~~~~~~~~~~~
/opt/rocm-6.1.0/include/hip/amd_detail/amd_hip_bf16.h:122:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'float' to '__hip_bfloat16 &&' for 1st argument
  122 | struct __hip_bfloat16 {
      |        ^~~~~~~~~~~~~~
/home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc:474:21: error: no matching constructor for initialization of '__hip_bfloat162'
  474 |     __hip_bfloat162 temp1(val, other_val);
      |                     ^     ~~~~~~~~~~~~~~
/opt/rocm-6.1.0/include/hip/amd_detail/amd_hip_bf16.h:127:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
  127 | struct __hip_bfloat162 {
      |        ^~~~~~~~~~~~~~~
/opt/rocm-6.1.0/include/hip/amd_detail/amd_hip_bf16.h:127:8: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 2 were provided
  127 | struct __hip_bfloat162 {
      |        ^~~~~~~~~~~~~~~
/opt/rocm-6.1.0/include/hip/amd_detail/amd_hip_bf16.h:127:8: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 2 were provided
/home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc:475:21: error: no matching constructor for initialization of '__hip_bfloat162'
  475 |     __hip_bfloat162 temp2(other_val, val);
      |                     ^     ~~~~~~~~~~~~~~
/opt/rocm-6.1.0/include/hip/amd_detail/amd_hip_bf16.h:127:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
  127 | struct __hip_bfloat162 {
      |        ^~~~~~~~~~~~~~~
/opt/rocm-6.1.0/include/hip/amd_detail/amd_hip_bf16.h:127:8: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 2 were provided
  127 | struct __hip_bfloat162 {
      |        ^~~~~~~~~~~~~~~
/opt/rocm-6.1.0/include/hip/amd_detail/amd_hip_bf16.h:127:8: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 2 were provided
/home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc:411:14: error: no matching conversion for functional-style cast from 'unsigned short' to '__hip_bfloat16'
  411 |     out[i] = __hip_bfloat16(in[i]);
      |              ^~~~~~~~~~~~~~~~~~~~
/home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc:445:21: note: in instantiation of function template specialization 'bf16_cvt_to_integral<unsigned short>' requested here
  445 |   auto cvt_kernel = bf16_cvt_to_integral<TestType>;
      |                     ^
/home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc:415:1: note: in instantiation of function template specialization '____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____76<unsigned short>' requested here
  415 | TEMPLATE_TEST_CASE("Unit_bf16_conversion_to_integral_type", , unsigned short, short, int,
      | ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:17629:35: note: expanded from macro 'TEMPLATE_TEST_CASE'
 17629 | #define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )
       |                                   ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:1113:125: note: expanded from macro 'INTERNAL_CATCH_TEMPLATE_TEST_CASE'
 1113 |         INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ )
      |                                                                                                                             ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:466:46: note: expanded from macro 'INTERNAL_CATCH_UNIQUE_NAME'
  466 | #  define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ )
      |                                              ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:464:55: note: expanded from macro 'INTERNAL_CATCH_UNIQUE_NAME_LINE'
  464 | #define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line )
      |                                                       ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:463:56: note: expanded from macro 'INTERNAL_CATCH_UNIQUE_NAME_LINE2'
  463 | #define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line
      |                                                        ^
<scratch space>:54:1: note: expanded from here
   54 | ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____76
      | ^
/home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc:415:1: note: in instantiation of function template specialization '(anonymous namespace)::ns_____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77::reg_test<unsigned short>' requested here
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:17629:35: note: expanded from macro 'TEMPLATE_TEST_CASE'
 17629 | #define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )
       |                                   ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:1113:9: note: expanded from macro 'INTERNAL_CATCH_TEMPLATE_TEST_CASE'
 1113 |         INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ )
      |         ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:1099:37: note: expanded from macro 'INTERNAL_CATCH_TEMPLATE_TEST_CASE_2'
 1099 |                     (void)expander{(reg_test(Types{}, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index]), Tags } ), index++)... };/* NOLINT */ \
      |                                     ^
/home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc:415:1: note: in instantiation of member function '(anonymous namespace)::ns_____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77::____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77<(anonymous namespace)::ns_____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77::TypeList<unsigned short>, (anonymous namespace)::ns_____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77::TypeList<short>, (anonymous namespace)::ns_____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77::TypeList<int>, (anonymous namespace)::ns_____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77::TypeList<unsigned int>>::____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77' requested here
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:17629:35: note: expanded from macro 'TEMPLATE_TEST_CASE'
 17629 | #define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )
       |                                   ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:1113:46: note: expanded from macro 'INTERNAL_CATCH_TEMPLATE_TEST_CASE'
 1113 |         INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ )
      |                                              ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:466:46: note: expanded from macro 'INTERNAL_CATCH_UNIQUE_NAME'
  466 | #  define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ )
      |                                              ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:464:55: note: expanded from macro 'INTERNAL_CATCH_UNIQUE_NAME_LINE'
  464 | #define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line )
      |                                                       ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:463:56: note: expanded from macro 'INTERNAL_CATCH_UNIQUE_NAME_LINE2'
  463 | #define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line
      |                                                        ^
<scratch space>:56:1: note: expanded from here
   56 | ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77
      | ^
/opt/rocm-6.1.0/include/hip/amd_detail/amd_hip_bf16.h:122:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'unsigned short' to 'const __hip_bfloat16' for 1st argument
  122 | struct __hip_bfloat16 {
      |        ^~~~~~~~~~~~~~
/opt/rocm-6.1.0/include/hip/amd_detail/amd_hip_bf16.h:122:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'unsigned short' to '__hip_bfloat16' for 1st argument
  122 | struct __hip_bfloat16 {
      |        ^~~~~~~~~~~~~~
/opt/rocm-6.1.0/include/hip/amd_detail/amd_hip_bf16.h:122:8: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 1 was provided
/home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc:411:14: error: no matching conversion for functional-style cast from 'short' to '__hip_bfloat16'
  411 |     out[i] = __hip_bfloat16(in[i]);
      |              ^~~~~~~~~~~~~~~~~~~~
/home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc:445:21: note: in instantiation of function template specialization 'bf16_cvt_to_integral<short>' requested here
  445 |   auto cvt_kernel = bf16_cvt_to_integral<TestType>;
      |                     ^
/home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc:415:1: note: in instantiation of function template specialization '____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____76<short>' requested here
  415 | TEMPLATE_TEST_CASE("Unit_bf16_conversion_to_integral_type", , unsigned short, short, int,
      | ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:17629:35: note: expanded from macro 'TEMPLATE_TEST_CASE'
 17629 | #define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )
       |                                   ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:1113:125: note: expanded from macro 'INTERNAL_CATCH_TEMPLATE_TEST_CASE'
 1113 |         INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ )
      |                                                                                                                             ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:466:46: note: expanded from macro 'INTERNAL_CATCH_UNIQUE_NAME'
  466 | #  define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ )
      |                                              ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:464:55: note: expanded from macro 'INTERNAL_CATCH_UNIQUE_NAME_LINE'
  464 | #define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line )
      |                                                       ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:463:56: note: expanded from macro 'INTERNAL_CATCH_UNIQUE_NAME_LINE2'
  463 | #define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line
      |                                                        ^
<scratch space>:54:1: note: expanded from here
   54 | ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____76
      | ^
/home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc:415:1: note: in instantiation of function template specialization '(anonymous namespace)::ns_____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77::reg_test<short>' requested here
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:17629:35: note: expanded from macro 'TEMPLATE_TEST_CASE'
 17629 | #define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )
       |                                   ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:1113:9: note: expanded from macro 'INTERNAL_CATCH_TEMPLATE_TEST_CASE'
 1113 |         INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ )
      |         ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:1099:37: note: expanded from macro 'INTERNAL_CATCH_TEMPLATE_TEST_CASE_2'
 1099 |                     (void)expander{(reg_test(Types{}, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index]), Tags } ), index++)... };/* NOLINT */ \
      |                                     ^
/home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc:415:1: note: in instantiation of member function '(anonymous namespace)::ns_____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77::____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77<(anonymous namespace)::ns_____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77::TypeList<unsigned short>, (anonymous namespace)::ns_____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77::TypeList<short>, (anonymous namespace)::ns_____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77::TypeList<int>, (anonymous namespace)::ns_____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77::TypeList<unsigned int>>::____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77' requested here
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:17629:35: note: expanded from macro 'TEMPLATE_TEST_CASE'
 17629 | #define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )
       |                                   ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:1113:46: note: expanded from macro 'INTERNAL_CATCH_TEMPLATE_TEST_CASE'
 1113 |         INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ )
      |                                              ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:466:46: note: expanded from macro 'INTERNAL_CATCH_UNIQUE_NAME'
  466 | #  define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ )
      |                                              ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:464:55: note: expanded from macro 'INTERNAL_CATCH_UNIQUE_NAME_LINE'
  464 | #define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line )
      |                                                       ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:463:56: note: expanded from macro 'INTERNAL_CATCH_UNIQUE_NAME_LINE2'
  463 | #define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line
      |                                                        ^
<scratch space>:56:1: note: expanded from here
   56 | ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77
      | ^
/opt/rocm-6.1.0/include/hip/amd_detail/amd_hip_bf16.h:122:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'short' to 'const __hip_bfloat16' for 1st argument
  122 | struct __hip_bfloat16 {
      |        ^~~~~~~~~~~~~~
/opt/rocm-6.1.0/include/hip/amd_detail/amd_hip_bf16.h:122:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'short' to '__hip_bfloat16' for 1st argument
  122 | struct __hip_bfloat16 {
      |        ^~~~~~~~~~~~~~
/opt/rocm-6.1.0/include/hip/amd_detail/amd_hip_bf16.h:122:8: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 1 was provided
/home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc:411:14: error: no matching conversion for functional-style cast from 'int' to '__hip_bfloat16'
  411 |     out[i] = __hip_bfloat16(in[i]);
      |              ^~~~~~~~~~~~~~~~~~~~
/home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc:445:21: note: in instantiation of function template specialization 'bf16_cvt_to_integral<int>' requested here
  445 |   auto cvt_kernel = bf16_cvt_to_integral<TestType>;
      |                     ^
/home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc:415:1: note: in instantiation of function template specialization '____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____76<int>' requested here
  415 | TEMPLATE_TEST_CASE("Unit_bf16_conversion_to_integral_type", , unsigned short, short, int,
      | ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:17629:35: note: expanded from macro 'TEMPLATE_TEST_CASE'
 17629 | #define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )
       |                                   ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:1113:125: note: expanded from macro 'INTERNAL_CATCH_TEMPLATE_TEST_CASE'
 1113 |         INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ )
      |                                                                                                                             ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:466:46: note: expanded from macro 'INTERNAL_CATCH_UNIQUE_NAME'
  466 | #  define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ )
      |                                              ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:464:55: note: expanded from macro 'INTERNAL_CATCH_UNIQUE_NAME_LINE'
  464 | #define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line )
      |                                                       ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:463:56: note: expanded from macro 'INTERNAL_CATCH_UNIQUE_NAME_LINE2'
  463 | #define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line
      |                                                        ^
<scratch space>:54:1: note: expanded from here
   54 | ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____76
      | ^
/home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc:415:1: note: in instantiation of function template specialization '(anonymous namespace)::ns_____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77::reg_test<int>' requested here
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:17629:35: note: expanded from macro 'TEMPLATE_TEST_CASE'
 17629 | #define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )
       |                                   ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:1113:9: note: expanded from macro 'INTERNAL_CATCH_TEMPLATE_TEST_CASE'
 1113 |         INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ )
      |         ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:1099:37: note: expanded from macro 'INTERNAL_CATCH_TEMPLATE_TEST_CASE_2'
 1099 |                     (void)expander{(reg_test(Types{}, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index]), Tags } ), index++)... };/* NOLINT */ \
      |                                     ^
/home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc:415:1: note: in instantiation of member function '(anonymous namespace)::ns_____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77::____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77<(anonymous namespace)::ns_____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77::TypeList<unsigned short>, (anonymous namespace)::ns_____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77::TypeList<short>, (anonymous namespace)::ns_____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77::TypeList<int>, (anonymous namespace)::ns_____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77::TypeList<unsigned int>>::____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77' requested here
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:17629:35: note: expanded from macro 'TEMPLATE_TEST_CASE'
 17629 | #define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )
       |                                   ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:1113:46: note: expanded from macro 'INTERNAL_CATCH_TEMPLATE_TEST_CASE'
 1113 |         INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ )
      |                                              ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:466:46: note: expanded from macro 'INTERNAL_CATCH_UNIQUE_NAME'
  466 | #  define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ )
      |                                              ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:464:55: note: expanded from macro 'INTERNAL_CATCH_UNIQUE_NAME_LINE'
  464 | #define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line )
      |                                                       ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:463:56: note: expanded from macro 'INTERNAL_CATCH_UNIQUE_NAME_LINE2'
  463 | #define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line
      |                                                        ^
<scratch space>:56:1: note: expanded from here
   56 | ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77
      | ^
/opt/rocm-6.1.0/include/hip/amd_detail/amd_hip_bf16.h:122:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to 'const __hip_bfloat16' for 1st argument
  122 | struct __hip_bfloat16 {
      |        ^~~~~~~~~~~~~~
/opt/rocm-6.1.0/include/hip/amd_detail/amd_hip_bf16.h:122:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'int' to '__hip_bfloat16' for 1st argument
  122 | struct __hip_bfloat16 {
      |        ^~~~~~~~~~~~~~
/opt/rocm-6.1.0/include/hip/amd_detail/amd_hip_bf16.h:122:8: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 1 was provided
/home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc:411:14: error: no matching conversion for functional-style cast from 'unsigned int' to '__hip_bfloat16'
  411 |     out[i] = __hip_bfloat16(in[i]);
      |              ^~~~~~~~~~~~~~~~~~~~
/home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc:445:21: note: in instantiation of function template specialization 'bf16_cvt_to_integral<unsigned int>' requested here
  445 |   auto cvt_kernel = bf16_cvt_to_integral<TestType>;
      |                     ^
/home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc:415:1: note: in instantiation of function template specialization '____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____76<unsigned int>' requested here
  415 | TEMPLATE_TEST_CASE("Unit_bf16_conversion_to_integral_type", , unsigned short, short, int,
      | ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:17629:35: note: expanded from macro 'TEMPLATE_TEST_CASE'
 17629 | #define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )
       |                                   ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:1113:125: note: expanded from macro 'INTERNAL_CATCH_TEMPLATE_TEST_CASE'
 1113 |         INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ )
      |                                                                                                                             ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:466:46: note: expanded from macro 'INTERNAL_CATCH_UNIQUE_NAME'
  466 | #  define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ )
      |                                              ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:464:55: note: expanded from macro 'INTERNAL_CATCH_UNIQUE_NAME_LINE'
  464 | #define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line )
      |                                                       ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:463:56: note: expanded from macro 'INTERNAL_CATCH_UNIQUE_NAME_LINE2'
  463 | #define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line
      |                                                        ^
<scratch space>:54:1: note: expanded from here
   54 | ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____76
      | ^
/home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc:415:1: note: in instantiation of function template specialization '(anonymous namespace)::ns_____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77::reg_test<unsigned int>' requested here
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:17629:35: note: expanded from macro 'TEMPLATE_TEST_CASE'
 17629 | #define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )
       |                                   ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:1113:9: note: expanded from macro 'INTERNAL_CATCH_TEMPLATE_TEST_CASE'
 1113 |         INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ )
      |         ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:1099:37: note: expanded from macro 'INTERNAL_CATCH_TEMPLATE_TEST_CASE_2'
 1099 |                     (void)expander{(reg_test(Types{}, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index]), Tags } ), index++)... };/* NOLINT */ \
      |                                     ^
/home/pvelesko/hip-tests/catch/unit/deviceLib/bfloat16.cc:415:1: note: in instantiation of member function '(anonymous namespace)::ns_____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77::____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77<(anonymous namespace)::ns_____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77::TypeList<unsigned short>, (anonymous namespace)::ns_____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77::TypeList<short>, (anonymous namespace)::ns_____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77::TypeList<int>, (anonymous namespace)::ns_____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77::TypeList<unsigned int>>::____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77' requested here
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:17629:35: note: expanded from macro 'TEMPLATE_TEST_CASE'
 17629 | #define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )
       |                                   ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:1113:46: note: expanded from macro 'INTERNAL_CATCH_TEMPLATE_TEST_CASE'
 1113 |         INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ )
      |                                              ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:466:46: note: expanded from macro 'INTERNAL_CATCH_UNIQUE_NAME'
  466 | #  define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ )
      |                                              ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:464:55: note: expanded from macro 'INTERNAL_CATCH_UNIQUE_NAME_LINE'
  464 | #define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line )
      |                                                       ^
/home/pvelesko/hip-tests/catch/external/Catch2/catch.hpp:463:56: note: expanded from macro 'INTERNAL_CATCH_UNIQUE_NAME_LINE2'
  463 | #define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line
      |                                                        ^
<scratch space>:56:1: note: expanded from here
   56 | ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____77
      | ^
/opt/rocm-6.1.0/include/hip/amd_detail/amd_hip_bf16.h:122:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'unsigned int' to 'const __hip_bfloat16' for 1st argument
  122 | struct __hip_bfloat16 {
      |        ^~~~~~~~~~~~~~
/opt/rocm-6.1.0/include/hip/amd_detail/amd_hip_bf16.h:122:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'unsigned int' to '__hip_bfloat16' for 1st argument
  122 | struct __hip_bfloat16 {
      |        ^~~~~~~~~~~~~~
/opt/rocm-6.1.0/include/hip/amd_detail/amd_hip_bf16.h:122:8: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 1 was provided
9 errors generated when compiling for gfx906.
ninja: build stopped: subcommand failed.

Operating System

Linux cupcake 6.5.0-28-generic #29~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr 4 14:39:20 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

CPU

13th Gen Intel(R) Core(TM) i9-13900K

GPU

AMD Radeon VII

ROCm Version

ROCm 6.1.0

ROCm Component

HIP

Steps to Reproduce

No response

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

ROCk module version 6.7.0 is loaded
=====================
HSA System Attributes
=====================
Runtime Version:         1.13
Runtime Ext Version:     1.4
System Timestamp Freq.:  1000.000000MHz
Sig. Max Wait Duration:  18446744073709551615 (0xFFFFFFFFFFFFFFFF) (timestamp count)
Machine Model:           LARGE
System Endianness:       LITTLE
Mwaitx:                  DISABLED
DMAbuf Support:          YES

==========
HSA Agents
==========
*******
Agent 1
*******
  Name:                    13th Gen Intel(R) Core(TM) i9-13900K
  Uuid:                    CPU-XX
  Marketing Name:          13th Gen Intel(R) Core(TM) i9-13900K
  Vendor Name:             CPU
  Feature:                 None specified
  Profile:                 FULL_PROFILE
  Float Round Mode:        NEAR
  Max Queue Number:        0(0x0)
  Queue Min Size:          0(0x0)
  Queue Max Size:          0(0x0)
  Queue Type:              MULTI
  Node:                    0
  Device Type:             CPU
  Cache Info:
    L1:                      32768(0x8000) KB
  Chip ID:                 0(0x0)
  ASIC Revision:           0(0x0)
  Cacheline Size:          64(0x40)
  Max Clock Freq. (MHz):   3000
  BDFID:                   0
  Internal Node ID:        0
  Compute Unit:            32
  SIMDs per CU:            0
  Shader Engines:          0
  Shader Arrs. per Eng.:   0
  WatchPts on Addr. Ranges:1
  Features:                None
  Pool Info:
    Pool 1
      Segment:                 GLOBAL; FLAGS: FINE GRAINED
      Size:                    65590780(0x3e8d5fc) KB
      Allocatable:             TRUE
      Alloc Granule:           4KB
      Alloc Recommended Granule:4KB
      Alloc Alignment:         4KB
      Accessible by all:       TRUE
    Pool 2
      Segment:                 GLOBAL; FLAGS: KERNARG, FINE GRAINED
      Size:                    65590780(0x3e8d5fc) KB
      Allocatable:             TRUE
      Alloc Granule:           4KB
      Alloc Recommended Granule:4KB
      Alloc Alignment:         4KB
      Accessible by all:       TRUE
    Pool 3
      Segment:                 GLOBAL; FLAGS: COARSE GRAINED
      Size:                    65590780(0x3e8d5fc) KB
      Allocatable:             TRUE
      Alloc Granule:           4KB
      Alloc Recommended Granule:4KB
      Alloc Alignment:         4KB
      Accessible by all:       TRUE
  ISA Info:
*******
Agent 2
*******
  Name:                    gfx906
  Uuid:                    GPU-a5de794172dc768b
  Marketing Name:          AMD Radeon VII
  Vendor Name:             AMD
  Feature:                 KERNEL_DISPATCH
  Profile:                 BASE_PROFILE
  Float Round Mode:        NEAR
  Max Queue Number:        128(0x80)
  Queue Min Size:          64(0x40)
  Queue Max Size:          131072(0x20000)
  Queue Type:              MULTI
  Node:                    1
  Device Type:             GPU
  Cache Info:
    L1:                      16(0x10) KB
    L2:                      8192(0x2000) KB
  Chip ID:                 26287(0x66af)
  ASIC Revision:           1(0x1)
  Cacheline Size:          64(0x40)
  Max Clock Freq. (MHz):   1801
  BDFID:                   2560
  Internal Node ID:        1
  Compute Unit:            60
  SIMDs per CU:            4
  Shader Engines:          4
  Shader Arrs. per Eng.:   1
  WatchPts on Addr. Ranges:4
  Coherent Host Access:    FALSE
  Features:                KERNEL_DISPATCH
  Fast F16 Operation:      TRUE
  Wavefront Size:          64(0x40)
  Workgroup Max Size:      1024(0x400)
  Workgroup Max Size per Dimension:
    x                        1024(0x400)
    y                        1024(0x400)
    z                        1024(0x400)
  Max Waves Per CU:        40(0x28)
  Max Work-item Per CU:    2560(0xa00)
  Grid Max Size:           4294967295(0xffffffff)
  Grid Max Size per Dimension:
    x                        4294967295(0xffffffff)
    y                        4294967295(0xffffffff)
    z                        4294967295(0xffffffff)
  Max fbarriers/Workgrp:   32
  Packet Processor uCode:: 471
  SDMA engine uCode::      145
  IOMMU Support::          None
  Pool Info:
    Pool 1
      Segment:                 GLOBAL; FLAGS: COARSE GRAINED
      Size:                    16760832(0xffc000) KB
      Allocatable:             TRUE
      Alloc Granule:           4KB
      Alloc Recommended Granule:2048KB
      Alloc Alignment:         4KB
      Accessible by all:       FALSE
    Pool 2
      Segment:                 GLOBAL; FLAGS: EXTENDED FINE GRAINED
      Size:                    16760832(0xffc000) KB
      Allocatable:             TRUE
      Alloc Granule:           4KB
      Alloc Recommended Granule:2048KB
      Alloc Alignment:         4KB
      Accessible by all:       FALSE
    Pool 3
      Segment:                 GROUP
      Size:                    64(0x40) KB
      Allocatable:             FALSE
      Alloc Granule:           0KB
      Alloc Recommended Granule:0KB
      Alloc Alignment:         0KB
      Accessible by all:       FALSE
  ISA Info:
    ISA 1
      Name:                    amdgcn-amd-amdhsa--gfx906:sramecc+:xnack-
      Machine Models:          HSA_MACHINE_MODEL_LARGE
      Profiles:                HSA_PROFILE_BASE
      Default Rounding Mode:   NEAR
      Default Rounding Mode:   NEAR
      Fast f16:                TRUE
      Workgroup Max Size:      1024(0x400)
      Workgroup Max Size per Dimension:
        x                        1024(0x400)
        y                        1024(0x400)
        z                        1024(0x400)
      Grid Max Size:           4294967295(0xffffffff)
      Grid Max Size per Dimension:
        x                        4294967295(0xffffffff)
        y                        4294967295(0xffffffff)
        z                        4294967295(0xffffffff)
      FBarrier Max Size:       32
*** Done ***

Additional Information

No response

pvelesko commented 5 months ago

resolved by checking rocm-6.1.1 instead of develop