Open
Description
Environment
Operating System: (Arch Linux)
Version: (openvdb-12.0.0)
Other: (compiler: hipcc)
Describe the bug
While using openvdb-12.0.0, when using #include <openvdb/openvdb.h>
in code and compiling it with hipcc
(ROCM), I get this error:
In file included from test.cpp:1:
In file included from /usr/include/openvdb/openvdb.h:8:
/usr/include/openvdb/Types.h:701:19: error: use of overloaded operator '+' is ambiguous (with operand types 'const math::half' (aka 'const __half') and 'const float')
701 | *op = *ip + s;
| ~~~ ^ ~
/usr/include/openvdb/Types.h:701:19: note: built-in candidate operator+(float, float)
/usr/include/openvdb/Types.h:701:19: note: built-in candidate operator+(double, float)
/usr/include/openvdb/Types.h:701:19: note: built-in candidate operator+(long double, float)
/usr/include/openvdb/Types.h:701:19: note: built-in candidate operator+(int, float)
/usr/include/openvdb/Types.h:701:19: note: built-in candidate operator+(long, float)
/usr/include/openvdb/Types.h:701:19: note: built-in candidate operator+(long long, float)
/usr/include/openvdb/Types.h:701:19: note: built-in candidate operator+(unsigned int, float)
/usr/include/openvdb/Types.h:701:19: note: built-in candidate operator+(unsigned long, float)
/usr/include/openvdb/Types.h:701:19: note: built-in candidate operator+(unsigned long long, float)
1 error generated when compiling for gfx1100.
failed to execute:/opt/rocm/lib/llvm/bin/clang++ -isystem "/opt/rocm/include" --offload-arch=gfx1100 -O3 -c -x hip test.cpp -o "test.o" -std=c++17
To Reproduce
Steps to reproduce the behavior:
- Install openvdb-12.0.0
- Add
#include <openvdb/openvdb.h>
- Compile with
hipcc
- See error.
Expected behavior
No error.
Additional context
- Compiling with
g++
and openvdb-12.0.0 works. - Compiling with
hipcc
and openvdb-11.0.0 works.