CuPBoP/.github/workflows/build.yml

196 lines
16 KiB
YAML

name: build
on:
push:
paths-ignore:
- '*.md'
pull_request:
paths-ignore:
- '*.md'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "10.0"
- name: Download CUDA header files
run: |
cd ${{ github.workspace }}
wget https://www.dropbox.com/s/r18io0zu3idke5p/cuda-header.tar.gz?dl=1
tar -xzf 'cuda-header.tar.gz?dl=1'
cp -r include/* runtime/threadPool/include/
- name: Download CUDA files used for compiling NVVM IR
run: |
cd ${{ github.workspace }}
wget https://www.dropbox.com/s/4pckqsjnl920gpn/cuda-10.1.tar.gz?dl=1
tar -xzf 'cuda-10.1.tar.gz?dl=1'
- name: Build project
run: |
mkdir build
cd build
cmake .. -DLLVM_CONFIG_PATH=`which llvm-config`
make -j8
- name: clone SC evaluation code
run: |
cd ${{ github.workspace }}
git clone https://github.com/drcut/SC_evaluate
- name: Download data used to verify
run: |
cd ${{ github.workspace }}/SC_evaluate/Hetero-cox
wget https://www.dropbox.com/s/ie2hcxw9lfoghg8/data.tar.gz?dl=1
tar -xzf 'data.tar.gz?dl=1'
- name: Execute the AES example
run: |
cd ${{ github.workspace }}/SC_evaluate/Hetero-cox/src/aes
clang++ -std=c++11 cuda/aes_cuda_benchmark.cu -I../.. --cuda-path=${{ github.workspace }}/cuda-10.1 --cuda-gpu-arch=sm_50 -L${{ github.workspace }}/cuda-10.1/lib64 -lcudart_static -ldl -lrt -pthread -save-temps -v || true
export LD_LIBRARY_PATH=${{ github.workspace }}/build/runtime:${{ github.workspace }}/build/runtime/threadPool:$LD_LIBRARY_PATH
export PATH=${{ github.workspace }}/build/compilation:$PATH
kernelTranslator aes_cuda_benchmark-cuda-nvptx64-nvidia-cuda-sm_50.bc kernel.bc
hostTranslator aes_cuda_benchmark-host-x86_64-unknown-linux-gnu.bc host.bc
llc --relocation-model=pic --filetype=obj kernel.bc
llc --relocation-model=pic --filetype=obj host.bc
g++ -o aes -fPIC -no-pie -L${{ github.workspace }}/build/runtime -L${{ github.workspace }}/build/runtime/threadPool cuda/main.cc host.o kernel.o *.cc ../common/benchmark/*.cc ../common/command_line_option/*.cc ../common/time_measurement/*.cc -I../.. -lpthread -lc -lx86Runtime -lthreadPool
./aes -i ../../data/aes/1KB.data -k ../../data/aes/key.data -q -v
- name: Execute the BS example
run: |
cd ${{ github.workspace }}/SC_evaluate/Hetero-cox/src/bs
clang++ -std=c++11 cuda/bs_cuda_benchmark.cu -I../.. --cuda-path=${{ github.workspace }}/cuda-10.1 --cuda-gpu-arch=sm_50 -L${{ github.workspace }}/cuda-10.1/lib64 -lcudart_static -ldl -lrt -pthread -save-temps -v || true
export LD_LIBRARY_PATH=${{ github.workspace }}/build/runtime:${{ github.workspace }}/build/runtime/threadPool:$LD_LIBRARY_PATH
export PATH=${{ github.workspace }}/build/compilation:$PATH
kernelTranslator bs_cuda_benchmark-cuda-nvptx64-nvidia-cuda-sm_50.bc kernel.bc
hostTranslator bs_cuda_benchmark-host-x86_64-unknown-linux-gnu.bc host.bc
llc --relocation-model=pic --filetype=obj kernel.bc
llc --relocation-model=pic --filetype=obj host.bc
g++ -o bs -fPIC -no-pie -I${{ github.workspace }}/runtime/threadPool/include -L${{ github.workspace }}/build/runtime -L${{ github.workspace }}/build/runtime/threadPool cuda/main.cc host.o kernel.o *.cc ../common/benchmark/*.cc ../common/command_line_option/*.cc ../common/time_measurement/*.cc -I../.. -lpthread -lc -lx86Runtime -lthreadPool
./bs -x 16777216 -q -t --chunk 512 -v
- name: Execute the EP example
run: |
cd ${{ github.workspace }}/SC_evaluate/Hetero-cox/src/ep
clang++ -std=c++11 cuda/ep_cuda_benchmark.cu -I../.. --cuda-path=${{ github.workspace }}/cuda-10.1 --cuda-gpu-arch=sm_50 -L${{ github.workspace }}/cuda-10.1/lib64 -lcudart_static -ldl -lrt -pthread -save-temps -v || true
export LD_LIBRARY_PATH=${{ github.workspace }}/build/runtime:${{ github.workspace }}/build/runtime/threadPool:$LD_LIBRARY_PATH
export PATH=${{ github.workspace }}/build/compilation:$PATH
kernelTranslator ep_cuda_benchmark-cuda-nvptx64-nvidia-cuda-sm_50.bc kernel.bc
hostTranslator ep_cuda_benchmark-host-x86_64-unknown-linux-gnu.bc host.bc
llc --relocation-model=pic --filetype=obj kernel.bc
llc --relocation-model=pic --filetype=obj host.bc
g++ -o ep -fPIC -no-pie -I${{ github.workspace }}/runtime/threadPool/include -L${{ github.workspace }}/build/runtime -L${{ github.workspace }}/build/runtime/threadPool cuda/main.cc host.o kernel.o *.cc ../common/benchmark/*.cc ../common/command_line_option/*.cc ../common/time_measurement/*.cc -I../.. -lpthread -lc -lx86Runtime -lthreadPool
./ep -q -v
- name: Execute the FIR example
run: |
cd ${{ github.workspace }}/SC_evaluate/Hetero-cox/src/fir
clang++ -std=c++11 cuda/fir_cuda_benchmark.cu -I../.. --cuda-path=${{ github.workspace }}/cuda-10.1 --cuda-gpu-arch=sm_50 -L${{ github.workspace }}/cuda-10.1/lib64 -lcudart_static -ldl -lrt -pthread -save-temps -v || true
export LD_LIBRARY_PATH=${{ github.workspace }}/build/runtime:${{ github.workspace }}/build/runtime/threadPool:$LD_LIBRARY_PATH
export PATH=${{ github.workspace }}/build/compilation:$PATH
kernelTranslator fir_cuda_benchmark-cuda-nvptx64-nvidia-cuda-sm_50.bc kernel.bc
hostTranslator fir_cuda_benchmark-host-x86_64-unknown-linux-gnu.bc host.bc
llc --relocation-model=pic --filetype=obj kernel.bc
llc --relocation-model=pic --filetype=obj host.bc
g++ -o fir -fPIC -no-pie -I${{ github.workspace }}/runtime/threadPool/include -L${{ github.workspace }}/build/runtime -L${{ github.workspace }}/build/runtime/threadPool cuda/main.cc host.o kernel.o *.cc ../common/benchmark/*.cc ../common/command_line_option/*.cc ../common/time_measurement/*.cc -I../.. -lpthread -lc -lx86Runtime -lthreadPool
./fir -q -v
- name: Execute the GA example
run: |
cd ${{ github.workspace }}/SC_evaluate/Hetero-cox/src/ga
clang++ -std=c++11 cuda/ga_cuda_benchmark.cu -I../.. --cuda-path=${{ github.workspace }}/cuda-10.1 --cuda-gpu-arch=sm_50 -L${{ github.workspace }}/cuda-10.1/lib64 -lcudart_static -ldl -lrt -pthread -save-temps -v || true
export LD_LIBRARY_PATH=${{ github.workspace }}/build/runtime:${{ github.workspace }}/build/runtime/threadPool:$LD_LIBRARY_PATH
export PATH=${{ github.workspace }}/build/compilation:$PATH
kernelTranslator ga_cuda_benchmark-cuda-nvptx64-nvidia-cuda-sm_50.bc kernel.bc
hostTranslator ga_cuda_benchmark-host-x86_64-unknown-linux-gnu.bc host.bc
llc --relocation-model=pic --filetype=obj kernel.bc
llc --relocation-model=pic --filetype=obj host.bc
g++ -o ga -fPIC -no-pie -I${{ github.workspace }}/runtime/threadPool/include -L${{ github.workspace }}/build/runtime -L${{ github.workspace }}/build/runtime/threadPool cuda/main.cc host.o kernel.o *.cc ../common/benchmark/*.cc ../common/command_line_option/*.cc ../common/time_measurement/*.cc -I../.. -lpthread -lc -lx86Runtime -lthreadPool
- name: Execute the HIST example
run: |
cd ${{ github.workspace }}/SC_evaluate/Hetero-cox/src/hist
clang++ -std=c++11 cuda/hist_cuda_benchmark.cu -I../.. --cuda-path=${{ github.workspace }}/cuda-10.1 --cuda-gpu-arch=sm_50 -L${{ github.workspace }}/cuda-10.1/lib64 -lcudart_static -ldl -lrt -pthread -save-temps -v || true
export LD_LIBRARY_PATH=${{ github.workspace }}/build/runtime:${{ github.workspace }}/build/runtime/threadPool:$LD_LIBRARY_PATH
export PATH=${{ github.workspace }}/build/compilation:$PATH
kernelTranslator hist_cuda_benchmark-cuda-nvptx64-nvidia-cuda-sm_50.bc kernel.bc
hostTranslator hist_cuda_benchmark-host-x86_64-unknown-linux-gnu.bc host.bc
llc --relocation-model=pic --filetype=obj kernel.bc
llc --relocation-model=pic --filetype=obj host.bc
g++ -o hist -fPIC -no-pie -I${{ github.workspace }}/runtime/threadPool/include -L${{ github.workspace }}/build/runtime -L${{ github.workspace }}/build/runtime/threadPool cuda/main.cc host.o kernel.o *.cc ../common/benchmark/*.cc ../common/command_line_option/*.cc ../common/time_measurement/*.cc -I../.. -lpthread -lc -lx86Runtime -lthreadPool
./hist -q -v
- name: Execute the KMeans example
run: |
cd ${{ github.workspace }}/SC_evaluate/Hetero-cox/src/kmeans
clang++ -std=c++11 cuda/kmeans_cuda_benchmark.cu -I../.. --cuda-path=${{ github.workspace }}/cuda-10.1 --cuda-gpu-arch=sm_50 -L${{ github.workspace }}/cuda-10.1/lib64 -lcudart_static -ldl -lrt -pthread -save-temps -v || true
export LD_LIBRARY_PATH=${{ github.workspace }}/build/runtime:${{ github.workspace }}/build/runtime/threadPool:$LD_LIBRARY_PATH
export PATH=${{ github.workspace }}/build/compilation:$PATH
kernelTranslator kmeans_cuda_benchmark-cuda-nvptx64-nvidia-cuda-sm_50.bc kernel.bc
hostTranslator kmeans_cuda_benchmark-host-x86_64-unknown-linux-gnu.bc host.bc
llc --relocation-model=pic --filetype=obj kernel.bc
llc --relocation-model=pic --filetype=obj host.bc
g++ -o kmeans -fPIC -no-pie -I${{ github.workspace }}/runtime/threadPool/include -L${{ github.workspace }}/build/runtime -L${{ github.workspace }}/build/runtime/threadPool cuda/main.cc host.o kernel.o *.cc ../common/benchmark/*.cc ../common/command_line_option/*.cc ../common/time_measurement/*.cc -I../.. -lpthread -lc -lx86Runtime -lthreadPool
./kmeans -i ../../data/kmeans/100_34.txt -q -v
- name: Execute the PR example
run: |
cd ${{ github.workspace }}/SC_evaluate/Hetero-cox/src/pr
clang++ -std=c++11 cuda/pr_cuda_benchmark.cu -I../.. --cuda-path=${{ github.workspace }}/cuda-10.1 --cuda-gpu-arch=sm_50 -L${{ github.workspace }}/cuda-10.1/lib64 -lcudart_static -ldl -lrt -pthread -save-temps -v || true
export LD_LIBRARY_PATH=${{ github.workspace }}/build/runtime:${{ github.workspace }}/build/runtime/threadPool:$LD_LIBRARY_PATH
export PATH=${{ github.workspace }}/build/compilation:$PATH
kernelTranslator pr_cuda_benchmark-cuda-nvptx64-nvidia-cuda-sm_50.bc kernel.bc
hostTranslator pr_cuda_benchmark-host-x86_64-unknown-linux-gnu.bc host.bc
llc --relocation-model=pic --filetype=obj kernel.bc
llc --relocation-model=pic --filetype=obj host.bc
g++ -o pr -fPIC -no-pie -I${{ github.workspace }}/runtime/threadPool/include -L${{ github.workspace }}/build/runtime -L${{ github.workspace }}/build/runtime/threadPool cuda/main.cc host.o kernel.o *.cc ../common/benchmark/*.cc ../common/command_line_option/*.cc ../common/time_measurement/*.cc -I../.. -lpthread -lc -lx86Runtime -lthreadPool
./pr -i ../../data/pr/8192.data -q -v
- name: Execute the lavaMD example
run: |
cd ${{ github.workspace }}/SC_evaluate/rodinia-cox/lavaMD
clang++ kernel/kernel_gpu_cuda_wrapper.cu --cuda-path=${{ github.workspace }}/cuda-10.1 --cuda-gpu-arch=sm_61 -L${{ github.workspace }}/cuda-10.1/lib64 -lcudart_static -ldl -lrt -pthread -save-temps -v || true
export LD_LIBRARY_PATH=${{ github.workspace }}/build/runtime:${{ github.workspace }}/build/runtime/threadPool:$LD_LIBRARY_PATH
export PATH=${{ github.workspace }}/build/compilation:$PATH
kernelTranslator kernel_gpu_cuda_wrapper-cuda-nvptx64-nvidia-cuda-sm_61.bc kernel.bc
hostTranslator kernel_gpu_cuda_wrapper-host-x86_64-unknown-linux-gnu.bc host.bc
llc --relocation-model=pic --filetype=obj kernel.bc
llc --relocation-model=pic --filetype=obj host.bc
g++ -o lavaMD -fPIC -no-pie -I${{ github.workspace }}/runtime/threadPool/include -L${{ github.workspace }}/build/runtime -L${{ github.workspace }}/build/runtime/threadPool main.c host.o kernel.o util/timer/timer.c util/num/num.c -lpthread -lc -lx86Runtime -lthreadPool -pthread
./lavaMD -boxes1d 10
- name: Execute the dwt2d example
run: |
cd ${{ github.workspace }}/SC_evaluate/rodinia-cox/dwt2d
clang++ -I. -I/include -fno-strict-aliasing dwt_cuda/fdwt53.cu dwt_cuda/fdwt97.cu dwt_cuda/common.cu dwt_cuda/rdwt97.cu dwt_cuda/rdwt53.cu components.cu dwt.cu main.cu -c --cuda-path=${{ github.workspace }}/cuda-10.1 --cuda-gpu-arch=sm_61 -L${{ github.workspace }}/cuda-10.1/lib64 -lcudart_static -ldl -lrt -pthread -save-temps -v || true
export LD_LIBRARY_PATH=${{ github.workspace }}/build/runtime:${{ github.workspace }}/build/runtime/threadPool:$LD_LIBRARY_PATH
export PATH=${{ github.workspace }}/build/compilation:$PATH
kernelTranslator common-cuda-nvptx64-nvidia-cuda-sm_61.bc common.bc
kernelTranslator components-cuda-nvptx64-nvidia-cuda-sm_61.bc components.bc
kernelTranslator fdwt53-cuda-nvptx64-nvidia-cuda-sm_61.bc fdwt53.bc
kernelTranslator dwt-cuda-nvptx64-nvidia-cuda-sm_61.bc dwt.bc
kernelTranslator fdwt97-cuda-nvptx64-nvidia-cuda-sm_61.bc fdwt97.bc
kernelTranslator rdwt97-cuda-nvptx64-nvidia-cuda-sm_61.bc rdwt97.bc
kernelTranslator rdwt53-cuda-nvptx64-nvidia-cuda-sm_61.bc rdwt53.bc
hostTranslator main-host-x86_64-unknown-linux-gnu.bc host.bc
hostTranslator common-host-x86_64-unknown-linux-gnu.bc common_host.bc
hostTranslator components-host-x86_64-unknown-linux-gnu.bc components_host.bc
hostTranslator dwt-host-x86_64-unknown-linux-gnu.bc dwt_host.bc
hostTranslator fdwt53-host-x86_64-unknown-linux-gnu.bc fdwt53_host.bc
hostTranslator fdwt97-host-x86_64-unknown-linux-gnu.bc fdwt97_host.bc
hostTranslator rdwt53-host-x86_64-unknown-linux-gnu.bc rdwt53_host.bc
hostTranslator rdwt97-host-x86_64-unknown-linux-gnu.bc rdwt97_host.bc
llc --relocation-model=pic --filetype=obj common.bc
llc --relocation-model=pic --filetype=obj components.bc
llc --relocation-model=pic --filetype=obj fdwt53.bc
llc --relocation-model=pic --filetype=obj dwt.bc
llc --relocation-model=pic --filetype=obj host.bc
llc --relocation-model=pic --filetype=obj common_host.bc
llc --relocation-model=pic --filetype=obj components_host.bc
llc --relocation-model=pic --filetype=obj fdwt53_host.bc
llc --relocation-model=pic --filetype=obj dwt_host.bc
llc --relocation-model=pic --filetype=obj fdwt97_host.bc
llc --relocation-model=pic --filetype=obj rdwt97_host.bc
llc --relocation-model=pic --filetype=obj rdwt53_host.bc
llc --relocation-model=pic --filetype=obj fdwt97.bc
llc --relocation-model=pic --filetype=obj rdwt97.bc
llc --relocation-model=pic --filetype=obj rdwt53.bc
g++ -o dwt2d -fPIC -no-pie -I${{ github.workspace }}/runtime/threadPool/include -L${{ github.workspace }}/build/runtime -L${{ github.workspace }}/build/runtime/threadPool common.o components.o dwt.o fdwt53.o fdwt97.o rdwt97.o rdwt53.o host.o common_host.o components_host.o dwt_host.o fdwt53_host.o fdwt97_host.o rdwt97_host.o rdwt53_host.o -lpthread -lc -lx86Runtime -lthreadPool -pthread
./dwt2d 192.bmp -d 192x192 -f -5 -l 3