std::complex support needed
https://github.com/ye-luo/openmp-target/blob/master/hands-on/tests/complex/complex.cpp
$ clang++ -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -march=native -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx906 complex.cpp
lld: error: undefined symbol: __mulsc3
>>> referenced by /tmp/complex-gfx906-72c03e-gfx906-c2b83e.o:(__omp_offloading_10304_2920ae4__Z8test_mulIfSt7complexIfES1_EvT0_T1__l59)
>>> referenced by /tmp/complex-gfx906-72c03e-gfx906-c2b83e.o:(__omp_offloading_10304_2920ae4__Z8test_mulIfSt7complexIfES1_EvT0_T1__l59)
lld: error: undefined symbol: __divsc3
>>> referenced by /tmp/complex-gfx906-72c03e-gfx906-c2b83e.o:(__omp_offloading_10304_2920ae4__Z8test_divIfSt7complexIfES1_EvT0_T1__l76)
>>> referenced by /tmp/complex-gfx906-72c03e-gfx906-c2b83e.o:(__omp_offloading_10304_2920ae4__Z8test_divIfSt7complexIfES1_EvT0_T1__l76)
>>> referenced by /tmp/complex-gfx906-72c03e-gfx906-c2b83e.o:(__omp_offloading_10304_2920ae4__Z8test_divIffSt7complexIfEEvT0_T1__l76)
>>> referenced by /tmp/complex-gfx906-72c03e-gfx906-c2b83e.o:(__omp_offloading_10304_2920ae4__Z8test_divIffSt7complexIfEEvT0_T1__l76)
lld: error: undefined symbol: __muldc3
>>> referenced by /tmp/complex-gfx906-72c03e-gfx906-c2b83e.o:(__omp_offloading_10304_2920ae4__Z8test_mulIdSt7complexIdES1_EvT0_T1__l59)
>>> referenced by /tmp/complex-gfx906-72c03e-gfx906-c2b83e.o:(__omp_offloading_10304_2920ae4__Z8test_mulIdSt7complexIdES1_EvT0_T1__l59)
lld: error: undefined symbol: __divdc3
>>> referenced by /tmp/complex-gfx906-72c03e-gfx906-c2b83e.o:(__omp_offloading_10304_2920ae4__Z8test_divIdSt7complexIdES1_EvT0_T1__l76)
>>> referenced by /tmp/complex-gfx906-72c03e-gfx906-c2b83e.o:(__omp_offloading_10304_2920ae4__Z8test_divIdSt7complexIdES1_EvT0_T1__l76)
>>> referenced by /tmp/complex-gfx906-72c03e-gfx906-c2b83e.o:(__omp_offloading_10304_2920ae4__Z8test_divIddSt7complexIdEEvT0_T1__l76)
>>> referenced by /tmp/complex-gfx906-72c03e-gfx906-c2b83e.o:(__omp_offloading_10304_2920ae4__Z8test_divIddSt7complexIdEEvT0_T1__l76)
clang-11: error: amdgcn-link command failed with exit code 1 (use -v to see invocation)
For host execution, which library is used for these complex functions. Is it -lm or something like -lboost? What is your command line for compiling complex.cpp?
The command line on the first line in the description. I tried removing the offload options and get the following.
$ nm a.out |grep muldc
U __muldc3@@GCC_4.0.0
from /lib/x86_64-linux-gnu/libgcc_s.so.1
Thanks Ye Luo. Jan is going to try to get this fixed with the math lib soon.
FWIW, this is the fix for upstream: https://reviews.llvm.org/D80897
I added the upstream code to our libm recently.
11.7-1 works with default optimization, -O3, -O3 -ffast-math. As long as I add -g, the compiler stops.
I tried with -g, it is very slow, but it doesn't stop. After some time I was getting an error in the Dwarf emitter instead.
Assertion `DwarfRegs.size() == 1' failed.
I believe we saw this on another smoke test. We will work on this soon.
Works fine with 17.0-1