没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
i
Copyright © 2015 Advanced Micro Devices, Inc. All rights reserved.
Reference Guide
Graphics Core Next Architecture, Generation 3
March 2015
Revision 1.0
ii
DISCLAIMER
The information contained herein is for informational purposes only, and is subject to
change without notice. While every precaution has been taken in the preparation of this
document, it may contain technical inaccuracies, omissions and typographical errors, and
AMD is under no obligation to update or otherwise correct this information.
Advanced Mi-
cro Devices, Inc. makes no representations or warranties with respect to the accuracy or
completeness of the contents of this document, and assumes no liability of any kind, in-
cluding the implied warranties of noninfringement, merchantability or fitness for particular
purposes, with respect to the operation or use of AMD hardware, software or other prod-
ucts described herein. No license, including implied or arising by estoppel, to any intellec-
tual property rights is granted by this document. Terms and limitations applicable to the
purchase or use of AMD’s products are as set forth in a signed agreement between the
parties or in AMD's Standard Terms and Conditions of Sale.
© 2015 Advanced Micro Devices, Inc. All rights reserved. AMD,
the AMD Arrow logo,
AMD Accelerated Parallel Processing, the AMD Accelerated Parallel Processing logo, and
combinations thereof are trademarks of Advanced Micro Devices, Inc. OpenCL and the
OpenCL logo are trademarks of Apple Inc. used by permission by Khronos. Other names
are for informational purposes only and may be trademarks of their respective owners.
AMD’s products are not designed, intended, authorized or warranted for use as compo-
nents in systems intended for surgical implant into the body, or in other applications
intended to support or sustain life, or in any other application in which the failure of
AMD’s
product could create a situation where personal injury, death, or severe property or envi-
ronmental damage may occur. AMD reserves the right to discontinue or make changes to
its products at any time without notice.
Advanced Micro Devices, Inc.
One AMD Place
P.O. Box 3453
Sunnyvale, CA 94088-3453
www.amd.com
For AMD Accelerated Parallel Processing:
URL: developer.amd.com/appsdk
Developing: developer.amd.com/
Forum: developer.amd.com/openclforum
AMD GRAPHICS C ORE N EXT T ECHNOLOGY
iii
Copyright © 2015 Advanced Micro Devices, Inc. All rights reserved.
Contents
Contents
Preface
Chapter 1
Introduction
Chapter 2
Program Organization
2.1 The Compute Shader Program Type ............................................................................................. 2-1
2.2 Instruction Terminology .................................................................................................................. 2-2
2.3 Data Sharing ..................................................................................................................................... 2-3
2.3.1 Local Data Share (LDS) .................................................................................................. 2-4
2.3.2 Global Data Share (GDS)................................................................................................ 2-5
2.4 Device Memory................................................................................................................................. 2-5
Chapter 3
Kernel State
3.1 State Overview ................................................................................................................................. 3-1
3.2 Program Counter (PC) .................................................................................................................... 3-2
3.3 EXECute Mask .................................................................................................................................. 3-2
3.4 Status Registers............................................................................................................................... 3-2
3.5 Mode Register .................................................................................................................................. 3-4
3.6 GPRs and LDS.................................................................................................................................. 3-5
3.6.1 Out-of-Range Behavior ................................................................................................... 3-5
3.6.2 SGPR Allocation and Storage........................................................................................ 3-6
3.6.3 SGPR Alignment.............................................................................................................. 3-6
3.6.4 VGPR Allocation and Alignment.................................................................................... 3-6
3.6.5 LDS Allocation and Clamping........................................................................................ 3-6
3.7 M# Memory Descriptor .................................................................................................................... 3-7
3.8 SCC: Scalar Condition Code........................................................................................................... 3-7
3.9 Vector Compares: VCC and VCCZ.................................................................................................. 3-8
3.10 Trap and Exception Registers ........................................................................................................ 3-8
3.11 Memory Violations ......................................................................................................................... 3-10
Chapter 4
AMD GRAPHICS C ORE N EXT T ECHNOLOGY
iv
Copyright © 2015 Advanced Micro Devices, Inc. All rights reserved.
Program Flow Control
4.1 Program Control............................................................................................................................... 4-1
4.2 Branching.......................................................................................................................................... 4-1
4.3 Work-Groups..................................................................................................................................... 4-2
4.4 Data Dependency Resolution ......................................................................................................... 4-2
4.5 Manually Inserted Wait States (NOPs) .......................................................................................... 4-4
4.6 Arbitrary Divergent Control Flow................................................................................................... 4-5
Chapter 5
Scalar ALU Operations
5.1 SALU Instruction Formats .............................................................................................................. 5-1
5.2 Scalar ALU Operands ...................................................................................................................... 5-2
5.3 Scalar Condition Code (SCC) ......................................................................................................... 5-2
5.4 Integer Arithmetic Instructions....................................................................................................... 5-5
5.5 Conditional Instructions.................................................................................................................. 5-5
5.6 Comparison Instructions................................................................................................................. 5-6
5.7 Bit-Wise Instructions ....................................................................................................................... 5-6
5.8 Special Instructions ......................................................................................................................... 5-8
Chapter 6
Vector ALU Operations
6.1 Microcode Encodings...................................................................................................................... 6-1
6.2 Operands........................................................................................................................................... 6-2
6.2.1 Instruction Inputs ............................................................................................................ 6-2
6.2.2 Instruction Outputs ......................................................................................................... 6-3
6.2.3 Out-of-Range GPRs......................................................................................................... 6-5
6.3 Instructions....................................................................................................................................... 6-5
6.4 Denormalized and Rounding Modes ............................................................................................. 6-7
6.5 ALU CLAMP Bit Usage.................................................................................................................... 6-7
6.6 VGPR Indexing ................................................................................................................................. 6-7
6.6.1 Indexing Instructions ...................................................................................................... 6-8
6.6.2 Special Cases .................................................................................................................. 6-8
Chapter 7
Scalar Memory Operations
7.1 Microcode Encoding........................................................................................................................ 7-1
7.2 Operations......................................................................................................................................... 7-2
7.2.1 S_LOAD_DWORD ............................................................................................................ 7-2
7.2.2 S_STORE_DWORD.......................................................................................................... 7-2
7.2.3 S_BUFFER_LOAD_DWORD, S_BUFFER_STORE_DWORD........................................ 7-2
7.2.4 S_DCACHE_INV, S_DCACHE_WB ................................................................................. 7-3
7.2.5 S_MEM_TIME ................................................................................................................... 7-3
7.2.6 S_MEM_REALTIME.......................................................................................................... 7-3
AMD GRAPHICS C ORE N EXT T ECHNOLOGY
v
Copyright © 2015 Advanced Micro Devices, Inc. All rights reserved.
7.3 Dependency Checking..................................................................................................................... 7-3
7.4 Alignment and Bounds Checking .................................................................................................. 7-3
Chapter 8
Vector Memory Operations
8.1 Vector Memory Buffer Instructions................................................................................................ 8-1
8.1.1 Simplified Buffer Addressing......................................................................................... 8-2
8.1.2 Buffer Instructions .......................................................................................................... 8-2
8.1.3 VGPR Usage .................................................................................................................... 8-4
8.1.4 Buffer Data ....................................................................................................................... 8-5
8.1.5 Buffer Addressing ........................................................................................................... 8-6
Range Checking8-8
Swizzled Buffer Addressing8-8
Proposed Uses Cases for Swizzled Addressing8-10
8.1.6 Alignment ........................................................................................................................8-11
8.1.7 Buffer Resource .............................................................................................................8-11
8.1.8 Memory Buffer Load to LDS ....................................................................................... 8-12
Clamping Rules8-13
8.1.9 GLC Bit Explained......................................................................................................... 8-13
8.2 Vector Memory (VM) Image Instructions..................................................................................... 8-14
8.2.1 Image Instructions ........................................................................................................ 8-15
8.2.2 Image Opcodes with No Sampler................................................................................ 8-16
8.2.3 Image Opcodes with Sampler...................................................................................... 8-17
8.2.4 VGPR Usage .................................................................................................................. 8-19
8.2.5 Image Resource............................................................................................................. 8-20
8.2.6 Sampler Resource......................................................................................................... 8-21
8.2.7 Data Formats ................................................................................................................. 8-23
8.2.8 Vector Memory Instruction Data Dependencies........................................................ 8-24
Chapter 9
Flat Memory Instructions
9.1 Flat Memory Instructions ................................................................................................................ 9-1
9.2 Instructions....................................................................................................................................... 9-2
9.2.1 Ordering............................................................................................................................ 9-3
9.2.2 Important Timing Consideration.................................................................................... 9-3
9.3 Addressing........................................................................................................................................ 9-3
9.4 Memory Error Checking .................................................................................................................. 9-3
9.5 Data.................................................................................................................................................... 9-4
9.6 Scratch Space (Private)................................................................................................................... 9-4
Chapter 10
Data Share Operations
10.1 Overview.......................................................................................................................................... 10-1
10.2 Dataflow in Memory Hierarchy ..................................................................................................... 10-2
剩余353页未读,继续阅读
资源评论
Bob_Dong
- 粉丝: 30
- 资源: 29
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功