running opencl c kernels on vulkan for fun and profit · © 2018 adobe systems incorporated. all...
TRANSCRIPT
© 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Running OpenCL C Kernels on Vulkan for Fun and ProfitEric Berdahl | Sr. Engineering Manager, Mobile Video Products
© 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
SIGGRAPH 2017 Khronos BoF Memories
© Copyright Khronos Group 2017 - Page 60
Vulkan Compute
Ralph Potter, Codeplay
Porting OpenCL C to Vulkan
2
CLSPV Compiler
OpenCL C Clang
(OpenCL C Frontend)
SPIR 1.2
(LLVM IR)
CLSPV Module PassesDescriptor
MapVulkan SPIR-V
Acknowledgements
David Neto
John Kessenich
Neil Henning
JinGu KangEric Berdahl
15 August 2018Adobe – SIGGRAPH 2018 Khronos BoF
© 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Adobe Premiere Pro CC
3
15 August 2018Adobe – SIGGRAPH 2018 Khronos BoF
workflows and user experience
Mercury Playback Engine
+=
© 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Thought Experiment: Mercury Playback Everywhere?
4
15 August 2018Adobe – SIGGRAPH 2018 Khronos BoF
Mercury Playback Engine
CUDA, OpenCL, Metal CUDA, OpenCL Metal Vulkan?
© 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Managing Complexity
15 August 2018
Adobe – SIGGRAPH 2018 Khronos BoF
5
• Great Flexibility• Expensive to rewrite
large amounts of code
• Greatest breadth and impact
• Sensitive to quality and performance
Tremendous leverage!
© 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Observations
▪ Vulkan and SPIR-V today are sufficient to host compute shaders written in novel languages
▪ In the App+Driver+Compiler triad, the compiler has huge advantages!
▪ Clspv has allowed us to compile several hundred thousand lines of OpenCL C code to SPIR-V (graphics) with minimal changes
▪ The Clspv experience revealed coverage gaps in Vulkan CTS
▪ We have improved CTS coverage
▪ Compilers are remarkably agile for working around bugs in drivers
▪ Clspv is today an insanely useful prototype with which I’m building a commercial Android product
6
15 August 2018Adobe – SIGGRAPH 2018 Khronos BoF
© 2018 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Project Rush – Unveiled at VidCon 2018
7
15 August 2018Adobe – SIGGRAPH 2018 Khronos BoF