Skip to content

Commit c66c81c

Browse files
FPGA: create new invocation interfaces sample (#1303)
1 parent 7162ad0 commit c66c81c

11 files changed

+1175
-19
lines changed

DirectProgramming/C++SYCL_FPGA/README.md

+21-19
Original file line numberDiff line numberDiff line change
@@ -74,25 +74,27 @@ flowchart LR
7474
style tier4 fill:#0071c1,stroke:#0071c1,stroke-width:1px,color:#fff
7575
```
7676

77-
| Sample | Category | Description
78-
|:--- |:--- |:---
79-
| [ac_fixed](Tutorials/Features/ac_fixed) | [Tutorials/Features](Tutorials/Features) | How different methods of `ac_fixed` number construction affect hardware resource utilization <br> Recommended method for constructing `ac_fixed` numbers in your kernel <br> Accessing and using the `ac_fixed` math library functions <br> Trading off accuracy of results for reduced resource usage on the FPGA
80-
| [ac_int](Tutorials/Features/ac_int) | [Tutorials/Features](Tutorials/Features) | Using the `ac_int` data type for basic operations <br> Efficiently using the left shift operation <br> Setting and reading certain bits of an `ac_int` number
81-
| [device_global (experimental)](Tutorials/Features/experimental/device_global)| [Tutorials/Features](Tutorials/Features) | The basic usage of the `device_global` class <br> How to initialize a `device_global` to non-zero values
82-
83-
| [double_buffering](Tutorials/DesignPatterns/double_buffering) | [Tutorials/DesignPatterns](Tutorials/DesignPatterns) | How and when to implement the double buffering optimization technique
84-
| [explicit_data_movement](Tutorials/DesignPatterns/explicit_data_movement) | [Tutorials/DesignPatterns](Tutorials/DesignPatterns) | How to explicitly manage the movement of data for the FPGA
85-
| [hostpipes (experimental)](Tutorials/Features/experimental/hostpipes) | [Tutorials/Features](Tutorials/Features) | How to use host pipes to send and receive data between a host and the FPGA
86-
| [kernel_args_restrict](Tutorials/Features/kernel_args_restrict) | [Tutorials/Features](Tutorials/Features) | The problem of pointer aliasing and its impact on compiler optimizations. <br> The behavior of the `kernel_args_restrict` attribute and when to use it on your kernel <br> The effect this attribute can have on kernel performance on FPGA
87-
| [loop_coalesce](Tutorials/Features/loop_coalesce) | [Tutorials/Features](Tutorials/Features) | What the `loop_coalesce` attribute does <br> How `loop_coalesce` attribute affects resource usage and loop throughput <br> How to apply the `loop_coalesce` attribute to loops in your program <br> Which loops make good candidates for coalescing
88-
| [loop_fusion](Tutorials/Features/loop_fusion) | [Tutorials/Features](Tutorials/Features) | Basics of loop fusion <br> The reasons for loop fusion<br/>How to use loop fusion to increase performance <br> Understanding safe application of loop fusion
89-
| [loop_initiation_interval](Tutorials/Features/loop_initiation_interval) | [Tutorials/Features](Tutorials/Features) | The f<sub>MAX</sub>-II tradeoff <br> Default behavior of the compiler when scheduling loops <br> How to use `intel::initiation_interval` to attempt to set the II for a loop <br> Scenarios in which `intel::initiation_interval` can be helpful in optimizing kernel performance
90-
| [loop_ivdep](Tutorials/Features/loop_ivdep) | [Tutorials/Features](Tutorials/Features) | Basics of loop-carried dependencies <br> The notion of a loop-carried dependence distance <br> What constitutes a safe dependence distance <br> How to aid the compiler's dependence analysis to maximize performance
91-
| [loop_unroll](Tutorials/Features/loop_unroll) | [Tutorials/Features](Tutorials/Features) | Basics of loop unrolling. <br> How to unroll loops in your program <br> Determining the optimal unroll factor for your program
92-
| [max_interleaving](Tutorials/Features/max_interleaving) | [Tutorials/Features](Tutorials/Features) | The basic usage of the `max_interleaving` attribute <br> How the `max_interleaving` attribute affects loop resource use <br> How to apply the `max_interleaving` attribute to loops in your program
93-
| [memory_attributes](Tutorials/Features/memory_attributes) | [Tutorials/Features](Tutorials/Features) | The basic concepts of on-chip memory attributes <br> How to apply memory attributes in your program <br> How to confirm that the memory attributes were respected by the compiler <br> A case study of the type of performance/area trade-offs enabled by memory attributes
94-
| [pipes](Tutorials/Features/pipes) | [Tutorials/Features](Tutorials/Features) | The basics of using SYCL*-compliant pipes extension for FPGA <br> How to declare and use pipes
95-
| [printf](Tutorials/Features/printf) | [Tutorials/DesignPatterns](Tutorials/DesignPatterns) | How to declare and use `printf` in program
77+
78+
| Sample | Category | Description
79+
|:--- |:--- |:---
80+
| [ac_fixed](Tutorials/Features/ac_fixed) | [Tutorials/Features](Tutorials/Features) | How different methods of `ac_fixed` number construction affect hardware resource utilization <br> Recommended method for constructing `ac_fixed` numbers in your kernel <br> Accessing and using the `ac_fixed` math library functions <br> Trading off accuracy of results for reduced resource usage on the FPGA
81+
| [ac_int](Tutorials/Features/ac_int) | [Tutorials/Features](Tutorials/Features) | Using the `ac_int` data type for basic operations <br> Efficiently using the left shift operation <br> Setting and reading certain bits of an `ac_int` number
82+
| [device_global (experimental)](Tutorials/Features/experimental/device_global) | [Tutorials/Features](Tutorials/Features) | The basic usage of the `device_global` class <br> How to initialize a `device_global` to non-zero values
83+
| [double_buffering](Tutorials/DesignPatterns/double_buffering) | [Tutorials/DesignPatterns](Tutorials/DesignPatterns) | How and when to implement the double buffering optimization technique
84+
| [explicit_data_movement](Tutorials/DesignPatterns/explicit_data_movement) | [Tutorials/DesignPatterns](Tutorials/DesignPatterns) | How to explicitly manage the movement of data for the FPGA
85+
| [hostpipes (experimental)](Tutorials/Features/experimental/hostpipes) | [Tutorials/Features](Tutorials/Features) | How to use host pipes to send and receive data between a host and the FPGA
86+
| [kernel_args_restrict](Tutorials/Features/kernel_args_restrict) | [Tutorials/Features](Tutorials/Features) | The problem of pointer aliasing and its impact on compiler optimizations. <br> The behavior of the `kernel_args_restrict` attribute and when to use it on your kernel <br> The effect this attribute can have on kernel performance on FPGA
87+
| [loop_coalesce](Tutorials/Features/loop_coalesce) | [Tutorials/Features](Tutorials/Features) | What the `loop_coalesce` attribute does <br> How `loop_coalesce` attribute affects resource usage and loop throughput <br> How to apply the `loop_coalesce` attribute to loops in your program <br> Which loops make good candidates for coalescing
88+
| [loop_fusion](Tutorials/Features/loop_fusion) | [Tutorials/Features](Tutorials/Features) | Basics of loop fusion <br> The reasons for loop fusion<br/>How to use loop fusion to increase performance <br> Understanding safe application of loop fusion
89+
| [loop_initiation_interval](Tutorials/Features/loop_initiation_interval) | [Tutorials/Features](Tutorials/Features) | The f<sub>MAX</sub>-II tradeoff <br> Default behavior of the compiler when scheduling loops <br> How to use `intel::initiation_interval` to attempt to set the II for a loop <br> Scenarios in which `intel::initiation_interval` can be helpful in optimizing kernel performance
90+
| [loop_ivdep](Tutorials/Features/loop_ivdep) | [Tutorials/Features](Tutorials/Features) | Basics of loop-carried dependencies <br> The notion of a loop-carried dependence distance <br> What constitutes a safe dependence distance <br> How to aid the compiler's dependence analysis to maximize performance
91+
| [loop_unroll](Tutorials/Features/loop_unroll) | [Tutorials/Features](Tutorials/Features) | Basics of loop unrolling. <br> How to unroll loops in your program <br> Determining the optimal unroll factor for your program
92+
| [max_interleaving](Tutorials/Features/max_interleaving) | [Tutorials/Features](Tutorials/Features) | The basic usage of the `max_interleaving` attribute <br> How the `max_interleaving` attribute affects loop resource use <br> How to apply the `max_interleaving` attribute to loops in your program
93+
| [memory_attributes](Tutorials/Features/memory_attributes) | [Tutorials/Features](Tutorials/Features) | The basic concepts of on-chip memory attributes <br> How to apply memory attributes in your program <br> How to confirm that the memory attributes were respected by the compiler <br> A case study of the type of performance/area trade-offs enabled by memory attributes
94+
| [pipes](Tutorials/Features/pipes) | [Tutorials/Features](Tutorials/Features) | The basics of using SYCL*-compliant pipes extension for FPGA <br> How to declare and use pipes
95+
| [printf](Tutorials/Features/printf) | [Tutorials/DesignPatterns](Tutorials/DesignPatterns) | How to declare and use `printf` in program
96+
| [register_map_and_streaming_interfaces (experimental)](Tutorials/Features/experimental/register_map_and_streaming_interfaces) | [Tutorials/Features](Tutorials/Features) | How to specify the kernel invocation interface and kernel argument interfaces
97+
9698

9799
#### Tier 3: Explore the Advances Techniques
98100

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
if(UNIX)
2+
# Direct CMake to use icpx rather than the default C++ compiler/linker
3+
set(CMAKE_CXX_COMPILER icpx)
4+
else() # Windows
5+
# Force CMake to use icpx rather than the default C++ compiler/linker
6+
# (needed on Windows only)
7+
include (CMakeForceCompiler)
8+
CMAKE_FORCE_CXX_COMPILER (icx-cl IntelDPCPP)
9+
include (Platform/Windows-Clang)
10+
endif()
11+
12+
cmake_minimum_required (VERSION 3.4)
13+
14+
project(register_map_and_streaming_interfaces CXX)
15+
16+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
17+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
18+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
19+
20+
add_subdirectory (src)

0 commit comments

Comments
 (0)