diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index eb8b8971..e06fea16 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -1,24 +1,35 @@ +# A work-flow for generating documentation given a PR +# Builds Sphinx documentation, uploads the generated HTML files as artefacts and deploys them to GitHub Pages name: Build docs +# It runs on every push, but it only generates the documentation from master (which makes sense) on: push jobs: sphinx-build: + # Target platform; mostly doesn't matter for HTML websites generated from Sphinx runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + + # 1) Build HTML from Sphinx - name: Build HTML + uses: ammaraskar/sphinx-action@0.4 with: pre-build-command: "apt install -y pandoc" - uses: ammaraskar/sphinx-action@0.4 + + # 2) Upload the generated HTML - name: Upload artifacts - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: html-docs path: docs/build/html/ + + # 3) Deploy using GitHub pages, but only if the branch == master - name: Deploy uses: peaceiris/actions-gh-pages@v3 if: github.ref == 'refs/heads/master' with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: docs/build/html \ No newline at end of file + publish_dir: docs/build/html diff --git a/.github/workflows/compile_driver.yaml b/.github/workflows/compile_driver.yaml new file mode 100644 index 00000000..c4ac0c5a --- /dev/null +++ b/.github/workflows/compile_driver.yaml @@ -0,0 +1,18 @@ +# A work-flow for compiling the Coyote driver; for now, we are testing on Ubuntu 20.04 +# This checks no extreme breaking changes were done in the driver, i.e. at least it compiles +name: Compile driver + +# Run on every push, makes dev and PR reviews easier +on: push + +jobs: + compile-driver: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v4 + + # We do some additional logging, just so that we can back-trace the Linux / Ubuntu version + - name: Compile driver + run: + cd driver && uname -r && lsb_release -a && make diff --git a/.github/workflows/compile_software.yaml b/.github/workflows/compile_software.yaml new file mode 100644 index 00000000..0f0f3666 --- /dev/null +++ b/.github/workflows/compile_software.yaml @@ -0,0 +1,147 @@ +# A work-flow for compiling the Coyote software examples; for now, we are testing on Ubuntu 20.04 +# This checks no extreme breaking changes were done in the examples & software, i.e. at least it compiles +name: Compile software + +# Run on every push, makes dev and PR reviews easier +on: push + +jobs: + compile-kmeans: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v4 + + - name: Environment set-up + run: + mkdir examples_sw/build && sudo apt-get install libboost-all-dev + + - name: Compile kmeans + run: + cd examples_sw/build && cmake ../ -DEXAMPLE=kmeans -DVERBOSITY=ON && make + + compile-multi-threading: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v4 + + - name: Environment set-up + run: + mkdir examples_sw/build && sudo apt-get install libboost-all-dev + + - name: Compile multi-threading + run: + cd examples_sw/build && cmake ../ -DEXAMPLE=multithreading -DVERBOSITY=ON && make + + compile-perf-fpga: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v4 + + - name: Environment set-up + run: + mkdir examples_sw/build && sudo apt-get install libboost-all-dev + + - name: Compile perf FPGA + run: + cd examples_sw/build && cmake ../ -DEXAMPLE=perf_fpga -DVERBOSITY=ON && make + + compile-perf-local: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v4 + + - name: Environment set-up + run: + mkdir examples_sw/build && sudo apt-get install libboost-all-dev + + - name: Compile perf local + run: + cd examples_sw/build && cmake ../ -DEXAMPLE=perf_local -DVERBOSITY=ON && make + + compile-reconfigure-shell: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v4 + + - name: Environment set-up + run: + mkdir examples_sw/build && sudo apt-get install libboost-all-dev + + - name: Compile reconfigure shell + run: + cd examples_sw/build && cmake ../ -DEXAMPLE=reconfigure_shell -DVERBOSITY=ON && make + + compile-streaming-client: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v4 + + - name: Environment set-up + run: + mkdir examples_sw/build && sudo apt-get install libboost-all-dev + + - name: Compile streaming client + run: + cd examples_sw/build && cmake ../ -DEXAMPLE=streaming_client -DVERBOSITY=ON && make + + compile-streaming-server: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v4 + + - name: Environment set-up + run: + mkdir examples_sw/build && sudo apt-get install libboost-all-dev + + - name: Compile streaming server + run: + cd examples_sw/build && cmake ../ -DEXAMPLE=streaming_server -DVERBOSITY=ON && make + + compile-tcp-benchmark: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v4 + + - name: Environment set-up + run: + mkdir examples_sw/build && sudo apt-get install libboost-all-dev + + - name: Compile TCP benchmark + run: + cd examples_sw/build && cmake ../ -DEXAMPLE=tcp_iperf -DVERBOSITY=ON && make + + compile-rdma-client: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v4 + + - name: Environment set-up + run: + mkdir examples_sw/build && sudo apt-get install libboost-all-dev + + - name: Compile RDMA client + run: + cd examples_sw/build && cmake ../ -DEXAMPLE=rdma_client -DVERBOSITY=ON && make + + compile-rdma-server: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v4 + + - name: Environment set-up + run: + mkdir examples_sw/build && sudo apt-get install libboost-all-dev + + - name: Compile RDMA server + run: + cd examples_sw/build && cmake ../ -DEXAMPLE=rdma_server -DVERBOSITY=ON && make \ No newline at end of file diff --git a/cmake/FindCoyoteHW.cmake b/cmake/FindCoyoteHW.cmake index bafd9f2e..9328c1c0 100644 --- a/cmake/FindCoyoteHW.cmake +++ b/cmake/FindCoyoteHW.cmake @@ -1,7 +1,7 @@ # # Coyote HW package # -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) #project(CoyoteHW) set(IPREPO_DIR ${CMAKE_BINARY_DIR}/iprepo) diff --git a/cmake/FindCoyoteSW.cmake b/cmake/FindCoyoteSW.cmake index 1f9ded34..44b9d0d2 100644 --- a/cmake/FindCoyoteSW.cmake +++ b/cmake/FindCoyoteSW.cmake @@ -1,7 +1,7 @@ # # Coyote SW package # -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) # Config set(EN_AVX "1" CACHE STRING "AVX enabled.") diff --git a/cmake/FindVivado.cmake b/cmake/FindVivado.cmake index 1db955f6..8203e527 100644 --- a/cmake/FindVivado.cmake +++ b/cmake/FindVivado.cmake @@ -7,7 +7,7 @@ # VIVADO_FOUND # VIVADO_BINARY -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) find_path(VIVADO_PATH NAMES vivado diff --git a/cmake/FindVivadoHLS.cmake b/cmake/FindVivadoHLS.cmake index 6dc1bd44..eb69b65f 100644 --- a/cmake/FindVivadoHLS.cmake +++ b/cmake/FindVivadoHLS.cmake @@ -8,7 +8,7 @@ # VIVADO_HLS_BINARY # VIVADO_HLS_INCLUDE_DIRS -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) find_path(VIVADO_HLS_PATH NAMES vivado_hls vitis_hls diff --git a/docs/source/conf.py b/docs/source/conf.py index 502c4e03..22b223a6 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -190,7 +190,9 @@ # -- Options for intersphinx extension --------------------------------------- # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'https://docs.python.org/': None} +intersphinx_mapping = { + 'https://docs.python.org/': ('https://docs.python.org/3', None), +} # -- Options for todo extension ---------------------------------------------- diff --git a/examples_sw/CMakeLists.txt b/examples_sw/CMakeLists.txt index a3fc635f..76d945f8 100644 --- a/examples_sw/CMakeLists.txt +++ b/examples_sw/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(test) set(CYT_DIR ${CMAKE_SOURCE_DIR}/../) @@ -57,11 +57,13 @@ endif() if(EXAMPLE STREQUAL "streaming_server") set(TARGET_DIR "${CYT_DIR}/examples_sw/apps/streaming_service/server") message("** Example: Streaming service - Server (Coyote daemon)") + include_directories(${TARGET_DIR}/../include ${TARGET_DIR}/include) endif() if(EXAMPLE STREQUAL "streaming_client") set(TARGET_DIR "${CYT_DIR}/examples_sw/apps/streaming_service/client") message("** Example: Streaming service - Client") + include_directories(${TARGET_DIR}/../include) endif() if(EXAMPLE STREQUAL "multithreading") @@ -73,6 +75,7 @@ endif() if(EXAMPLE STREQUAL "kmeans") set(TARGET_DIR "${CYT_DIR}/examples_sw/apps/kmeans") message("** Example: K-Means kernel - Unified memory") + include_directories(${TARGET_DIR}/include) endif() # Network - RDMA @@ -98,7 +101,11 @@ endif() # Create build targets # set(EXEC test) -add_executable(${EXEC} ${TARGET_DIR}/main.cpp) +if(EXAMPLE STREQUAL "kmeans") + add_executable(${EXEC} ${TARGET_DIR}/main.cpp ${TARGET_DIR}/utils.cpp) +else() + add_executable(${EXEC} ${TARGET_DIR}/main.cpp) +endif() target_link_libraries(${EXEC} PUBLIC Coyote) target_link_directories(${EXEC} PUBLIC /usr/local/lib)