OpenACC是否会脱离正常的GPU渲染? [英] Does OpenACC take away from the normal GPU Rendering?

查看:122
本文介绍了OpenACC是否会脱离正常的GPU渲染?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试确定是否可以使用OpenACC代替常规的CPU串行执行调用.通常,我的编程全部是关于3D编程的,或者通常以某种方式使用GPU. IE.图像处理或其他需要使用着色器的渲染类型.我正在尝试弄清楚这个图书馆是否会让我受益.

I'm trying to figure out if I can use OpenACC in place of normal CPU serial execution calls. Usually my programming is all about 3D programming, or uses the GPU normally in some way. I.E. Image processing, or some other type of rendering that requires the use of shaders. I'm trying to figure out if this Library would benefit me or not.

我之所以这样问,是因为如果我(尽可能快地)渲染3D图形,它会减慢该过程吗?或者它是否能够维持(理论上)高帧频".

The reason I ask this is because if I'm rendering 3D Graphics (as fast as possible) would it slow down that process in away? Or is it able to maintain it's (in theory) "high frame rates" or not.

如果是这样,要权衡些什么?我不愿意放弃3D图形(显示)性能来增强可以在CPU上串行执行的操作.

If so, what's the trade off, and how much? I'm not willing to loose 3D Graphics (display) performance to enhance operations that can be done on the CPU serially.

这是C ++上下文.

This is a C++ context.

推荐答案

在我熟悉的AMD和NVIDIA GPU上,OpenACC程序将利用着色器程序在某种程度上也会使用的计算资源. GPU中还有许多其他图形硬件,它们在计算和图形之间不共享,但是有一些共享资源.同样,GPU可以通过PCIE连接到系统,因此这也可以呈现一个共享资源或竞争点(但是,这是罕见的计算或图形程序,甚至可能会耗尽现代Gen3 x16 PCIE的带宽.连接.)

On the AMD and NVIDIA GPUs that I am familiar with, OpenACC programs will make use of compute resources that would also be used to some degree by shader programs. There are many other pieces of graphics hardware in a GPU that are not shared between compute and graphics, but there are some shared resources. Likewise, the GPU may be connected to the system by PCIE, and so this can also present a shared resource or contention point (however it's the rare compute or graphics program that would even come close to using up the bandwidth of a modern Gen3 x16 PCIE connection.)

因此,如果同时使用图形(或计算)着色器和OpenACC加速,则在一定程度上会争用资源.我不能一概而论,争执的程度或权衡取舍.这将在很大程度上取决于程序的细节以及计算功能和图形功能的范围和详细顺序.

So if you were using both graphics (or compute) shaders, as well as OpenACC acceleration, there would be contention for resources, to some degree. The level of contention, or the trade off, is not something that I can generalize about. It will depend very much on the specifics of your program, and the extent and the detail sequencing of the compute functions and the graphics functions.

GPU设计师牢记这些类型的用例,因此GPU通常非常擅长在可能竞争资源的各种任务之间进行快速上下文切换.

GPU designers have these types of use-cases in mind, and so GPUs are generally pretty good at rapid context switching between the various tasks that may compete for resources.

这篇关于OpenACC是否会脱离正常的GPU渲染?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆