[Openmp-dev] Target CUDA RTL --> CUDA error is: an illegal memory access was encountered

Itaru Kitayama via Openmp-dev openmp-dev at lists.llvm.org
Sat Jan 11 22:17:23 PST 2020


This doesn't get compile:

class AbsBase {
virtual int f() = 0;
};
class Derived : public AbsBase {
private:
int a;
public:
int f() { a = 1; return a; }
};

int main() {
#pragma omp target parallel for
for (int i=0;i<10;i++) {
Derived d;
}
}

$ clang++ -g -fopenmp -fopenmp-targets=nvptx64 test2.cpp
nvlink error   : Undefined reference to '__cxa_pure_virtual' in
'/tmp/test2-d564cf.cubin'
nvlink error   : Undefined reference to
'_ZTVN10__cxxabiv117__class_type_infoE' in '/tmp/test2-d564cf.cubin'
nvlink error   : Undefined reference to
'_ZTVN10__cxxabiv120__si_class_type_infoE' in '/tmp/test2-d564cf.cubin'
clang-10: error: nvlink command failed with exit code 255 (use -v to see
invocation)


On Sun, Jan 12, 2020 at 1:45 PM Doerfert, Johannes <jdoerfert at anl.gov>
wrote:

> On 01/12, Itaru Kitayama wrote:
> > Do you guys have a timeframe for that feature
> > Implemented?
>
> I do not and I don't know anyone who will drive this right now.
>
> As mentioned before, you should be able to "move/copy-create" the
> elements on the device in order to use virtual functions.
>
>
> > On Sun, Jan 12, 2020 at 12:51 Doerfert, Johannes <jdoerfert at anl.gov>
> wrote:
> >
> > > On 01/11, Alexey Bataev via Openmp-dev wrote:
> > > > Virtual functions are not supported.
> > >
> > > Not yet ;).
> > >
> > > We'll get it with 5.1 so we might actually implement it soon. Till
> then,
> > > you have to create the object on the device you call the virtual
> > > function.
> > >
>
> --
>
> Johannes Doerfert
> Researcher
>
> Argonne National Laboratory
> Lemont, IL 60439, USA
>
> jdoerfert at anl.gov
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20200112/9ed7a2ae/attachment.html>


More information about the Openmp-dev mailing list