AMD vs NVIDIA. How do they differentiate in terms of support of OpenCL?

匿名 (未验证) 提交于 2019-12-03 01:36:02

问题:

I have an EC2 instance. It's specs are:

g2.2xlarge Instance. Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz NVIDIA GRID GPU (Kepler GK104) with Ubuntu 14.04 - 64 bit.

I have two questions:

1. After installing the CUDA toolkit on this system, I have the following output when using clinfo:

clinfo: /usr/local/cuda-8.0/targets/x86_64-linux/lib/libOpenCL.so.1: no version information available (required by clinfo)  Platform Version:                OpenCL 1.2 CUDA 8.0.46 Platform Name:                   NVIDIA CUDA Platform Vendor:                 NVIDIA Corporation  Number of devices:               1   Device Type:                   CL_DEVICE_TYPE_GPU   Name:                          GRID K520   Vendor:                        NVIDIA Corporation   Device OpenCL C version:       OpenCL C 1.2    Driver version:                367.57   Profile:                       FULL_PROFILE   Version:                       OpenCL 1.2 CUDA //with other info too which I can paste if required.

My question is: Is this a good practice? Will the GPU be used when coding with OpenCL?

2. Also what if I install the AMD APP SDK? Would that be able to use the Nvidia Graphic Card using OpenCL or will it use only the Intel CPU?

I installed the AMD APP SDK on another ec2 instance with the same specs and found out the following from clinfo:

Platform Version:                OpenCL 1.2 AMD-APP (1214.3) Platform Name:                   AMD Accelerated Parallel Processing Platform Vendor:                 Advanced Micro Devices, Inc.  Number of devices:               1   Device Type:                   CL_DEVICE_TYPE_CPU   Name:                          Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz   Vendor:                        GenuineIntel   Device OpenCL C version:       OpenCL C 1.2    Driver version:                1214.3 (sse2,avx)   Profile:                       FULL_PROFILE   Version:                       OpenCL 1.2 AMD-APP (1214.3)

Does it mean that OpenCL will only be able to use the CPU. And the GPU (nVidia) will never be used? If this is the case, then should I turn back to the nVidia CUDA toolkit to make OpenCL use the GPU or is there some other way/better practise?

Out of the two, which one should I use? The CUDA tool kit? or the AMD APP SDK? My purpose is to run OpenCL cross-platform on all kinds of GPUs.

回答1:

You can have multiple OpenCL platforms installed (NVIDIA CUDA, AMD APP, Intel). The actual OpenCL implementation for GPUs is part of the display driver. The AMD APP also comes with an OpenCL driver for the CPU (AMD or Intel).

Apple also has their own OpenCL platform, they should support the CPU and GPU installed in the machine.

So, if you want to use the NVIDIA GPU on your server, you probably should use the NVIDIA CUDA platform, although some have claimed that it should be possible to use AMD APP as well. In theory any platform should work as long as you have the NVIDIA OpenCL runtime driver installed.



易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!