-
Notifications
You must be signed in to change notification settings - Fork 788
[SYCL][FPGA] Support Intel FPGA simulator device selector #6715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
acbfc63
Support Intel FPGA simulator device selector
mendell27 f961817
Fix clang-format problems found
mendell27 18f6943
Use _putenv_s to set env for FPGA simulator
mendell27 4824689
Support Intel FPGA simulator device selector
mendell27 652163a
Use _putenv_s to set env for FPGA simulator
mendell27 c2eb7dc
Redo implementation to re-use existing code
mendell27 1ab603d
Redo implementation to re-use existing code
mendell27 bc368a1
Merge branch 'intel:fpga_simulator_device' into fpga_simulator_device
mendell27 d141b1d
Clean implementation of fpga_simulator_selector
mendell27 1be2e53
Remove incorrect #ifndef for version change
mendell27 23f37ea
Rewrite documentation using asciidoc template
mendell27 202fc47
Correct doc errors
mendell27 47b020a
Make more doc fixes
mendell27 242d844
Make changes from doc review
mendell27 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
125 changes: 125 additions & 0 deletions
125
sycl/doc/extensions/supported/sycl_ext_intel_fpga_device_selector.asciidoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
= sycl_ext_intel_fpga_device_selector | ||
|
||
:source-highlighter: coderay | ||
:coderay-linenums-mode: table | ||
|
||
// This section needs to be after the document title. | ||
:doctype: book | ||
:toc2: | ||
:toc: left | ||
:encoding: utf-8 | ||
:lang: en | ||
:dpcpp: pass:[DPC++] | ||
|
||
// Set the default source code type in this document to C++, | ||
// for syntax highlighting purposes. This is needed because | ||
// docbook uses c++ and html5 uses cpp. | ||
:language: {basebackend@docbook:c++:cpp} | ||
|
||
|
||
== Notice | ||
|
||
[%hardbreaks] | ||
Copyright (C) 2022-2022 Intel Corporation. All rights reserved. | ||
|
||
Khronos(R) is a registered trademark and SYCL(TM) and SPIR(TM) are trademarks | ||
of The Khronos Group Inc. OpenCL(TM) is a trademark of Apple Inc. used by | ||
permission by Khronos. | ||
|
||
|
||
== Contact | ||
|
||
To report problems with this extension, please open a new issue at: | ||
|
||
https://github.com/intel/llvm/issues | ||
|
||
|
||
== Dependencies | ||
|
||
This extension is written against the SYCL 2020 revision 5 specification. All | ||
references below to the "core SYCL specification" or to section numbers in the | ||
SYCL specification refer to that revision. | ||
|
||
== Status | ||
|
||
This extension is implemented and fully supported by {dpcpp}. | ||
|
||
[NOTE] | ||
==== | ||
This extension is currently implemented in {dpcpp} only for FPGA devices. | ||
In the {dpcpp} implementation, the application must be built with | ||
"-Xshardware" in order to use an FPGA hardware device. | ||
In the {dpcpp} implementation, the application must be built with | ||
"-Xssimulation" in order to use an FPGA simulator device. | ||
==== | ||
|
||
|
||
== Overview | ||
|
||
This extension provides selectors to choose between FPGA hardware devices, FPGA | ||
simulator devices, and FPGA emulator devices. The current implementation is | ||
based on the platform name. This is useful in the most common case when the | ||
user has one FPGA board installed in their system (one device per platform). | ||
|
||
To use these selectors, add | ||
.... | ||
#include <sycl/ext/intel/fpga_device_selector.hpp> | ||
.... | ||
to your source code. | ||
|
||
|
||
== Specification | ||
|
||
=== Feature test macro | ||
|
||
This extension provides a feature-test macro as described in the core SYCL | ||
specification. An implementation supporting this extension must predefine the | ||
macro `SYCL_EXT_INTEL_FPGA_DEVICE_SELECTOR` to one of the values defined in the table | ||
below. Applications can test for the existence of this macro to determine if | ||
the implementation supports this feature, or applications can test the macro's | ||
value to determine which of the extension's features the implementation | ||
supports. | ||
|
||
[%header,cols="1,5"] | ||
|=== | ||
|Value | ||
|Description | ||
|
||
|1 | ||
|Initial version of this extension. Base features are supported. | ||
|
||
|2 | ||
|fpga_simulator_selector added. | ||
|=== | ||
|
||
=== Select FPGA hardware device | ||
.... | ||
// select FPGA hardware device | ||
sycl::queue deviceQueue{sycl::ext::intel::fpga_selector{}}; | ||
.... | ||
|
||
=== Select FPGA simulator device | ||
.... | ||
// select FPGA simulator device | ||
sycl::queue deviceQueue{sycl::ext::intel::fpga_simulator_selector{}}; | ||
.... | ||
|
||
[NOTE] | ||
==== | ||
Added in version 2 of this extension. | ||
==== | ||
|
||
=== Select FPGA emulator device | ||
.... | ||
// select FPGA emulator device | ||
sycl::queue deviceQueue{sycl::ext::intel::fpga_emulator_selector{}}; | ||
.... | ||
|
||
== Implementation notes | ||
|
||
The current implementation has a restriction on the use of | ||
`fpga_simulator_selector`. If an object of `fpga_simulator_selector` is | ||
defined in the application, FPGA hardware devices selected using | ||
`fpga_selector` will select a simulator device. This behaviour is expected to | ||
be eliminated in the future. | ||
|
41 changes: 0 additions & 41 deletions
41
sycl/doc/extensions/supported/sycl_ext_intel_fpga_device_selector.md
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.