CuPBoP/.github/workflows/build.yml

163 lines
12 KiB
YAML
Raw Normal View History

2022-01-14 02:30:45 +08:00
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:
2022-06-18 11:46:45 +08:00
version: "14.0"
2022-05-04 21:11:31 +08:00
- 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'
2022-06-21 10:53:19 +08:00
- name: Download lock-free queue header file
run: |
cd ${{ github.workspace }}
cd runtime/threadPool
git clone git@github.com:cameron314/concurrentqueue.git
2022-01-14 02:30:45 +08:00
- name: Build project
run: |
mkdir build
cd build
cmake .. -DLLVM_CONFIG_PATH=`which llvm-config`
2022-05-04 21:11:31 +08:00
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
2022-01-14 02:30:45 +08:00
run: |
2022-05-04 21:11:31 +08:00
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