From 66e6b94a4a0ea2c47b79a0a9ec3e3763b280dd8e Mon Sep 17 00:00:00 2001 From: Andrew Gozillon Date: Mon, 8 Apr 2019 17:22:57 -0700 Subject: [PATCH 1/3] Platform installation documentation This will most likely need reformatted. --- sycl/doc/XilinxFPGACompilation.md | 38 +++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/sycl/doc/XilinxFPGACompilation.md b/sycl/doc/XilinxFPGACompilation.md index a38d191f6222..12552d327497 100644 --- a/sycl/doc/XilinxFPGACompilation.md +++ b/sycl/doc/XilinxFPGACompilation.md @@ -31,6 +31,39 @@ Installing Xilinx FPGA compatible software stack: 2. Xilinx runtime (XRT) for FPGAs: Download, build and install [XRT](https://github.com/Xilinx/XRT), this contains the OpenCL runtime. 3. Xilinx SDx (2018.3+): Download and Install [SDx](https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/sdx-development-environments.html) which contains the `xocc` compiler. +## Platforms + +It's of note that the SDx 2018.3 install comes with several platforms that do +not work with the SYCL compiler, i.e. the ZYNC family of boards. Instead, you'll +have to use one of the newer boards, like the Alveo U250 (xilinx_u250_xdma_201830_1). +This requires some additional installation steps for the moment as it doesn't come +packaged with the SDx download for the moment. + +How to: + 1) Download the Deployment and Development Shell for your OS from the [Alveo U250 getting started page](https://www.xilinx.com/products/boards-and-kits/alveo/u250.html#gettingStarted). + Note: you can also install the release version of the XRT runtime from here if you would rather use this than build from source. + 2) a) Install XRT if you haven't already: ``sudo apt install xrt_201830.2.1.1695_-xrt.deb`` + b) Install the Deployment Shell: + ``sudo apt install /xilinx-u250-xdma-201830.1_.deb`` + c) Install the Development Shell: + ``sudo apt install /xilinx-vcu1525-xdma-201830.1-dev_.deb`` + +If you have trouble installing these via the package manager (for example using +a newer distribution like Ubuntu 18.10) it's possible to extract the files and +manually install them. The directory structure of the package mimics the default +install locations on your system, e.g. /opt/xilinx/platforms. If you choose the +extraction route then all you really require for emulation is the files inside +the Development Shell. + +The main files required for emulation of a U250 board are found inside the Development Shell under platforms. + +The main files required for deployment to a U250 board are inside the Deployment +Shell. + +This set of instructions should be applicable to other boards you wish to test, +you can search for boards via the [boards-and-kits](https://www.xilinx.com/products/boards-and-kits/) +page. + ## Environment & Setup For the moment this projects only been tested on Linux (Ubuntu 18.10), so for @@ -43,7 +76,7 @@ execution of SYCL on FPGAs requires the following: To setup SDx for access to the `xocc` compiler the following steps are required: ```bash -export XILINX_SDX=/path_to/SDx/2019.1 +export XILINX_SDX=/path_to/SDx/2018.3 PATH=$XILINX_SDX/bin:$XILINX_SDX/lib/lnx64.o:$PATH ``` @@ -83,7 +116,7 @@ platform your trying to compile for and the runtime the platform it should be executing for. ```bash -export XILINX_PLATFORM=zed +export XILINX_PLATFORM=xilinx_u250_xdma_201830_1 ``` Generate an emulation configuration file, this should be in the executable @@ -144,3 +177,4 @@ compiler. * Ubuntu 18.10 * XRT 2018.3 * SDx 2018.3 +* Alveo U250 Platform: xilinx_u250_xdma_201830_1 From a406cdb337f383da8c0bc09ad99fd05407ba91e5 Mon Sep 17 00:00:00 2001 From: agozillon Date: Mon, 8 Apr 2019 18:00:15 -0700 Subject: [PATCH 2/3] Update XilinxFPGACompilation.md A lot of formatting and some corrections. --- sycl/doc/XilinxFPGACompilation.md | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/sycl/doc/XilinxFPGACompilation.md b/sycl/doc/XilinxFPGACompilation.md index 12552d327497..2b319de5a82d 100644 --- a/sycl/doc/XilinxFPGACompilation.md +++ b/sycl/doc/XilinxFPGACompilation.md @@ -35,23 +35,20 @@ Installing Xilinx FPGA compatible software stack: It's of note that the SDx 2018.3 install comes with several platforms that do not work with the SYCL compiler, i.e. the ZYNC family of boards. Instead, you'll -have to use one of the newer boards, like the Alveo U250 (xilinx_u250_xdma_201830_1). +have to use one of the newer boards, like the Alveo U250 (*xilinx_u250_xdma_201830_1*). This requires some additional installation steps for the moment as it doesn't come -packaged with the SDx download for the moment. +packaged with the SDx download. How to: - 1) Download the Deployment and Development Shell for your OS from the [Alveo U250 getting started page](https://www.xilinx.com/products/boards-and-kits/alveo/u250.html#gettingStarted). - Note: you can also install the release version of the XRT runtime from here if you would rather use this than build from source. - 2) a) Install XRT if you haven't already: ``sudo apt install xrt_201830.2.1.1695_-xrt.deb`` - b) Install the Deployment Shell: - ``sudo apt install /xilinx-u250-xdma-201830.1_.deb`` - c) Install the Development Shell: - ``sudo apt install /xilinx-vcu1525-xdma-201830.1-dev_.deb`` + 1. Download the Deployment and Development Shell for your OS from the [Alveo U250 getting started page](https://www.xilinx.com/products/boards-and-kits/alveo/u250.html#gettingStarted). **Note**: you can also install the release version of the XRT runtime from here if you would rather use this than build from source. + 2. 1. Install XRT if you haven't already: ``sudo apt install xrt_201830.2.1.1695_-xrt.deb`` + 2. Install the Deployment Shell: ``sudo apt install xilinx-u250-xdma-201830.1_.deb`` + 3. Install the Development Shell: ``sudo apt install xilinx-u250-xdma-201830.1-dev_.deb`` If you have trouble installing these via the package manager (for example using a newer distribution like Ubuntu 18.10) it's possible to extract the files and manually install them. The directory structure of the package mimics the default -install locations on your system, e.g. /opt/xilinx/platforms. If you choose the +install locations on your system, e.g. */opt/xilinx/platforms*. If you choose the extraction route then all you really require for emulation is the files inside the Development Shell. From 36774413adc41562b42edc0f4160461c98378758 Mon Sep 17 00:00:00 2001 From: Andrew Gozillon Date: Wed, 10 Apr 2019 11:49:07 -0700 Subject: [PATCH 3/3] Addressing the review comments and some minor refactoring of XilinxFPGACompilation.md --- sycl/doc/XilinxFPGACompilation.md | 38 +++++++++++++++++-------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/sycl/doc/XilinxFPGACompilation.md b/sycl/doc/XilinxFPGACompilation.md index 2b319de5a82d..351458964b05 100644 --- a/sycl/doc/XilinxFPGACompilation.md +++ b/sycl/doc/XilinxFPGACompilation.md @@ -24,26 +24,29 @@ moment, they are not the simple whims of the insane! Hopefully.. ## Software requirements Installing Xilinx FPGA compatible software stack: - 1. OpenCL headers: On Ubuntu/Debian this can be done by installing the - opencl-c-headers package, e.g. `apt install opencl-c-headers`. - Alternatively the headers can be download from - [github.com/KhronosGroup/OpenCL-Headers](https://github.com/KhronosGroup/OpenCL-Headers) - 2. Xilinx runtime (XRT) for FPGAs: Download, build and install [XRT](https://github.com/Xilinx/XRT), this contains the OpenCL runtime. - 3. Xilinx SDx (2018.3+): Download and Install [SDx](https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/sdx-development-environments.html) which contains the `xocc` compiler. + 1. OpenCL headers: On Ubuntu/Debian this can be done by installing the + opencl-c-headers package, e.g. `apt install opencl-c-headers`. + Alternatively the headers can be download from + [github.com/KhronosGroup/OpenCL-Headers](https://github.com/KhronosGroup/OpenCL-Headers) + 2. Xilinx runtime (XRT) for FPGAs: Download, build and install [XRT](https://github.com/Xilinx/XRT), + this contains the OpenCL runtime. + 3. Xilinx SDx (2018.3+): Download and Install [SDx](https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/sdx-development-environments.html) + which contains the `xocc` compiler. ## Platforms It's of note that the SDx 2018.3 install comes with several platforms that do -not work with the SYCL compiler, i.e. the ZYNC family of boards. Instead, you'll -have to use one of the newer boards, like the Alveo U250 (*xilinx_u250_xdma_201830_1*). -This requires some additional installation steps for the moment as it doesn't come -packaged with the SDx download. +not work with the SYCL compiler. Instead, you'll have to use one of the newer +boards, like the Alveo U250 (*xilinx_u250_xdma_201830_1*). This requires some +additional installation steps as it doesn't come packaged with the SDx download. How to: - 1. Download the Deployment and Development Shell for your OS from the [Alveo U250 getting started page](https://www.xilinx.com/products/boards-and-kits/alveo/u250.html#gettingStarted). **Note**: you can also install the release version of the XRT runtime from here if you would rather use this than build from source. - 2. 1. Install XRT if you haven't already: ``sudo apt install xrt_201830.2.1.1695_-xrt.deb`` - 2. Install the Deployment Shell: ``sudo apt install xilinx-u250-xdma-201830.1_.deb`` - 3. Install the Development Shell: ``sudo apt install xilinx-u250-xdma-201830.1-dev_.deb`` + 1. Download the Deployment and Development Shells from the + [Alveo U250 getting started page](https://www.xilinx.com/products/boards-and-kits/alveo/u250.html#gettingStarted). + In the following instructions we assume Debian/Ubuntu Linux, however RHEL + and CentOS packages are also available. + 2. 1. Install the Deployment Shell: ``sudo apt install xilinx-u250-xdma-201830.1_.deb`` + 2. Install the Development Shell: ``sudo apt install xilinx-u250-xdma-201830.1-dev_.deb`` If you have trouble installing these via the package manager (for example using a newer distribution like Ubuntu 18.10) it's possible to extract the files and @@ -52,7 +55,8 @@ install locations on your system, e.g. */opt/xilinx/platforms*. If you choose th extraction route then all you really require for emulation is the files inside the Development Shell. -The main files required for emulation of a U250 board are found inside the Development Shell under platforms. +The main files required for emulation of a U250 board are found inside the +Development Shell under platforms. The main files required for deployment to a U250 board are inside the Deployment Shell. @@ -67,8 +71,8 @@ For the moment this projects only been tested on Linux (Ubuntu 18.10), so for now we shall only detail the minimum setup required in this context. In addition to the required environment variables for the base SYCL -implementation specified in [GetStartedWithSYCLCompiler.md](GetStartedWithSYCLCompiler.md); compilation and -execution of SYCL on FPGAs requires the following: +implementation specified in [GetStartedWithSYCLCompiler.md](GetStartedWithSYCLCompiler.md); +compilation and execution of SYCL on FPGAs requires the following: To setup SDx for access to the `xocc` compiler the following steps are required: