Skip to content

Commit b1616a6

Browse files
Batch and SVM (#2)
* toggle interleaving using cmd line args, svm init * modified tests based on interleaving args * enabled fast emulation * Working svm host code * Buffer locations attribute in fft3d kernel * working batch fft3d svm * working 3D FFT with bitrev diagonal transpose * loop coalesced fft kernels * fft3d: single loop dbl buffered fetch * fft3d: fetch_transpose working * Buffer location in stores - buffer location to enable DDR stores in SVM, - print iteration wise performance measurments - modify kernel names in host to match the kernel * FFT2d: bram dbl buf and single loop * correct svm buffer flags, init output buffer, fft1d iter * clFinish stms in DDR buffer reads * FFT3D: separated svm and ddr * FFT3D: Working opt bram transpose, bool instead of int * FFT3D: renamed bram transpose files, dependencies * CI: fixed host executable names * FFT1d: working svm * CI: corrected build, artifact paths * Test: fix path to 2d bram * CI: Adding release debug to restrict prints * Test: fixed path for 3d FFT DDR * modified verification function * Working DDR batch of 2 * working DDR batch for all * Split to individual files * Hw Counters and const inp * Reordered host kernel calls, removed channel depth * batched fft3d with safelen * fixed host code for svm, svm batch * working svm batch * no verify param * free forgotten * porting example to cpp, using cxxopts, cmake files to folder * removed argparse, refactored timing * verify bitrev fft1d, using opt bram fft3d * working ddr batch * streamlined synth path * identical fft3d ddr and svm kernels * updated tests * removed extern modules * removed common cl files to common dir * gitlab ci update * updated readme * updated changelog * fixed args in fft1d, fft2d * fixed ddr batch and renamed queues * added additional variants to application selection * expressive emulation and report generation * cleaned up application files * fixed emulation dependency in test * draft userguide * fixed gitlab ci * added power scripts * minor change * updated changelog * ci: test fft1d * updated ci with 2d, 3d variants * removed fft3d bram due to lack of cpu resources * cmake build type selection * removed caching cmake variables for sdk and bsp * modified readme and updated userguide Authored-by: Arjun Ramaswami <[email protected]>
1 parent 231ab4d commit b1616a6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+10086
-4244
lines changed

.gitignore

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
build/
2-
debug/
1+
build*/
2+
debug*/
33
test/
44
bin/
55
fpgabitstream/
66
reports/
77
vscode/
8-
scripts/
8+
scripts/slurm
9+
build*
10+
svm_build/
11+
debug*
12+
test_*
913

1014
tags
1115
*.DS_Store

.gitlab-ci.yml

Lines changed: 39 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,58 @@ variables:
44
stages:
55
- build
66
- test
7+
- test_fft1d
8+
- test_fft2d_ddr
9+
- test_fft2d_bram
10+
- test_fft3d_ddr
711

812
build-all:
913
stage: build
1014
script:
1115
- rm -rf build
1216
- mkdir -p build && cd build
13-
- cmake -DLOG_FFT_SIZE=6 ..
17+
- srun -A pc2-mitarbeiter -p fpga --constraint=emul --pty bash
18+
- cmake -DLOG_FFT_SIZE=6 -DCMAKE_BUILD_TYPE=Release ..
1419
- make
15-
- make fft1d_emu
16-
- make fft2d_ddr_emu
17-
- make fft2d_bram_emu
18-
- make fft3d_ddr_triv_emu
19-
- make fft3d_bram_emu
20-
- chmod +x bin/fft3d bin/fft2d bin/fft1d bin/test_fftfpga
20+
- chmod +x bin/fft
2121
artifacts:
2222
paths:
23-
- build/bin/emu_64_fft1d/fft1d.aocx
24-
- build/bin/emu_64_fft2d_ddr/fft2d_bram.aocx
25-
- build/bin/emu_64_fft2d_bram/fft2d_ddr.aocx
26-
- build/bin/emu_64_fft3d_ddr_triv/fft3d_ddr_triv.aocx
27-
- build/bin/emu_64_fft3d_bram/fft3d_bram.aocx
23+
- build/bin/p520_hpc_sg280l/emulation/fft1d_64_nointer/fft1d.aocx
24+
- build/bin/p520_hpc_sg280l/emulation/fft2d_bram_64_nointer/fft2d_bram.aocx
25+
- build/bin/p520_hpc_sg280l/emulation/fft2d_ddr_64_nointer/fft2d_ddr.aocx
26+
- build/bin/p520_hpc_sg280l/emulation/fft3d_ddr_64_nointer/fft3d_ddr.aocx
27+
- build/bin/p520_hpc_sg280l/emulation/fft3d_bram_64_nointer/fft3d_bram.aocx
2828
- build/bin/test_fftfpga
29-
- build/bin/fft3d
30-
- build/bin/fft2d
31-
- build/bin/fft1d
29+
- build/bin/fft
3230

3331
test-all:
3432
stage: test
3533
script:
3634
- cd build/bin/
37-
- CL_CONTEXT_EMULATOR_DEVICE_INTELFPGA=1 ./test_fftfpga
35+
- CL_CONFIG_CPU_EMULATE_DEVICES=1 ./test_fftfpga
3836
dependencies:
39-
- build-all
37+
- build-all
38+
39+
test-fft1d:
40+
stage: test_fft1d
41+
script:
42+
- cd build/bin/
43+
- ./fft -n 64 -d 1 --emulate -p p520_hpc_sg280l/emulation/fft1d_64_nointer/fft1d.aocx
44+
45+
test-fft2d_ddr:
46+
stage: test_fft2d_ddr
47+
script:
48+
- cd build/bin/
49+
- ./fft -n 64 -d 2 --emulate -p p520_hpc_sg280l/emulation/fft2d_ddr_64_nointer/fft2d_ddr.aocx
50+
51+
test-fft2d_bram:
52+
stage: test_fft2d_bram
53+
script:
54+
- cd build/bin/
55+
- ./fft -n 64 -d 2 --emulate --use_bram -p p520_hpc_sg280l/emulation/fft2d_bram_64_nointer/fft2d_bram.aocx
56+
57+
test-fft3d_ddr:
58+
stage: test_fft3d_ddr
59+
script:
60+
- cd build/bin/
61+
- ./fft -n 64 -d 3 --emulate -p p520_hpc_sg280l/emulation/fft3d_ddr_64_nointer/fft3d_ddr.aocx

.gitmodules

Lines changed: 0 additions & 12 deletions
This file was deleted.

CHANGELOG

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,15 @@
11
# Changelog
2+
23
All notable changes to this project will be documented in this file.
34

45
## Unreleased
5-
- coarse grained SVM support for Intel FPGAs
6-
- host code as library
7-
- configurable platform name
8-
- choice of platform (currently chooses first platform)
9-
- choice of device (currently chooses first device)
10-
- loads binary to multiple devices (currently only the first device)
11-
- batch mode
12-
- xilinx fpgas
136

14-
## [1.0.0] - []
7+
- configurable CL platform and device
8+
9+
## [1.0.0] - [18.10.2021]
1510

16-
### Added
17-
- 3d FFT in 2 varients, in bram and ddr transpose
18-
- 2d FFT in 2 varients, in bram and ddr transpose
19-
- 1d FFT
20-
- CI/CD
21-
- gtests
22-
- CMake build
23-
- License
11+
- 1d, 2d, 3d FFT with variants on the location of the transposition
12+
- Batched 3D FFT to schedule multiple transformations by overlapping data transfers and FFT computations
13+
- Using OpenCL Shared Virtual Memory (SVM) for data transfers between FPGA and host
14+
- Unit tests
15+
- CMake build system

CMakeLists.txt

Lines changed: 27 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,40 @@
11
# Author: Arjun Ramaswami
2-
cmake_minimum_required (VERSION 3.1)
3-
4-
project(fft)
2+
cmake_minimum_required (VERSION 3.10)
3+
project(fft VERSION 2.0
4+
DESCRIPTION "OpenCL based FFT library for Intel FPGAs"
5+
LANGUAGES C CXX)
56

67
set(CMAKE_C_STANDARD 11)
7-
88
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
99

10-
# Setup submodules that are required
11-
find_package(Git QUIET)
12-
if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
13-
# Update submodules as needed
14-
option(GIT_SUBMODULE "Check submodules during build" ON)
15-
if(GIT_SUBMODULE)
16-
message(STATUS "Submodule update")
17-
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
18-
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
19-
RESULT_VARIABLE GIT_SUBMOD_RESULT)
20-
if(NOT GIT_SUBMOD_RESULT EQUAL "0")
21-
message(FATAL_ERROR "git submodule update --init failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
22-
endif()
23-
endif()
24-
endif()
25-
26-
# Include hlslib in CMake module path
27-
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/extern/hlslib/cmake)
10+
# build external dependencies
11+
message("-- Building external dependencies")
12+
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/extDep.cmake)
2813

29-
# Find hlslib Intel OpenCL kernels
14+
## find Intel FPGA SDK for OpenCL
3015
find_package(IntelFPGAOpenCL REQUIRED)
31-
32-
# Find FFTW
33-
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/extern/findFFTW)
34-
35-
find_package(FFTW)
36-
if(FFTW_FOUND)
37-
message("-- FFTW library found")
38-
else()
39-
message(WARNING, "FFTW library not found")
16+
message("-- IntelFPGAOpenCL found")
17+
18+
## find FFTW
19+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
20+
find_package(FFTW REQUIRED)
21+
message("-- FFTW found")
22+
23+
# Set a default build type if none was specified
24+
if(NOT CMAKE_BUILD_TYPE)
25+
message(STATUS "Setting build type to 'Debug' as none was specified.")
26+
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
27+
# Set the possible values of build type for cmake-gui
28+
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
29+
"RelWithDebInfo")
4030
endif()
4131

42-
# Link argparse as static library
43-
add_subdirectory(${CMAKE_SOURCE_DIR}/extern/argparse)
44-
45-
# Add sub directories
32+
# sub directories
4633
add_subdirectory(api)
4734
add_subdirectory(kernels)
4835
add_subdirectory(examples)
4936

50-
# GTest Setup
51-
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
52-
option(PACKAGE_TESTS "Build the tests" ON)
53-
endif()
54-
55-
if(PACKAGE_TESTS)
56-
enable_testing()
57-
include(GoogleTest)
58-
add_subdirectory(tests)
59-
endif()
60-
61-
# TODO: shift to external project instead of submodules as suggested by GTest
37+
# build tests
38+
message("-- Building tests")
39+
add_subdirectory(tests)
40+
enable_testing()

0 commit comments

Comments
 (0)