Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
tinebp committed Nov 10, 2023
2 parents 6e93787 + c1e168f commit 64dc5e1
Show file tree
Hide file tree
Showing 10 changed files with 139 additions and 157 deletions.
116 changes: 56 additions & 60 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,87 +1,83 @@
language: cpp
dist: bionic
dist: focal
os: linux
compiler: gcc
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- build-essential
- valgrind
- libpng-dev
- libboost-serialization-dev
- libstdc++6
- hwloc

install:
# Install toolchain
- export TOOLDIR=$HOME/tools
- mkdir -p $TOOLDIR
- DESTDIR=$TOOLDIR ./ci/toolchain_install.sh --all
# Set environments
- export RISCV_TOOLCHAIN_PATH=$TOOLDIR/riscv-gnu-toolchain
- export LLVM_POCL=$TOOLDIR/llvm-pocl
- export LLVM_VORTEX=$TOOLDIR/llvm-vortex
- export VERILATOR_ROOT=$TOOLDIR/verilator
- export PATH=$VERILATOR_ROOT/bin:$PATH
- export SV2V_PATH=$TOOLDIR/sv2v
- export PATH=$SV2V_PATH/bin:$PATH
- export YOSYS_PATH=$TOOLDIR/yosys
- export PATH=$YOSYS_PATH/bin:$PATH
- export POCL_CC_PATH=$TOOLDIR/pocl/compiler
- export POCL_RT_PATH=$TOOLDIR/pocl/runtime
# build project
- cp -r $PWD ../build32 && cd ../build32 && make clean-all && make
- cp -r $PWD ../build64 && cd ../build64 && make clean-all && XLEN=64 RISCV_TOOLCHAIN_PATH=$TOOLDIR/riscv64-gnu-toolchain make
addons:
apt:
packages:
- build-essential
- valgrind
- libstdc++6

env:
global:
- TOOLDIR=$HOME/tools

cache:
directories:
- $TOOLDIR
- $HOME/build32
- $HOME/build64

before_install:
- if [ ! -d "$TOOLDIR" ] || [ -z "$(ls -A $TOOLDIR)" ]; then
mkdir -p $TOOLDIR;
OSDIR=ubuntu/focal ./ci/toolchain_install.sh --all;
fi
- source ./ci/toolchain_env.sh

# stages ordering
stages:
- setup
- test

jobs:
include:
- stage: test
- stage: setup
script:
- rm -rf $HOME/build32 && cp -r $PWD $HOME/build32
- rm -rf $HOME/build64 && cp -r $PWD $HOME/build64
- make -C $HOME/build32
- XLEN=64 RISCV_TOOLCHAIN_PATH=$TOOLDIR/riscv64-gnu-toolchain make -C $HOME/build64
- stage: test
name: unittest
script: cp -r ../build32 ../build32_unittest && cd ../build32_unittest && ./ci/travis_run.py ./ci/regression.sh --unittest
- stage: test
script: cp -r $HOME/build32 build && cd build && ./ci/travis_run.py ./ci/regression.sh --unittest
- stage: test
name: isa
script: cp -r ../build32 ../build32_isa && cd ../build32_isa && ./ci/travis_run.py ./ci/regression.sh --isa
- stage: test
script: cp -r $HOME/build32 build && cd build && ./ci/travis_run.py ./ci/regression.sh --isa
- stage: test
name: isa64
script: cp -r ../build64 ../build64_isa && cd ../build64_isa && XLEN=64 RISCV_TOOLCHAIN_PATH=$TOOLDIR/riscv64-gnu-toolchain ./ci/travis_run.py ./ci/regression.sh --isa
- stage: test
script: cp -r $HOME/build64 build && cd build && XLEN=64 RISCV_TOOLCHAIN_PATH=$TOOLDIR/riscv64-gnu-toolchain ./ci/travis_run.py ./ci/regression.sh --isa
- stage: test
name: regression
script: cp -r ../build32 ../build32_regression && cd ../build32_regression && ./ci/travis_run.py ./ci/regression.sh --regression
- stage: test
script: cp -r $HOME/build32 build && cd build && ./ci/travis_run.py ./ci/regression.sh --regression
- stage: test
name: regression64
script: cp -r ../build64 ../build64_regression && cd ../build64_regression && XLEN=64 RISCV_TOOLCHAIN_PATH=$TOOLDIR/riscv64-gnu-toolchain ./ci/travis_run.py ./ci/regression.sh --regression
- stage: test
script: cp -r $HOME/build64 build && cd build && XLEN=64 RISCV_TOOLCHAIN_PATH=$TOOLDIR/riscv64-gnu-toolchain ./ci/travis_run.py ./ci/regression.sh --regression
- stage: test
name: opencl
script: cp -r ../build32 ../build32_opencl && cd ../build32_opencl && ./ci/travis_run.py ./ci/regression.sh --opencl
- stage: test
script: cp -r $HOME/build32 build && cd build && ./ci/travis_run.py ./ci/regression.sh --opencl
- stage: test
name: cluster
script: cp -r ../build32 ../build32_cluster && cd ../build32_cluster && ./ci/travis_run.py ./ci/regression.sh --cluster
- stage: test
script: cp -r $HOME/build32 build && cd build && ./ci/travis_run.py ./ci/regression.sh --cluster
- stage: test
name: config
script: cp -r ../build32 ../build32_config && cd ../build32_config && ./ci/travis_run.py ./ci/regression.sh --config
script: cp -r $HOME/build32 build && cd build && ./ci/travis_run.py ./ci/regression.sh --config
- stage: test
name: debug
script: cp -r ../build32 ../build32_debug && cd ../build32_debug && ./ci/travis_run.py ./ci/regression.sh --debug
- stage: test
script: cp -r $HOME/build32 build && cd build && ./ci/travis_run.py ./ci/regression.sh --debug
- stage: test
name: stress0
script: cp -r ../build32 ../build32_stress0 && cd ../build32_stress0 && ./ci/travis_run.py ./ci/regression.sh --stress0
- stage: test
script: cp -r $HOME/build32 build && cd build && ./ci/travis_run.py ./ci/regression.sh --stress0
- stage: test
name: stress1
script: cp -r ../build32 ../build32_stress1 && cd ../build32_stress1 && ./ci/travis_run.py ./ci/regression.sh --stress1
- stage: test
script: cp -r $HOME/build32 build && cd build && ./ci/travis_run.py ./ci/regression.sh --stress1
- stage: test
name: synthesis
script: cp -r ../build32 ../build32_isa && cd ../build32_isa && ./ci/travis_run.py ./ci/regression.sh --synthesis
- stage: test
script: cp -r $HOME/build32 build && cd build && ./ci/travis_run.py ./ci/regression.sh --synthesis
- stage: test
name: synthesis64
script: cp -r ../build64 ../build64_isa && cd ../build64_isa && XLEN=64 ./ci/travis_run.py ./ci/regression.sh --synthesis
- stage: test
name: compiler
script: cp -r ../build32 ../build32_compiler && cd ../build32_compiler && ./ci/travis_run.py ./ci/test_compiler.sh
script: cp -r $HOME/build64 build && cd build && XLEN=64 ./ci/travis_run.py ./ci/regression.sh --synthesis

after_success:
# Gather code coverage
Expand Down
15 changes: 4 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,11 @@ Vortex is a full-stack open-source RISC-V GPGPU.
$ git clone --recursive https://github.com/vortexgpgpu/vortex.git
$ cd Vortex
### Install prebuilt toolchain
$ ./ci/toolchain_install.sh --all

By default, the toolchain will install to /opt folder.
You can install the toolchain to a different directory by overiding DESTDIR.

$ DESTDIR=$TOOLDIR ./ci/toolchain_install.sh --all
$ export VORTEX_HOME=$TOOLDIR/vortex
$ export LLVM_VORTEX=$TOOLDIR/llvm-vortex
$ export LLVM_POCL=$TOOLDIR/llvm-pocl
$ export RISCV_TOOLCHAIN_PATH=$TOOLDIR/riscv-gnu-toolchain
$ export VERILATOR_ROOT=$TOOLDIR/verilator
$ export PATH=$VERILATOR_ROOT/bin:$PATH
You can install the toolchain to a different directory by overriding TOOLDIR (e.g. export TOOLDIR=$HOME/tools).

$ ./ci/toolchain_install.sh --all
$ source ./ci/toolchain_env.sh
### Build Vortex sources
$ make -s
### Quick demo running vecadd OpenCL kernel on 2 cores
Expand Down
31 changes: 0 additions & 31 deletions ci/test_compiler.sh

This file was deleted.

29 changes: 29 additions & 0 deletions ci/toolchain_env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/sh

# Copyright 2023 blaise
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

TOOLDIR=${TOOLDIR:=/opt}

export RISCV_TOOLCHAIN_PATH=$TOOLDIR/riscv-gnu-toolchain
export LLVM_POCL=$TOOLDIR/llvm-pocl
export LLVM_VORTEX=$TOOLDIR/llvm-vortex
export VERILATOR_ROOT=$TOOLDIR/verilator
export PATH=$VERILATOR_ROOT/bin:$PATH
export SV2V_PATH=$TOOLDIR/sv2v
export PATH=$SV2V_PATH/bin:$PATH
export YOSYS_PATH=$TOOLDIR/yosys
export PATH=$YOSYS_PATH/bin:$PATH
export POCL_CC_PATH=$TOOLDIR/pocl/compiler
export POCL_RT_PATH=$TOOLDIR/pocl/runtime
Loading

0 comments on commit 64dc5e1

Please sign in to comment.