本文介绍了AMD与NVIDIA.他们在OpenCL的支持方面有何区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个EC2实例.它的规格是:

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.

我有两个问题:

1. .在此系统上安装CUDA工具包后,使用clinfo时,我得到以下输出:

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.

我的问题是:这是一种好习惯吗?使用OpenCL进行编码时会使用GPU吗?

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

2. .另外,如果我安装AMD APP SDK,该怎么办?能够通过OpenCL使用Nvidia图形卡还是仅使用Intel CPU?

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?

我在具有相同规格的另一个ec2实例上安装了AMD APP SDK,并从clinfo中发现了以下内容:

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)

这是否意味着OpenCL将只能使用CPU.而GPU(nVidia)将永远不会被使用?如果是这种情况,那么我应该回到nVidia CUDA工具包中以使OpenCL使用GPU还是有其他更好的做法?

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?

在这两个中,我应该使用哪一个? CUDA工具包?还是AMD APP SDK?我的目的是在各种GPU上运行OpenCL跨平台.

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.

推荐答案

您可以安装多个OpenCL平台(NVIDIA CUDA,AMD APP,Intel). GPU的实际OpenCL实现是显示驱动程序的一部分. AMD APP还带有用于CPU(AMD或Intel)的OpenCL驱动程序.

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也有自己的OpenCL平台,它们应该支持计算机中安装的CPU和GPU.

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

因此,如果您想在服务器上使用NVIDIA GPU,则可能应该使用NVIDIA CUDA平台,尽管有人声称也可以使用AMD APP.从理论上讲,只要您安装了NVIDIA OpenCL运行时驱动程序,任何平台都可以使用.

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.

这篇关于AMD与NVIDIA.他们在OpenCL的支持方面有何区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 22:34