[Openmp-dev] OpenMP offloading to the sm_35 device from x86 compute nodes
Jonas Hahnfeld via Openmp-dev
openmp-dev at lists.llvm.org
Sat Mar 16 02:57:39 PDT 2019
Hi,
On 2019-03-16 09:09, Itaru Kitayama via Openmp-dev wrote:
> Doru et al.,
> After checking the CUDA_ROOT environment variable gets set properly, I
> configured the
> Makefile for my application with CMake, however:
>
> -- Could NOT find LIBOMPTARGET_DEP_LIBFFI (missing:
> LIBOMPTARGET_DEP_LIBFFI_LIBRARIES
> LIBOMPTARGET_DEP_LIBFFI_INCLUDE_DIRS)
> CMake Warning (dev) at
> /p/project/cjzam11/kitayama1/projects/llvm-project/openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake:117
> (find_package):
> Policy CMP0074 is not set: find_package uses <PackageName>_ROOT
> variables.
> Run "cmake --help-policy CMP0074" for policy details. Use the
> cmake_policy
> command to set the policy and suppress this warning.
>
> Environment variable CUDA_ROOT is set to:
>
> /usr/local/software/jureca/Stages/2018b/software/CUDA/9.2.88
>
> For compatibility, CMake is ignoring the variable.
> Call Stack (most recent call first):
>
> /p/project/cjzam11/kitayama1/projects/llvm-project/openmp/libomptarget/CMakeLists.txt:30
> (include)
> This warning is for project developers. Use -Wno-dev to suppress it.
>
> -- LIBOMPTARGET: Building offloading runtime library libomptarget.
> -- LIBOMPTARGET: Not building aarch64 offloading plugin: machine not
> found in the system.
> -- LIBOMPTARGET: Building CUDA offloading plugin.
> -- LIBOMPTARGET: Not building PPC64 offloading plugin: machine not
> found in the system.
> -- LIBOMPTARGET: Not building PPC64le offloading plugin: machine not
> found in the system.
> -- LIBOMPTARGET: Not building x86_64 offloading plugin: libffi
> dependency not found.
> -- LIBOMPTARGET: Building CUDA offloading device RTL.
This looks good so far: You'll get the CUDA offloading plugin and the
pure CUDA device RTL.
(libffi is needed for host-offloading which you don't need for Nvidia
GPUs...)
> CMake Error at
> /p/project/cjzam11/kitayama1/projects/llvm-project/openmp/libomptarget/cmake/Modules/LibomptargetUtils.cmake:26
> (message):
> LIBOMPTARGET: Cannot build CUDA LLVM bitcode offloading device RTL!
> Call Stack (most recent call first):
>
> /p/project/cjzam11/kitayama1/projects/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt:115
> (libomptarget_error_say)
This is the code path when you manually specify
LIBOMPTARGET_NVPTX_ENABLE_BCLIB, but have no capable compiler. This
needs a (more or less) recent Clang compiler, what's your
CMAKE_CXX_COMPILER?
Regarding the earlier errors about manually specified variables: Yes,
the warning about LIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES could be
related to CMake not finding CUDA, but the one about
CLANG_OPENMP_NVPTX_DEFAULT_ARCH is not: Clang does not have a build-time
dependency to CUDA and this variable is used unconditionally. Are you
sure your set -DLLVM_ENABLE_PROJECTS=clang;openmp without typos in the
initial cmake invocation? (you don't need llvm because that's the root
project that you're pointing CMake to)
Cheers,
Jonas
> I'm at today's HEAD of Trunk of llvm-project.
>
> On Sat, Mar 16, 2019 at 6:27 AM Gheorghe-Teod Bercea
> <Gheorghe-Teod.Bercea at ibm.com> wrote:
>
>> This typically happens when cmake cannot find the CUDA installation.
>>
>> Thanks,
>>
>> --Doru
>>
>> From: Itaru Kitayama via Openmp-dev
>> <openmp-dev at lists.llvm.org>
>> To: Lukas Sommer <sommer at esa.tu-darmstadt.de>
>> Cc: openmp-dev at lists.llvm.org
>> Date: 03/15/2019 04:50 PM
>> Subject: Re: [Openmp-dev] OpenMP offloading to the sm_35
>> device from x86 compute nodes
>> Sent by: "Openmp-dev" <openmp-dev-bounces at lists.llvm.org>
>>
>> -------------------------
>>
>> At the HEAD of Trunk of llvm-project, CMake seems to disregards
>> these variables:
>> [...]
>> CMake Warning:
>> Manually-specified variables were not used by the project:
>>
>> CLANG_OPENMP_NVPTX_DEFAULT_ARCH
>> LIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES
>>
>> Have you had a chance to build the latest one?
>>
>> On Fri, Mar 15, 2019 at 6:28 PM Lukas Sommer via Openmp-dev
>> <openmp-dev at lists.llvm.org> wrote:
>> Hi,
>>
>> I've been building the offloading toolchain for Nvidia GPUs on
>> x86-systems before and found Jonas Hahnfeld's blog-post extremely
>> useful to setup the compiler:
>>
>>
> https://www.hahnjo.de/blog/2018/10/08/clang-7.0-openmp-offloading-nvidia.html
>> [1]
>>
>> Best regards,
>>
>> Lukas Sommer
>>
>> On 3/15/19 10:23 AM, Alexey Bataev via Openmp-dev wrote:
>> I'm not sure about it, there are some others who can help with this.
>>
>> Best regards,
>> Alexey Bataev
>>
>> 15 марта 2019 г., в 5:08, Itaru Kitayama
>> <itaru.kitayama at gmail.com> написал(а):
>>
>> Thanks. Does setting
>>
>> LLVM_ENABLE_PROJECTS:STRING=clang;openmp;llvm
>>
>> enough to create the corresponding .bc lib?
>>
>> On Fri, Mar 15, 2019 at 6:01 PM Alexey Bataev <a.bataev at hotmail.com>
>> wrote:
>> Yes, it should support it.
>>
>> Best regards,
>> Alexey Bataev
>>
>>> 15 марта 2019 г., в 4:55, Itaru Kitayama via Openmp-dev
>> <openmp-dev at lists.llvm.org> написал(а):
>>>
>>> Hi,
>>> I'm wondering if LLVM/Clang supports OpenMP offloading to NVIDA
>>> targets from x86 nodes.
>>>
>>> Thanks,
>>> Itaru.
>>> _______________________________________________
>>> Openmp-dev mailing list
>>> Openmp-dev at lists.llvm.org
>>> https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev [2]
>>
>> _______________________________________________
>> Openmp-dev mailing list
>> Openmp-dev at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev [2]
>>
>> _______________________________________________
>> Openmp-dev mailing list
>> Openmp-dev at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
>> [2]_______________________________________________
>> Openmp-dev mailing list
>> Openmp-dev at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev [2]
>
>
> Links:
> ------
> [1]
> https://www.hahnjo.de/blog/2018/10/08/clang-7.0-openmp-offloading-nvidia.html
> [2] https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
More information about the Openmp-dev
mailing list