The Opencl Specification

Total Page:16

File Type:pdf, Size:1020Kb

The Opencl Specification The OpenCL Specification Version: 2.0 Document Revision: 22 Khronos OpenCL Working Group Editor: Aaftab Munshi Last Revision Date: 3/18/14 Page 1 1. INTRODUCTION ............................................................................................................... 10 2. GLOSSARY ......................................................................................................................... 12 3. THE OPENCL ARCHITECTURE .................................................................................... 23 3.1 Platform Model ................................................................................................................................ 23 3.2 Execution Model .............................................................................................................................. 25 3.2.1 Execution Model: Mapping work-items onto an NDRange ........................................................................28 3.2.2 Execution Model: Execution of kernel-instances ........................................................................................30 3.2.3 Execution Model: Device-side enqueue ......................................................................................................31 3.2.4 Execution Model: Synchronization .............................................................................................................32 3.2.5 Execution Model: Categories of Kernels ....................................................................................................33 3.3 Memory Model ................................................................................................................................. 34 3.3.1 Memory Model: Fundamental Memory Regions .......................................................................................34 3.3.2 Memory Model: Memory Objects ...............................................................................................................37 3.3.3 Memory Model: Shared Virtual Memory ...................................................................................................39 3.3.4 Memory Model: Memory Consistency Model ...........................................................................................40 3.3.5 Memory Model: Overview of atomic and fence operations ......................................................................43 3.3.6 Memory Model: Memory Ordering Rules .................................................................................................44 3.3.6.1 Memory Ordering Rules: Atomic Operations ....................................................................................................... 47 3.3.6.2 Memory Ordering Rules: Fence Operations ......................................................................................................... 50 3.3.6.3 Memory Ordering Rules: Work-group Functions ................................................................................................. 51 3.3.6.4 Memory Ordering Rules: Host-side and Device-side Commands ......................................................................... 52 3.4 The OpenCL Framework ................................................................................................................ 54 3.4.1 OpenCL Framework: Mixed Version Support ............................................................................................55 4. THE OPENCL PLATFORM LAYER .............................................................................. 56 4.1 Querying Platform Info ................................................................................................................... 56 4.2 Querying Devices ............................................................................................................................. 58 4.3 Partitioning a Device ....................................................................................................................... 77 4.4 Contexts ............................................................................................................................................ 82 5. THE OPENCL RUNTIME ................................................................................................. 89 5.1 Command Queues ............................................................................................................................ 89 5.2 Buffer Objects .................................................................................................................................. 95 5.2.1 Creating Buffer Objects ..............................................................................................................................95 5.2.2 Reading, Writing and Copying Buffer Objects .........................................................................................101 5.2.3 Filling Buffer Objects ................................................................................................................................113 5.2.4 Mapping Buffer Objects ............................................................................................................................115 Last Revision Date: 3/18/14 Page 2 5.3 Image Objects ................................................................................................................................. 119 5.3.1 Creating Image Objects .............................................................................................................................119 5.3.1.1 Image Format Descriptor ..................................................................................................................................... 122 5.3.1.2 Image Descriptor .................................................................................................................................................. 124 5.3.2 Querying List of Supported Image Formats ..............................................................................................126 5.3.2.1 Minimum List of Supported Image Formats ....................................................................................................... 128 5.3.3 Reading, Writing and Copying Image Objects .........................................................................................130 5.3.4 Filling Image Objects ................................................................................................................................137 5.3.5 Copying between Image and Buffer Objects ............................................................................................139 5.3.6 Mapping Image Objects ............................................................................................................................144 5.3.7 Image Object Queries ................................................................................................................................147 5.4 Pipes ................................................................................................................................................ 150 5.4.1 Creating Pipe Objects ................................................................................................................................150 5.4.2 Pipe Object Queries ...................................................................................................................................151 5.5 Querying, Unmapping, Migrating, Retaining and Releasing Memory Objects ...................... 153 5.5.1 Retaining and Releasing Memory Objects ................................................................................................153 5.5.2 Unmapping Mapped Memory Objects ......................................................................................................155 5.5.3 Accessing mapped regions of a memory object ........................................................................................157 5.5.4 Migrating Memory Objects .......................................................................................................................158 5.5.5 Memory Object Queries ............................................................................................................................160 5.6 Shared Virtual Memory ................................................................................................................ 164 5.6.1 SVM sharing granularity: coarse- and fine- grained sharing ...................................................................164 5.6.2 Memory consistency for SVM allocations ................................................................................................177 5.7 Sampler Objects ............................................................................................................................. 179 5.7.1 Creating Sampler Objects ..........................................................................................................................179 5.7.2 Sampler Object Queries ............................................................................................................................181 5.8 Program Objects ............................................................................................................................ 183 5.8.1 Creating Program Objects .........................................................................................................................183 5.8.2 Building Program Executables ..................................................................................................................188
Recommended publications
  • GLSL 4.50 Spec
    The OpenGL® Shading Language Language Version: 4.50 Document Revision: 7 09-May-2017 Editor: John Kessenich, Google Version 1.1 Authors: John Kessenich, Dave Baldwin, Randi Rost Copyright (c) 2008-2017 The Khronos Group Inc. All Rights Reserved. This specification is protected by copyright laws and contains material proprietary to the Khronos Group, Inc. It or any components may not be reproduced, republished, distributed, transmitted, displayed, broadcast, or otherwise exploited in any manner without the express prior written permission of Khronos Group. You may use this specification for implementing the functionality therein, without altering or removing any trademark, copyright or other notice from the specification, but the receipt or possession of this specification does not convey any rights to reproduce, disclose, or distribute its contents, or to manufacture, use, or sell anything that it may describe, in whole or in part. Khronos Group grants express permission to any current Promoter, Contributor or Adopter member of Khronos to copy and redistribute UNMODIFIED versions of this specification in any fashion, provided that NO CHARGE is made for the specification and the latest available update of the specification for any version of the API is used whenever possible. Such distributed specification may be reformatted AS LONG AS the contents of the specification are not changed in any way. The specification may be incorporated into a product that is sold as long as such product includes significant independent work developed by the seller. A link to the current version of this specification on the Khronos Group website should be included whenever possible with specification distributions.
    [Show full text]
  • Report of Contributions
    X.Org Developers Conference 2020 Report of Contributions https://xdc2020.x.org/e/XDC2020 X.Org Developer … / Report of Contributions State of text input on Wayland Contribution ID: 1 Type: not specified State of text input on Wayland Wednesday, 16 September 2020 20:15 (5 minutes) Between the last impromptu talk at GUADEC 2018, text input on Wayland has become more organized and more widely adopted. As before, the three-pronged approach of text_input, in- put_method, and virtual keyboard still causes confusion, but increased interest in implementing it helps find problems and come closer to something that really works for many usecases. The talk will mention how a broken assumption causes a broken protocol, and why we’re notdone with Wayland input methods yet. It’s recommended to people who want to know more about the current state of input methods on Wayland. Recommended background: aforementioned GUADEC talk, wayland-protocols reposi- tory, my blog: https://dcz_self.gitlab.io/ Code of Conduct Yes GSoC, EVoC or Outreachy No Primary author: DCZ, Dorota Session Classification: Demos / Lightning talks I Track Classification: Lightning Talk September 30, 2021 Page 1 X.Org Developer … / Report of Contributions IGT GPU Tools 2020 Update Contribution ID: 2 Type: not specified IGT GPU Tools 2020 Update Wednesday, 16 September 2020 20:00 (5 minutes) Short update on IGT - what has changed in the last year, where are we right now and what we have planned for the near future. IGT GPU Tools is a collection of tools and tests aiding development of DRM drivers. It’s widely used by Intel in its public CI system.
    [Show full text]
  • GLSL Specification
    The OpenGL® Shading Language Language Version: 4.60 Document Revision: 3 23-Jul-2017 Editor: John Kessenich, Google Version 1.1 Authors: John Kessenich, Dave Baldwin, Randi Rost Copyright (c) 2008-2017 The Khronos Group Inc. All Rights Reserved. This specification is protected by copyright laws and contains material proprietary to the Khronos Group, Inc. It or any components may not be reproduced, republished, distributed, transmitted, displayed, broadcast, or otherwise exploited in any manner without the express prior written permission of Khronos Group. You may use this specification for implementing the functionality therein, without altering or removing any trademark, copyright or other notice from the specification, but the receipt or possession of this specification does not convey any rights to reproduce, disclose, or distribute its contents, or to manufacture, use, or sell anything that it may describe, in whole or in part. Khronos Group grants express permission to any current Promoter, Contributor or Adopter member of Khronos to copy and redistribute UNMODIFIED versions of this specification in any fashion, provided that NO CHARGE is made for the specification and the latest available update of the specification for any version of the API is used whenever possible. Such distributed specification may be reformatted AS LONG AS the contents of the specification are not changed in any way. The specification may be incorporated into a product that is sold as long as such product includes significant independent work developed by the seller. A link to the current version of this specification on the Khronos Group website should be included whenever possible with specification distributions.
    [Show full text]
  • Blackberry QNX Multimedia Suite
    PRODUCT BRIEF QNX Multimedia Suite The QNX Multimedia Suite is a comprehensive collection of media technology that has evolved over the years to keep pace with the latest media requirements of current-day embedded systems. Proven in tens of millions of automotive infotainment head units, the suite enables media-rich, high-quality playback, encoding and streaming of audio and video content. The multimedia suite comprises a modular, highly-scalable architecture that enables building high value, customized solutions that range from simple media players to networked systems in the car. The suite is optimized to leverage system-on-chip (SoC) video acceleration, in addition to supporting OpenMAX AL, an industry open standard API for application-level access to a device’s audio, video and imaging capabilities. Overview Consumer’s demand for multimedia has fueled an anywhere- o QNX SDK for Smartphone Connectivity (with support for Apple anytime paradigm, making multimedia ubiquitous in embedded CarPlay and Android Auto) systems. More and more embedded applications have require- o Qt distributions for QNX SDP 7 ments for audio, video and communication processing capabilities. For example, an infotainment system’s media player enables o QNX CAR Platform for Infotainment playback of content, stored either on-board or accessed from an • Support for a variety of external media stores external drive, mobile device or streamed over IP via a browser. Increasingly, these systems also have streaming requirements for Features at a Glance distributing content across a network, for instance from a head Multimedia Playback unit to the digital instrument cluster or rear seat entertainment units. Multimedia is also becoming pervasive in other markets, • Software-based audio CODECs such as medical, industrial, and whitegoods where user interfaces • Hardware accelerated video CODECs are increasingly providing users with a rich media experience.
    [Show full text]
  • Openbricks Embedded Linux Framework - User Manual I
    OpenBricks Embedded Linux Framework - User Manual i OpenBricks Embedded Linux Framework - User Manual OpenBricks Embedded Linux Framework - User Manual ii Contents 1 OpenBricks Introduction 1 1.1 What is it ?......................................................1 1.2 Who is it for ?.....................................................1 1.3 Which hardware is supported ?............................................1 1.4 What does the software offer ?............................................1 1.5 Who’s using it ?....................................................1 2 List of supported features 2 2.1 Key Features.....................................................2 2.2 Applicative Toolkits..................................................2 2.3 Graphic Extensions..................................................2 2.4 Video Extensions...................................................3 2.5 Audio Extensions...................................................3 2.6 Media Players.....................................................3 2.7 Key Audio/Video Profiles...............................................3 2.8 Networking Features.................................................3 2.9 Supported Filesystems................................................4 2.10 Toolchain Features..................................................4 3 OpenBricks Supported Platforms 5 3.1 Supported Hardware Architectures..........................................5 3.2 Available Platforms..................................................5 3.3 Certified Platforms..................................................7
    [Show full text]
  • Khronos Native Platform Graphics Interface (EGL Version 1.4 - April 6, 2011)
    Khronos Native Platform Graphics Interface (EGL Version 1.4 - April 6, 2011) Editor: Jon Leech 2 Copyright (c) 2002-2011 The Khronos Group Inc. All Rights Reserved. This specification is protected by copyright laws and contains material proprietary to the Khronos Group, Inc. It or any components may not be reproduced, repub- lished, distributed, transmitted, displayed, broadcast or otherwise exploited in any manner without the express prior written permission of Khronos Group. You may use this specification for implementing the functionality therein, without altering or removing any trademark, copyright or other notice from the specification, but the receipt or possession of this specification does not convey any rights to reproduce, disclose, or distribute its contents, or to manufacture, use, or sell anything that it may describe, in whole or in part. Khronos Group grants express permission to any current Promoter, Contributor or Adopter member of Khronos to copy and redistribute UNMODIFIED versions of this specification in any fashion, provided that NO CHARGE is made for the specification and the latest available update of the specification for any version of the API is used whenever possible. Such distributed specification may be re- formatted AS LONG AS the contents of the specification are not changed in any way. The specification may be incorporated into a product that is sold as long as such product includes significant independent work developed by the seller. A link to the current version of this specification on the Khronos Group web-site should be included whenever possible with specification distributions. Khronos Group makes no, and expressly disclaims any, representations or war- ranties, express or implied, regarding this specification, including, without limita- tion, any implied warranties of merchantability or fitness for a particular purpose or non-infringement of any intellectual property.
    [Show full text]
  • Gstreamer and Dmabuf
    GStreamer and dmabuf OMAP4+ graphics/multimedia update Rob Clark Outline • A quick hardware overview • Kernel infrastructure: drm/gem, rpmsg+dce, dmabuf • Blinky s***.. putting pixels on the screen • Bringing it all together in GStreamer A quick hardware overview DMM/Tiler • Like a system-wide GART – Provides a contiguous view of memory to various hw accelerators: IVAHD, ISS, DSS • Provides tiling modes for enhanced memory bandwidth efficiency – For initiators like IVAHD which access memory in 2D block patterns • Provides support for rotation – Zero cost rotation for DSS/ISS access in 0º/90º/180º/270º orientations (with horizontal or vertical reflection) IVA-HD • Multi-codec hw video encode/decode – H.264 BP/MP/HP encode/decode – MPEG-4 SP/ASP encode/decode – MPEG-2 SP/MP encode/decode – MJPEG encode/decode – VC1/WMV9 decode – etc DSS – Display Subsystem • Display Subsystem – 4 video pipes, 3 support scaling and YUV – Any number of video pipes can be attached to one of 3 “overlay manager” to route to a display Kernel infrastructure: drm/gem, rpmsg+dce, dmabuf DRM Overview • DRM → Direct Rendering Manager – Started life heavily based on x86/desktop graphics card architecture – But more recently has evolved to better support ARM and other SoC platforms • KMS → Kernel Mode Setting – Replaces fbdev for more advanced display management – Hotplug, multiple display support (spanning/cloning) – And more recently support for overlays (planes) • GEM → Graphics Execution Manager – But the important/useful part here is the graphics/multimedia buffer management DRM - KMS • Models the display hardware as: – Connector → the thing that the display connects to • Handles DDC/EDID, hotplug detection – Encoder → takes pixel data from CRTC and encodes it to a format suitable for connectors • ie.
    [Show full text]
  • The Openvx™ Specification
    The OpenVX™ Specification Version 1.0.1 Document Revision: r31169 Generated on Wed May 13 2015 08:41:43 Khronos Vision Working Group Editor: Susheel Gautam Editor: Erik Rainey Copyright ©2014 The Khronos Group Inc. i Copyright ©2014 The Khronos Group Inc. All Rights Reserved. This specification is protected by copyright laws and contains material proprietary to the Khronos Group, Inc. It or any components may not be reproduced, republished, distributed, transmitted, displayed, broadcast or otherwise exploited in any manner without the express prior written permission of Khronos Group. You may use this specifica- tion for implementing the functionality therein, without altering or removing any trademark, copyright or other notice from the specification, but the receipt or possession of this specification does not convey any rights to reproduce, disclose, or distribute its contents, or to manufacture, use, or sell anything that it may describe, in whole or in part. Khronos Group grants express permission to any current Promoter, Contributor or Adopter member of Khronos to copy and redistribute UNMODIFIED versions of this specification in any fashion, provided that NO CHARGE is made for the specification and the latest available update of the specification for any version of the API is used whenever possible. Such distributed specification may be re-formatted AS LONG AS the contents of the specifi- cation are not changed in any way. The specification may be incorporated into a product that is sold as long as such product includes significant independent work developed by the seller. A link to the current version of this specification on the Khronos Group web-site should be included whenever possible with specification distributions.
    [Show full text]
  • Digital Asset Exchange
    DDiiggiittaall AAsssseett EExxcchhaannggee Dr. Rémi Arnaud Sony Computer Entertainment Khronos Group Promoter © Copyright Khronos Group, 2007 - Page 1 •www.khronos.org •Founded in January 2000 by a number of leading media-centric companies, including: 3Dlabs, ATI, Discreet, Evans & Sutherland, Intel, NVIDIA, SGI and Sun Microsystems. (currently more than 100) •Dedicated to the creation of royalty-free open standard APIs to enable the playback of rich media on a wide variety of platforms and devices. •Home of 11 WG, including: OpenGL, OpenGL ES, OpenVG, OpenKODE, OpenSL, COLLADA •New WG introduced at GDC: glFX, Compositing © Copyright Khronos Group, 2007 - Page 2 CCOOLLLLAADDAA aass aa SSCCEE pprroojjeecctt •SCE project, started in August 2003 - Goal: raise the quality and productivity of content development - free the content from proprietary formats and API, bring more tools to game developers, lower the barrier to entry for small tool companies, facilitate middleware integration, bring ‘advanced’ features in the main stream, drastically improve artist productivity. •Common description language - Developers get the content in a standard form - Tools can interchange content - Developers can mix and match tools during development - Many specialized tools can be independently created, and incorporated into developer’s content pipeline •COLLAborative Design Activity, SCE brought to the same table the major DCC vendors: Discreet, Alias, Softimage •Released v1.0 specification in August 2004 •Gathered feedback, waiting for tools to provide useful
    [Show full text]
  • The Openvx™ Specification
    The OpenVX™ Specification Version 1.2 Document Revision: dba1aa3 Generated on Wed Oct 11 2017 20:00:10 Khronos Vision Working Group Editor: Stephen Ramm Copyright ©2016-2017 The Khronos Group Inc. i Copyright ©2016-2017 The Khronos Group Inc. All Rights Reserved. This specification is protected by copyright laws and contains material proprietary to the Khronos Group, Inc. It or any components may not be reproduced, republished, distributed, transmitted, displayed, broadcast or otherwise exploited in any manner without the express prior written permission of Khronos Group. You may use this specifica- tion for implementing the functionality therein, without altering or removing any trademark, copyright or other notice from the specification, but the receipt or possession of this specification does not convey any rights to reproduce, disclose, or distribute its contents, or to manufacture, use, or sell anything that it may describe, in whole or in part. Khronos Group grants express permission to any current Promoter, Contributor or Adopter member of Khronos to copy and redistribute UNMODIFIED versions of this specification in any fashion, provided that NO CHARGE is made for the specification and the latest available update of the specification for any version of the API is used whenever possible. Such distributed specification may be re-formatted AS LONG AS the contents of the specifi- cation are not changed in any way. The specification may be incorporated into a product that is sold as long as such product includes significant independent work developed by the seller. A link to the current version of this specification on the Khronos Group web-site should be included whenever possible with specification distributions.
    [Show full text]
  • 모바일 그래픽스 라이브러리들: 크로노스 그룹의 표준을 중심으로 Mobile Graphics Libraries: Focusing on the Standards from Khronos Group
    50 한국콘텐츠학회 제8권 제2호 모바일 그래픽스 라이브러리들: 크로노스 그룹의 표준을 중심으로 Mobile Graphics Libraries: focusing on the standards from Khronos Group 백낙훈 (경북대학교), 이환용 (㈜휴원 CTO, 경북대학교 박사과정) 차 례 1. 서론 2. OpenGL ES 3. OpenGL SC 4. OpenVG 5. 결론 1. 서론 전력 소모가 낮은 기기를 채택할 수 밖에 없는 것이다. 액정뿐만 아니라, 모든 컴퓨팅 자원들이 궁극적으로 전 컴퓨터는 그 출현 이후, 계속해서 그 크기를 줄여 왔고, 력 문제에 민감하여야 하고, 이 때문에, 제한된 기능만을 현재는 휴대폰, 네비게이터, 휴대용 게임기 등의 형태로 제공할 수 밖에 없는 상황이다. 모바일 컴퓨팅 환경을 제공하고 있다. 모바일 컴퓨팅 환 경의 대두와 함께, 이를 이용한 그래픽스 출력이 요구되 었고, 모바일 환경에서의 그래픽스 기능을 의미하는, 모 바일 그래픽스 환경이 구축되었다. 이 글에서는 현재의 모바일 그래픽스 환경 중에서도 특히 표준 라이브러리들 에 대해 이야기하고자 한다. 지난 10여년 사이에 모바일 그래픽스 분야는 눈부신 발전을 이루었다. 가장 대표적 인 기기인 휴대폰을 기준으로 본다면, 최초에 나온, 저해 상도에 흑백의 투박한 액정을 가진 모델이 불과 몇 년 사 이에 상당한 수준의 컬러 액정을 가진 제품으로 변했고, 3차원 그래픽스를 지원하는 특별한 하드웨어 칩들을 사 (a) 저해상도 2D (b) 3D 용하는 것도 이상하지 않은 상황이 되었다. 이에 따라, 소프트웨어 기술들도 눈부시게 발전하여, 그림 1에서 보 는 바와 같이, 2차원 저해상도에서 3차원 화면을 거쳐, 거의 PC 화면에 필적하는 수준의 고해상도 3차원 화면 이 급속히 사용되고 있다. 모바일 그래픽스 환경은 태생 상, 기존의 데스크 탑 또는 그 이상의 고급 기종들에 비 해, 상대적으로 열등한 하드웨어 환경을 제공할 수 밖에 없다. 가장 문제가 되는 것은 제한된 용량의 전원, 즉 배 터리의 수명을 고려해야 한다는 점이다. PC급의 고해상 (c) 하드웨어로 가속되는 3D 도 액정이 기술적으로 문제가 있는 것이 아니라, 채택하 ▶▶ 그림 1.
    [Show full text]
  • The Road to the Mainline Zynqmp VCU Driver
    The Road to the Mainline ZynqMP VCU Driver FOSDEM ’21 Michael Tretter – [email protected] https://www.pengutronix.de Agenda Xilinx Zynq® UltraScale+™ MPSoC H.264/H.265 Video Codec Unit Video Encoders in Mainline Linux VCU Mainline Driver: Allegro A Glimpse into the Future 2/47 Xilinx Zynq® UltraScale+™ MPSoC 3/47 ZynqMP Platform Overview Luca Ceresoli: ARM64 + FPGA and more: Linux on the Xilinx ZynqMP https://archive.fosdem.org/ 2018/schedule/event/arm6 4_and_fpga 4/47 ZynqMP Mainline Status Mainline Linux just works, e.g., on ZCU104 Evaluation Kit U-Boot, Barebox, FSBL Sometimes more reliable with Xilinx downstream Xilinx is actively mainlining their drivers 5/47 Make Sure that Your ZynqMP has a VCU ZU # E V ZU: Zynq Ultrascale+ #: Value Index C/E: Processor System Identifier G/V: Engine Type 6/47 Focus on Video Encoding VCU supports video decoding, as well Linux mainline driver only supports encoding Decoding might be focus in a future talk 7/47 Basic Video Encoding Knowledge Expected Paul Kocialkowski: Supporting Hardware-Accelerated Video Encoding with Mainline https://www.youtube.com/watch?v=S5wCdZfGFew 8/47 H.264/H.265 Video Codec Unit 9/47 VCU: Documentation Hardware configuration Software usage Available on the Xilinx Website 10/47 VCU: Features The encoder engine is designed to process video streams using the HEVC (ISO/IEC 23008-2 high-efficiency Video Coding) and AVC (ISO/IEC 14496-10 Advanced Video Coding) standards. It provides complete support for these standards, including support for 8-bit and 10-bit color, Y- only (monochrome), 4:2:0 and 4:2:2 Chroma formats, up to 4K UHD at 60 Hz performance.
    [Show full text]