MXNET CMake reports "GPU support is disabled" - cmake

I am trying to build money from source in a GPU-enabled machine. I have a NVIDIA P 100 GPU. When I build MXNET using make, it reports that:
The snippet from CMake log is given below
-- The CUDA compiler identification is NVIDIA 10.2.89
-- Check for working CUDA compiler: /usr/local/cuda-10.2/bin/nvcc
-- Check for working CUDA compiler: /usr/local/cuda-10.2/bin/nvcc -- works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- GPU support is disabled
I want to build it with GPU support. What can I do?

When building MXNet from source, the message GPU support is disabled in the output of CMake is a bit confusing. This specific message has nothing to do with CUDA. It is actually generated if we try to enable Intel MKL DNN support (-DUSE_MKLDNN=1) and the Intel OpenCL runtime is not installed in the system ( see the CMake file in which it is printed ). CMake tries to look for Intel OpenCL runtime and throws this message if not found. I believe the OpenCL runtime enables GPU support for Intel's GPUs ( Intel HD Graphics, Intel Iris and Intel Iris Pro ).
Don't worry about this error message if you do not intend to use Intel Graphics support. It won't affect the CUDA support for MXNet. If you want to suppress this message, then disable MKL DNN support (-DUSE_MKLDNN=0). If you care about Intel Graphics too, then install Intel OpenCL Runtime.

Related

A program that supports different types of GPU

If i want to develop A program that supports different types of GPU.what should i do? I know that OPENCL can do this.but how OPENCL did this?
OpenCL is the best choice for vendor-independent GPU programming.
The way it works is runtime-compilation: You compile C++ to an executable and this executable contains the OpenCL C source code as text/string. When you run the executable on the CPU, it compiles the OpenCL C code specifically for the installed GPU. The OpenCL compiler is provided as part of the graphics driver. This way, you can copy the executable to another computer and there the contained OpenCL C code can compiled for a different GPU, all without having to recompile the executable.
This is similar to how Java works.

How to compile gpu offloading code with icc

I compiled gpu offloading with gcc 11 on centos machine and executed on nvidia with offload of nvptx-none
I have icc 18 in my machine. How to compile my gcc offloading with icc and target of nvidia gpus.
what are the compiler options to do it ??
Thanks in advance
You can try using icx or other compilers instead :
Link to the documentation: https://software.intel.com/content/www/us/en/develop/documentation/get-started-with-cpp-fortran-compiler-openmp/top.html#top_GUID-B965754E-4380-4B04-9377-8170E5030762

I'd like to manipulate the way using gpu in tensorflow lite, what can i study for that

At first, let me explain what i have to do.
My develop enviroment is Tizen OS. may be you are unfamilier that, anyway this os is using linux kernel based redhat and targeting on mobile, tv, etc.. And my target device is consists of exynos 5422 and arm mali-t628.
My main work is implement some gpu library to let tensorflow lite's operation can use the library.
I proceeded to build and install tensorflow lite as a rpm package file.
I am googling many times about the tensorflow and gpu. and get some useless information about cuda. i didnt see any info for my case(tizen and mali gpu).
i think linux have gpu instruction like the cpu or library.. but i cant find them.
can you suggest search keyword or document?
You can go to nvidia’s cuda toolkit page, where you can find the documentation and
Training buttons / options.
Also there’s the CUDA programming guide wich i myself find very usefull and helpull for CUDA.
I believe that one or two of those may help you.
CUDA is for NVidia GPU. Mali is not NVidia's, but ARM's. So you CANNOT use CUDA in your given hardware. Besides, if you want CUDA, you'd better drop Tensorflow-lite and use Tensorflow.
If you want to use CUDA, get a hardware with supported NVidia GPU (e.g., x64 machine with NVidia GPU). Note that you can use Tensorflow-GPU & CUDA/CUDNN in Tizen with x64+NVidia GPU. You just need to be careful on nvidia GPU kernel driver version and userspace driver version. Because NVidia's GPU userspace driver and CUDA/CUDNN are statically built, its Linux drivers are compatible with Tizen. (I've tested tensorflow-gpu, CUDA/CUDNN in Tizen with NVidia driver version 111... probably in winter, 2017)
If you want to use Tizen/Tensorflow-lite in the given hardware, forget CUDA.

What is SYCL 1.2?

I am trying to install tensorflow
Please specify the location where ComputeCpp for SYCL 1.2 is installed. [Default is /usr/local/computecpp]:
Invalid SYCL 1.2 library path. /usr/local/computecpp/lib/libComputeCpp.so cannot be found
What should I do?What is SYCL 1.2?
SYCL is a C++ abstraction layer for OpenCL. TensorFlow's experimental support for OpenCL uses SYCL, in conjunction with a SYCL-aware C++ compiler.
As Yaroslav pointed out in his comment, SYCL is only required if you are building TensorFlow with OpenCL support. The following question during the execution of ./configure asks about OpenCL support:
Do you wish to build TensorFlow with OpenCL support? [y/N]
If you answer N, you will not have to supply a SYCL path.
It is optional step so you can skip if you want.
OpenCL (Open Computing Language) is a framework for writing programs that execute across heterogeneous platforms consisting of central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), field-programmable gate arrays (FPGAs) and other processors or hardware accelerators.
so if you want to intall you have to Setting Up TensorFlow With OpenCL Using SYCL bellow link provide step by step information about it
https://developer.codeplay.com/computecppce/latest/getting-started-with-tensorflow

Using OpenCL in linux and IDEs

For using OpenCL in linux should I have NVIDIA GPU?
In my computer I have an Intel GPU and i3 Intel CPU supported SSE3 and SSE4, I want program whith OpenCL in windows can I use an other IDE than "Visual Studio" for example "Code Blocks"?
Thank you
You can use OpenCL with any GPU, as it can run on a CPU as well (that's one of the strong points of OpenCL vs CUDA and the like).
But if you want OpenCL to actually use your GPU and not (or not only) your CPU, you will have to have a driver for your GPU which supports OpenCL, e.g. AMD or NVIDIA. Intel also lists Intel HD and Intel Iris graphic chips as supported through their OpenCL SDK, but you should probably check what you're actually running on if you want to make sure (e.g. check at the start of your program - see Appendix A).
Also, OpenCL has NOTHING to do with CPU extensions like SSE (specific implementations may use SSE/AVX/whatever CPU extension for better performance, but OpenCL does not require any of those per se), or with the IDE you use, and only very little with operating system. So you're free to use whichever IDE you want to (at the end, the IDE is only the editor you write your code with). In the case of Visual Studio people often tend to mix IDE with compiler, as Visual Studio uses it's own compiler per default, but afaik even there you're free to change it to e.g. the mingw or cygwin provided compiler, or use the icc. (Feel free to correct me on the Visual Studio part as I've only tested it once before completely wiping it forever)
Appendix A: How to check which devices can be used by OpenCL on a given system http://dhruba.name/2012/08/14/opencl-cookbook-listing-all-devices-and-their-critical-attributes/