[Bug target/98862] Complex reduction support in offload region

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jan 28 14:18:18 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98862

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #1)
> libstdc++-v3 isn't supported ATM on either nvptx* or amdgcn* offloading, so
> if one needs anything from libstdc++, it will not work.

I can confirm that it does not work with '-O0', showing that the
symbol
   _ZNSt7complexIfEC1Eff
alias
   std::complex<float>::complex(float, float)
is missing.

But:

> As for the 16 byte atomics, I thought this was meant to be solved through
> -latomic, but I might misremember.

Yes,
  $ g++ -fopenmp -O2 complex_reduction.cpp -foffload=-latomic
works – both compiling and running (on nvptx).

Note the added '-foffload=-latomic' (and -O2).
See also: https://gcc.gnu.org/wiki/Offloading#Compilation_options


More information about the Gcc-bugs mailing list