[Openmp-dev] [EXTERNAL] undefined reference to `llvm_omp_target_alloc_shared

Huber, Joseph via Openmp-dev openmp-dev at lists.llvm.org
Thu Jun 10 04:48:01 PDT 2021


Yes, but you will need to cast the returned void pointer and declare the function `extern "C"` so the name doesn't get mangled.
________________________________
From: Itaru Kitayama <itaru.kitayama at gmail.com>
Sent: Thursday, June 10, 2021 1:23 AM
To: Huber, Joseph <huberjn at ornl.gov>
Cc: openmp-dev <openmp-dev at lists.llvm.org>
Subject: Re: [EXTERNAL] [Openmp-dev] undefined reference to `llvm_omp_target_alloc_shared

Hi Joseph, all,
I was looking at too the test code in the libomptarget/test/api
directory, and it can be built with today's main branch Clang.

However, are the llvm_ prefixed omp_targer_allocs callable from C++ codes?

On Wed, Jun 9, 2021 at 9:48 PM Huber, Joseph <huberjn at ornl.gov> wrote:
>
> The special allocators are supported upstream only for the nvptx64 target. The library interface was added in March and the nvptx64 implementation in May. The test file `omp_device_managed_memory.c` gives an example usage.
> ________________________________
> From: Openmp-dev <openmp-dev-bounces at lists.llvm.org> on behalf of Itaru Kitayama via Openmp-dev <openmp-dev at lists.llvm.org>
> Sent: Wednesday, June 9, 2021 1:30 AM
> To: openmp-dev <openmp-dev at lists.llvm.org>
> Subject: [EXTERNAL] [Openmp-dev] undefined reference to `llvm_omp_target_alloc_shared
>
> I'd like to use llvm_omp_targe_alloc_shared(), but can't link with Clang 12;
> are they available in main?
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20210610/b933417e/attachment.html>


More information about the Openmp-dev mailing list