jagomart
digital resources
picture1_Opencl Programming Guide 191200 | Aocl Programming Guide


 223x       Filetype PDF       File size 3.21 MB       Source: www.intel.com


File: Opencl Programming Guide 191200 | Aocl Programming Guide
intel fpga sdk for opencl pro edition programming guide updated for intel quartus prime design suite 21 3 online version id 683846 send feedback version 2021 10 04 ug ocl002 ...

icon picture PDF Filetype PDF | Posted on 04 Feb 2023 | 2 years ago
Partial capture of text on file.
                            ®                                                       ™
                Intel  FPGA SDK for OpenCL  Pro
                Edition
                Programming Guide
                               ®        ®
                Updated for Intel  Quartus  Prime Design Suite: 21.3
                     Online Version                                                            ID: 683846
                     Send Feedback                                                    Version: 2021.10.04
                                                         UG-OCL002
                                                                              Contents
            Contents
                 ®                  ™
            1. Intel  FPGA SDK for OpenCL  Overview......................................................................... 7
                1.1. Intel FPGA SDK for OpenCL Pro Edition Programming Guide Prerequisites......................7
                1.2. Intel FPGA SDK for OpenCL FPGA Programming Flow..................................................8
            2. Intel FPGA SDK for OpenCL Offline Compiler Kernel Compilation Flows........................10
                2.1. One-Step Compilation for Simple Kernels................................................................ 11
                2.2. Multistep Intel FPGA SDK for OpenCL Pro Edition Design Flow....................................12
            3. Obtaining General Information on Software, Compiler, and Custom Platform...............16
                3.1. Displaying the Software Version (version)............................................................... 16
                3.2. Displaying the Compiler Version (-version).............................................................. 16
                3.3. Listing the Intel FPGA SDK for OpenCL Utility Command Options (help).......................17
                     3.3.1. Displaying Information on an Intel FPGA SDK for OpenCL Utility Command
                          Option (help )............................................................. 17
                3.4. Listing the Intel FPGA SDK for OpenCL Offline Compiler Command Options (no
                     argument, -help, or -h)......................................................................................17
                3.5. Listing the Available FPGA Boards and Custom Platforms (-list-boards and -list-
                     board-packages)...............................................................................................17
                3.6. Displaying the Compilation Environment of an OpenCL Binary (env)........................... 18
            4. Managing an FPGA Board..............................................................................................19
                4.1. Installing an FPGA Board (install)...........................................................................20
                4.2. Uninstalling an FPGA Board (uninstall)....................................................................22
                4.3. Querying the Device Name of Your FPGA Board (diagnose)........................................22
                4.4. Running a Board Diagnostic Test (diagnose ).....................................23
                4.5. Programming the FPGA Offline or without a Host (program )...............23
                4.6. Programming the Flash Memory (flash )...........................................23
            5. Structuring Your OpenCL Kernel................................................................................... 25
                5.1. Guidelines for Naming the Kernel...........................................................................25
                5.2. Programming Strategies for Optimizing Data Processing Efficiency..............................26
                     5.2.1. Unrolling a Loop (unroll Pragma) ............................................................27
                     5.2.2. Disabling Pipelining of a Loop (disable_loop_pipelining Pragma) .......... 28
                     5.2.3. Coalescing Nested Loops...........................................................................29
                     5.2.4. Fusing Adjacent Loops (loop_fuse Pragma)...............................................30
                     5.2.5. Marking Loops to Prevent Automatic Fusion (nofusion Pragma)................... 32
                     5.2.6. Specifying a Loop Initiation interval (II)...................................................... 32
                     5.2.7. Loop Concurrency (max_concurrency Pragma) .........................................34
                     5.2.8. Loop Speculation (speculated_iterations Pragma) ...............................35
                     5.2.9. Loop Interleaving Control (max_interleaving Pragma)..............................35
                     5.2.10. Floating Point Optimizations (fp contract and fp reassociate
                          Pragma)................................................................................................. 37
                     5.2.11. Specifying Work-Group Sizes................................................................... 38
                     5.2.12. Specifying Number of Compute Units........................................................39
                     5.2.13. Specifying Number of SIMD Work-Items....................................................40
                     5.2.14. Specifying the private_copies Memory Attribute....................................41
                     5.2.15. Specifying the use_stall_enable_clusters Cluster-control Attribute ..... 42
                5.3. Programming Strategies for Optimizing Pointer-to-Local Memory Size......................... 42
            Intel FPGA SDK for OpenCL Pro Edition: Programming Guide
                                                                          Send Feedback
            2
            Contents
                5.4. Implementing the Intel FPGA SDK for OpenCL Channels Extension............................. 43
                     5.4.1. Overview of the Intel FPGA SDK for OpenCL Channels Extension.................... 43
                     5.4.2. Channel Data Behavior............................................................................. 44
                     5.4.3. Multiple Work-Item Ordering for Channels................................................... 45
                     5.4.4. Restrictions in the Implementation of Intel FPGA SDK for OpenCL
                         Channels Extension .................................................................................46
                     5.4.5. Enabling the Intel FPGA SDK for OpenCL Channels for OpenCL Kernel.............48
                5.5. Implementing OpenCL Pipes..................................................................................60
                     5.5.1. Overview of the OpenCL Pipe Functions.......................................................61
                     5.5.2. Pipe Data Behavior...................................................................................62
                     5.5.3. Multiple Work-Item Ordering for Pipes.........................................................62
                     5.5.4. Restrictions in OpenCL Pipes Implementation...............................................64
                     5.5.5. Enabling OpenCL Pipes for Kernels............................................................. 65
                     5.5.6. Direct Communication with Kernels via Host Pipes........................................75
                5.6. Implementing Arbitrary Precision Integers...............................................................82
                5.7. Using Predefined Preprocessor Macros in Conditional Compilation...............................83
                5.8. Declaring __constant Address Space Qualifiers........................................................ 83
                5.9. Including Structure Data Types as Arguments in OpenCL Kernels................................84
                     5.9.1. Matching Data Layouts of Host and Kernel Structure Data Types.....................84
                     5.9.2. Disabling Insertion of Data Structure Padding ............................................. 86
                     5.9.3. Specifying the Alignment of a Struct...........................................................86
                5.10. Inferring a Register............................................................................................ 87
                     5.10.1. Inferring a Shift Register.........................................................................88
                5.11. Enabling Double Precision Floating-Point Operations................................................89
                5.12. Single-Cycle Floating-Point Accumulator for Single Work-Item Kernels.......................89
                     5.12.1. Programming Strategies for Inferring the Accumulator................................ 90
                5.13. Integer Promotion Rules......................................................................................91
            6. Designing Your Host Application...................................................................................93
                6.1. Host Programming Requirements...........................................................................93
                     6.1.1. Host Machine Memory Requirements.......................................................... 93
                     6.1.2. Host Binary Requirement.......................................................................... 93
                     6.1.3. Multiple Host Threads...............................................................................94
                     6.1.4. Out-of-order Command Queues................................................................. 94
                     6.1.5. Requirement for Multiple Command Queues to Execute Kernels Concurrently...94
                6.2. Allocating OpenCL Buffers for Manual Partitioning of Global Memory........................... 94
                     6.2.1. Partitioning Buffers Across Multiple Interfaces of the Same Memory Type.........95
                     6.2.2. Partitioning Buffers Across Different Memory Types (Heterogeneous Memory).. 96
                     6.2.3. Creating a Pipe Object in Your Host Application............................................ 98
                     6.2.4. Enabling All Global Memory....................................................................... 98
                6.3. Triggering Collection Profiling Data During Kernel Execution.......................................99
                     6.3.1. Profiling Autorun Kernels ........................................................................101
                     6.3.2. Profile Data Acquisition........................................................................... 103
                6.4. Accessing Custom Platform-Specific Functions........................................................103
                6.5. Modifying Host Program for Structure Parameter Conversion....................................104
                6.6. Managing Host Application...................................................................................105
                     6.6.1. Displaying Example Makefile Fragments (example-makefile or makefile)........105
                     6.6.2. Compiling and Linking Your Host Application.............................................. 106
                     6.6.3. Using OpenCL ICD Extension APIs............................................................ 110
                     6.6.4. Programming an FPGA via the Host.......................................................... 110
                     6.6.5. Termination of the Runtime Environment and Error Recovery....................... 115
                                                Intel FPGA SDK for OpenCL Pro Edition: Programming Guide
               Send Feedback
                                                                              3
                                                                                                             Contents
                       6.7. Allocating Shared Memory for OpenCL Kernels Targeting SoCs..................................115
                       6.8. Sharing Multiple Devices Across Multiple Host Programs.......................................... 117
                7. Compiling Your OpenCL Kernel....................................................................................119
                       7.1. Compiling Your Kernel to Create Hardware Configuration File................................... 119
                       7.2. Compiling Your Kernel without Building Hardware (-c).............................................120
                       7.3. Compiling and Linking Your Kernels or Object Files without Building Hardware (-rtl)....120
                       7.4. Specifying the Location of Header Files (-I=).........................................121
                       7.5. Specifying the Name of an Intel FPGA SDK for OpenCL Offline Compiler Output File
                             (-o )..............................................................................................122
                       7.6. Compiling a Kernel for a Specific FPGA Board and Custom Platform (-
                             board=) and (-board-package=)................122
                       7.7. Resolving Hardware Generation Fitting Errors during Kernel Compilation (-high-effort) 124
                       7.8. Specifying Schedule F    Target for Kernels (-clock=) .......................125
                                                 max
                       7.9. Defining Preprocessor Macros to Specify Kernel Parameters (-D)........125
                       7.10. Generating Compilation Progress Report (-v)........................................................126
                       7.11. Displaying the Estimated Resource Usage Summary On-Screen (-report).................128
                       7.12. Suppressing Warning Messages from the Intel FPGA SDK for OpenCL Offline
                             Compiler (-W).................................................................................................128
                       7.13. Converting Warning Messages from the Intel FPGA SDK for OpenCL Offline
                             Compiler into Error Messages (-Werror)..............................................................128
                       7.14. Removing Debug Data from Compiler Reports and Source Code from the .aocx
                             File (-g0)........................................................................................................129
                       7.15. Disabling Burst-Interleaving of Global Memory (-no-
                             interleaving=)...............................................................129
                       7.16. Forcing Ring Interconnect for Global Memory (-global-ring)....................................130
                       7.17. Forcing a Single Store Ring to Reduce Area at the Expense of Write Throughput to
                             Global Memory (-force-single-store-ring)............................................................130
                       7.18. Forcing Fewer Read Data Reorder Units to Reduce Area at the Expense of Read
                             Throughput to Global Memory (-num-reorder).....................................................130
                       7.19. Configuring Constant Memory Cache Size (-const-cache-bytes=)..................... 130
                       7.20. Relaxing the Order of Floating-Point Operations (-ffp-reassociate)...................131
                       7.21. Reducing Floating-Point Rounding Operations (-ffp-contract=fast)...........................131
                       7.22. Speeding Up Your OpenCL Compilation (-fast-compile)..........................................132
                       7.23. Compiling Your Kernel Incrementally (-incremental)..............................................132
                             7.23.1. The Incremental Compile Report.............................................................133
                             7.23.2. Additional Command Options for Incremental Compilation......................... 135
                             7.23.3. Limitations of the Incremental Compilation Feature...................................137
                       7.24. Compiling Your Kernel with Memory Error Correction Coding (-ecc)......................... 137
                       7.25. Disabling Hardware Kernel Invocation Queue (-no-hardware-kernel-invocation-
                             queue)...........................................................................................................138
                       7.26. Modifying the Handshaking Protocol (-hyper-optimized-handshaking)......................138
                       7.27. Pipelining Loops in Non-task Kernels (-auto-pipeline)............................................ 139
                8. Emulating and Debugging Your OpenCL Kernel...........................................................140
                       8.1. Setting up the Emulator......................................................................................140
                       8.2. Modifying Channels Kernel Code for Emulation....................................................... 141
                             8.2.1. Emulating a Kernel that Passes Pipes or Channels by Value..........................142
                             8.2.2. Emulating Channel Depth........................................................................143
                             8.2.3. Emulating Applications with a Channel That Reads or Writes to an I/O
                                    Channel................................................................................................ 143
                       8.3. Compiling a Kernel for Emulation (-march=emulator)..............................................144
                Intel FPGA SDK for OpenCL Pro Edition: Programming Guide
                                                                                                       Send Feedback
                4
The words contained in this file might help you see if this file matches what you are looking for:

...Intel fpga sdk for opencl pro edition programming guide updated quartus prime design suite online version id send feedback ug ocl contents overview prerequisites flow offline compiler kernel compilation flows one step simple kernels multistep obtaining general information on software and custom platform displaying the listing utility command options help an option no argument or h available boards platforms list board packages environment of binary env managing installing install uninstalling uninstall querying device name your diagnose running a diagnostic test without host program flash memory structuring guidelines naming strategies optimizing data processing efficiency unrolling loop unroll pragma disabling pipelining disable coalescing nested loops fusing adjacent fuse marking to prevent automatic fusion nofusion specifying initiation interval ii concurrency max speculation speculated iterations interleaving control floating point optimizations fp contract reassociate work group s...

no reviews yet
Please Login to review.