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的更多相关文章

  1. Vulkan在Android使用Compute shader

    oeip 相关功能只能运行在window平台,想移植到android平台,暂时选择vulkan做为图像处理,主要一是里面有单独的计算管线且支持好,二是熟悉下最新的渲染技术思路. 这个 demo(git ...

  2. android下vulkan与opengles纹理互通

    先放demo源码地址:https://github.com/xxxzhou/aoce 06_mediaplayer 效果图: 主要几个点: 用ffmpeg打开rtmp流. 使用vulkan Compu ...

  3. 剖析虚幻渲染体系(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 ...

  4. GPUImage移植总结

    项目github地址: aoce 我是去年年底才知道有GPUImage这个项目,以前也一直没有在移动平台开发过,但是我在win平台有编写一个类似的项目oeip(不要关注了,所有功能都移植或快移植到ao ...

  5. Compute Resource Consolidation Pattern 计算资源整合模式

    Consolidate multiple tasks or operations into a single computational unit. This pattern can increase ...

  6. 论文笔记之:Asynchronous Methods for Deep Reinforcement Learning

    Asynchronous Methods for Deep Reinforcement Learning ICML 2016 深度强化学习最近被人发现貌似不太稳定,有人提出很多改善的方法,这些方法有很 ...

  7. Vulkan Tutorial 13 Render passes

    操作系统:Windows8.1 显卡:Nivida GTX965M 开发工具:Visual Studio 2017 Setup 在我们完成管线的创建工作,我们接下来需要告诉Vulkan渲染时候使用的f ...

  8. Vulkan Tutorial 16 Command buffers

    操作系统:Windows8.1 显卡:Nivida GTX965M 开发工具:Visual Studio 2017 诸如绘制和内存操作相关命令,在Vulkan中不是通过函数直接调用的.我们需要在命令缓 ...

  9. Vulkan Tutorial 29 Loading models

    操作系统:Windows8.1 显卡:Nivida GTX965M 开发工具:Visual Studio 2017 Introduction 应用程序现在已经可以渲染纹理3D模型,但是 vertice ...

随机推荐

  1. Springboot 使用Jwt token失效时接口无响应(乌龙)

    问题背景:新项目使用Springboot框架,鉴权使用了Jwt 处理cors: @Configuration public class WebMvcConfig implements WebMvcCo ...

  2. PTA(Basic Level)1039.到底买不买

    小红想买些珠子做一串自己喜欢的珠串.卖珠子的摊主有很多串五颜六色的珠串,但是不肯把任何一串拆散了卖.于是小红要你帮忙判断一下,某串珠子里是否包含了全部自己想要的珠子?如果是,那么告诉她有多少多余的珠子 ...

  3. js穿梭框;将两个table中的数据选中移动

    将table中选中的数据移动到右边: 点击一行中的任意一个位置,使其选中: 注:attr()和prop()都是jquery的方法: .attr() : 获取匹配的元素集合中的第一个元素的属性的值 或 ...

  4. Kettle无法打开文件资源库

    问题: Kettle无法打开文件资源库. 问题描述: 新建文件资源库之后,资源库路径中有中文路径.退出kettle之后,再次进去发现没有了右上角的connect按钮了. 原因: kettle的repo ...

  5. 【AtCoder】Mujin Programming Challenge 2017

    Mujin Programming Challenge 2017 A - Robot Racing 如果每个数都是一个一个间隔开的,那么答案是\(n!\) 考虑把一个数挪到1,第二个数挪到3,以此类推 ...

  6. C/C++快读(快速读入)有多——安全AC

    在一些算法题目中中,有的程序会被卡常(数),就是说,程序虽然渐进复杂度,(通俗来讲:算法的时间复杂度)可以接受,但因为算法本身的时间常数过大,导致程序在一些算法竞赛中超时.这是,快读就显得尤为重要了. ...

  7. Kindergarten(网络流解法)

    题意:http://acm.hdu.edu.cn/showproblem.php?pid=2458 问你二分图的最大团是多大. #define IOS ios_base::sync_with_stdi ...

  8. spark异常篇-集群模式无法打印

    在集群上运行 spark 时候,对 RDD 进行 foreach(print) 并没有打印任何内容,这是怎么回事呢? 这是因为 RDD 运行在各个 worker 上,foreach 是对 各个 wor ...

  9. 移动端测试之APP安全测试

    现在APP测试已经是测试行业的一个重要分支,对APP测试技能和经验的要求也越来越高,看到一篇关于APP安全测试的总结,分享给需要的朋友.1.软件权限1)扣费风险:包括发送短信.拨打电话.连接网络等2) ...

  10. Scala学习十五——注解

    一.本章要点 可以为类.方法.字段.局部变量.参数.表达式.类型参数以及各种类型定义添加注解 对于表达式和类型,注解跟在被注解的条目之后 注解的形式有@Annotation.@Annotation(v ...