vulkan asynchronous compute
https://www.youtube.com/watch?v=XOGIDMJThto
https://www.khronos.org/assets/uploads/developers/library/2016-vulkan-devday-uk/9-Asynchonous-compute.pdf
https://docs.microsoft.com/en-us/windows/win32/direct3d12/user-mode-heap-synchronization
https://gpuopen.com/concurrent-execution-asynchronous-queues/
通过queue的并行 增加GPU的并行
并发性 concurrency
Radeon™ Fury X GPU consists of 64 Compute Units (CUs), each of those containing 4 Single-Instruction-Multiple-Data units (SIMD) and each SIMD executes blocks of 64 threads, which we call a “wavefront”.
Since latency for memory access can cause significant stalls in shader execution, up to 10 wavefronts can be scheduled on each SIMD simultaneously to hide this latency.
GPU有64个CU
每个CU 4个SIMD
每个SIMD 64blocks ----- 一个wavefront
ps的计算在里面
GPU提升并发性 减小GPU idel
async compute
- Copy Queue(DirectX 12) / Transfer Queue (Vulkan): DMA transfers of data over the PCIe bus
- Compute queue (DirectX 12 and Vulkan): execute compute shaders or copy data, preferably within local memory
- Direct Queue (DirectX 12) / Graphics Queue (Vulkan): this queue can do anything, so it is similar to the main device in legacy APIs
这三种queue对应metal里面三种encoder 是为了增加上文所述并发性
对GPU底层的 操作这种可行性是通过这里的queue体现的
vulkan对queue的个数有限制 可以query
dx12没有这种个数限制
更多部分拿出来用cs做异步计算
看图--技能点还没点
problem shooting
- If resources are located in system memory accessing those from Graphics or Compute queues will have an impact on DMA queue performance and vice versa.
- Graphics and Compute queues accessing local memory (e.g. fetching texture data, writing to UAVs or performing rasterization-heavy tasks) can affect each other due to bandwidth limitations 带宽限制 数据onchip
- Threads sharing the same CU will share GPRs and LDS, so tasks that use all available resources may prevent asynchronous workloads to execute on the same CU
- Different queues share their caches. If multiple queues utilize the same caches this can result in more cache thrashing and reduce performance
Due to the reasons above it is recommended to determine bottlenecks for each pass and place passes with complementary bottlenecks next to each other:
- Compute shaders which make heavy use of LDS and ALU are usually good candidates for the asynchronous compute queue
- Depth only rendering passes are usually good candidates to have some compute tasks run next to it
- A common solution for efficient asynchronous compute usage can be to overlap the post processing of frame N with shadow map rendering of frame N+1
- Porting as much of the frame to compute will result in more flexibility when experimenting which tasks can be scheduled next to each other
- Splitting tasks into sub-tasks and interleaving them can reduce barriers and create opportunities for efficient async compute usage (e.g. instead of “for each light clear shadow map, render shadow, compute VSM” do “clear all shadow maps, render all shadow maps, compute VSM for all shadow maps”)
然后给异步计算的功能加上开关
看vulkan这个意思 它似乎没有metal2 那种persistent thread group 维持数据cs ps之间传递时还可以 on tile
vulkan asynchronous compute的更多相关文章
- Vulkan在Android使用Compute shader
oeip 相关功能只能运行在window平台,想移植到android平台,暂时选择vulkan做为图像处理,主要一是里面有单独的计算管线且支持好,二是熟悉下最新的渲染技术思路. 这个 demo(git ...
- android下vulkan与opengles纹理互通
先放demo源码地址:https://github.com/xxxzhou/aoce 06_mediaplayer 效果图: 主要几个点: 用ffmpeg打开rtmp流. 使用vulkan Compu ...
- 剖析虚幻渲染体系(13)- RHI补充篇:现代图形API之奥义与指南
目录 13.1 本篇概述 13.1.1 本篇内容 13.1.2 概念总览 13.1.3 现代图形API特点 13.2 设备上下文 13.2.1 启动流程 13.2.2 Device 13.2.3 Sw ...
- GPUImage移植总结
项目github地址: aoce 我是去年年底才知道有GPUImage这个项目,以前也一直没有在移动平台开发过,但是我在win平台有编写一个类似的项目oeip(不要关注了,所有功能都移植或快移植到ao ...
- Compute Resource Consolidation Pattern 计算资源整合模式
Consolidate multiple tasks or operations into a single computational unit. This pattern can increase ...
- 论文笔记之:Asynchronous Methods for Deep Reinforcement Learning
Asynchronous Methods for Deep Reinforcement Learning ICML 2016 深度强化学习最近被人发现貌似不太稳定,有人提出很多改善的方法,这些方法有很 ...
- Vulkan Tutorial 13 Render passes
操作系统:Windows8.1 显卡:Nivida GTX965M 开发工具:Visual Studio 2017 Setup 在我们完成管线的创建工作,我们接下来需要告诉Vulkan渲染时候使用的f ...
- Vulkan Tutorial 16 Command buffers
操作系统:Windows8.1 显卡:Nivida GTX965M 开发工具:Visual Studio 2017 诸如绘制和内存操作相关命令,在Vulkan中不是通过函数直接调用的.我们需要在命令缓 ...
- Vulkan Tutorial 29 Loading models
操作系统:Windows8.1 显卡:Nivida GTX965M 开发工具:Visual Studio 2017 Introduction 应用程序现在已经可以渲染纹理3D模型,但是 vertice ...
随机推荐
- kafka producer partitions分区器(七)
消息在经过拦截器.序列化后,就需要确定它发往哪个分区,如果在ProducerRecord中指定了partition字段,那么就不再需要partitioner分区器进行分区了,如果没有指定,那么会根据k ...
- 1、spring mvc jsp页面中文乱码
jsp 页面头部 的page标签中加个 contentType="text/html;charset=utf-8"
- cook,session
//发送session request.getSession().setAttribute("user", "zs1"); //发送cookie //需要自动登 ...
- Linux中实用的命令
1. 查看linux机器是32位还是64位的方法: 1.file /sbin/init 或者file /bin/ls (注意命令中的空格) /sbin/init: ELF64- ...
- 剑指offer14:输入一个链表,输出该链表中倒数第k个结点。
1. 题目描述 输入一个链表,输出该链表中倒数第k个结点. 2. 思路和方法 可以用两个指针,一个指针遍历到第k个结点的时候,第二个指针再走到第一个节点,然后两个指针的距离始终保持k-1.这样,当第一 ...
- thinkphp5日志文件权限的问题
由于www用户和root用户(比如command的cli进程日志)都有可能对log文件进行读写. 如果是由www用户创建的log文件,不会出任何问题. 但是如果是先由root用户创建的log文件,然后 ...
- Ubuntu系统降内核
本人安装的Ubuntu16.04.6系统原生内核为4.15.0,但安装的应用仅支持4.8.0以下内核,因此需要降内核.PS:降内核有风险,操作前请慎重 1.查看可用的内核 输入命令查看已经可用的内核 ...
- selenium弹框元素定位-冻结界面
有些网站上面的元素,我们鼠标放在上面,会动态弹出一些内容. 比如,百度首页的右上角,有个更多产品选项,如下图所示: 如果我们把鼠标放在上边,就会弹出下面的百度营销.音乐.图片等图标. 如果我们要用se ...
- T100——汇总错误消息显示
初始化 CALL cl_err_collect_init() 汇总消息显示 CALL cl_err_collect_show()
- 使ul中的li居中
1.如果li设置了float:left; 解决办法: 1.ul父元素的标签设置:text-align: center; 2.ul设置: display: inline-block; 2.li不设置fl ...