Conversation
Signed-off-by: horobert <horobert@intel.com>
DirectProgramming/DPC++FPGA/Tutorials/Features/task_sequence/CMakeLists.txt
Outdated
Show resolved
Hide resolved
DirectProgramming/DPC++FPGA/Tutorials/Features/task_sequence/sample.json
Outdated
Show resolved
Hide resolved
| # 1. The "compile" stage compiles the device code to an intermediate representation (SPIR-V). | ||
| # 2. The "link" stage invokes the compiler's FPGA backend before linking. | ||
| # For this reason, FPGA backend flags must be passed as link flags in CMake. | ||
| set(EMULATOR_COMPILE_FLAGS "-Wall ${WIN_FLAG} -fintelfpga -DFPGA_EMULATOR -g0") |
There was a problem hiding this comment.
Any particular reason for adding -g0 here and below?
There was a problem hiding this comment.
At the time, there was a bug in the emulator with task_sequence that made it incompatible with anything but g0 (detailed in a release note). I will doublecheck this now as I believe the bug has been fixed.
| @@ -0,0 +1,313 @@ | |||
|
|
|||
There was a problem hiding this comment.
Just being super pedantic but you can remove these two empty lines
DirectProgramming/DPC++FPGA/Tutorials/Features/task_sequence/README.md
Outdated
Show resolved
Hide resolved
| #include <ext/intel/experimental/task_sequence.hpp> | ||
| #include <sycl/ext/intel/fpga_extensions.hpp> | ||
|
|
||
| // dpc_common.hpp can be found in the dev-utilities include folder. |
There was a problem hiding this comment.
Remove the comment on where to find dpc_common
| // 's' | ||
| ValueT dotProduct(ValueT* v, size_t s, size_t sz) { | ||
| int result = 1; | ||
| for (size_t i = s; i < s + sz; i++) result *= v[i]; |
There was a problem hiding this comment.
This is not a dot product, this is a reduction :)
A dot product would be result += v1[i] * v2[i];
| } | ||
|
|
||
| // return the absolute value of 'x' | ||
| template <typename T> |
| parallelTime = (double)(end - start) * 1e-6; | ||
| } | ||
|
|
||
| if (abs(out[0] - golden) < (ValueT)0.001) |
There was a problem hiding this comment.
Please use { } here and below
| std::cerr << "Caught a SYCL host exception:\n" << e.what() << "\n"; | ||
| std::terminate(); | ||
| } | ||
| } |
There was a problem hiding this comment.
I really like your coding style, I wish my code was as clean as yours!
|
As usual, I'll ask you to provide me with SPETC links to your linux and windows runs of the tutorial :) |
DirectProgramming/DPC++FPGA/Tutorials/Features/task_sequence/CMakeLists.txt
Outdated
Show resolved
Hide resolved
DirectProgramming/DPC++FPGA/Tutorials/Features/task_sequence/CMakeLists.txt
Outdated
Show resolved
Hide resolved
DirectProgramming/DPC++FPGA/Tutorials/Features/task_sequence/CMakeLists.txt
Outdated
Show resolved
Hide resolved
DirectProgramming/DPC++FPGA/Tutorials/Features/task_sequence/License.txt
Outdated
Show resolved
Hide resolved
| @@ -0,0 +1,25 @@ | |||
|
|
|||
There was a problem hiding this comment.
Please remove this file entirely
| # dpcpp -fintelfpga -Xshardware -Xsboard=<FPGA_BOARD> -fsycl-link=early task_sequence.cpp -o task_sequence_report.a | ||
| set(FPGA_EARLY_IMAGE ${TARGET_NAME}_report.a) | ||
| # The compile output is not an executable, but an intermediate compilation result unique to DPC++. | ||
| add_executable(${FPGA_EARLY_IMAGE} ${SOURCE_FILE}) |
There was a problem hiding this comment.
| add_executable(${FPGA_EARLY_IMAGE} ${SOURCE_FILE}) | |
| add_executable(${FPGA_EARLY_IMAGE} ${SOURCE_FILE}) | |
| target_include_directories(${FPGA_EARLY_IMAGE} PRIVATE ../../../../../include) |
| # CMake executes: | ||
| # [compile] dpcpp -fintelfpga -o task_sequence.cpp.o -c task_sequence.cpp | ||
| # [link] dpcpp -fintelfpga -Xshardware -Xsboard=<FPGA_BOARD> task_sequence.cpp.o -o task_sequence.fpga | ||
| add_executable(${FPGA_TARGET} EXCLUDE_FROM_ALL ${SOURCE_FILE}) |
There was a problem hiding this comment.
| add_executable(${FPGA_TARGET} EXCLUDE_FROM_ALL ${SOURCE_FILE}) | |
| add_executable(${FPGA_TARGET} EXCLUDE_FROM_ALL ${SOURCE_FILE}) | |
| target_include_directories(${FPGA_TARGET} PRIVATE ../../../../../include) |
DirectProgramming/DPC++FPGA/Tutorials/Features/task_sequence/src/task_sequence.cpp
Outdated
Show resolved
Hide resolved
DirectProgramming/DPC++FPGA/Tutorials/Features/task_sequence/src/task_sequence.cpp
Outdated
Show resolved
Hide resolved
DirectProgramming/DPC++FPGA/Tutorials/Features/task_sequence/third-party-programs.txt
Outdated
Show resolved
Hide resolved
…MakeLists.txt Co-authored-by: yuguen-intel <yohann.uguen@intel.com>
…ample.json Co-authored-by: yuguen-intel <yohann.uguen@intel.com>
…EADME.md Co-authored-by: yuguen-intel <yohann.uguen@intel.com>
…MakeLists.txt Co-authored-by: yuguen-intel <yohann.uguen@intel.com>
…MakeLists.txt Co-authored-by: yuguen-intel <yohann.uguen@intel.com>
Co-authored-by: yuguen-intel <yohann.uguen@intel.com>
Existing Sample Changes
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes Issue#
External Dependencies
List any external dependencies created as a result of this change.
Type of change
Please delete options that are not relevant. Add a 'X' to the one that is applicable.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Delete this line and everything below if this is not a PR for a new code sample
Delete this line and all above it if this PR is for a new code sample
Adding a New Sample(s)
Description
Please include a description of the sample
Checklist
Administrative
Code Development
Security and Legal
Review