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: "14.0" - 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: Download external files run: | git submodule init git submodule update - name: Build project run: | mkdir build cd build cmake .. -DLLVM_CONFIG_PATH=`which llvm-config` -DCUDA_PATH=${{ github.workspace }}/cuda-10.1 -DHETERO_MARK_DATA=${{ github.workspace }}/data make -j8 - name: clone SC evaluation code run: | cd ${{ github.workspace }} git clone https://github.com/drcut/SC_evaluate - name: Execute the static shared memory demo run: | cd ${{ github.workspace }}/examples/sharedMemory clang++ -std=c++11 reverse.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 reverse-cuda-nvptx64-nvidia-cuda-sm_50.bc kernel.bc hostTranslator reverse-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 reverse -fPIC -no-pie -L${{ github.workspace }}/build/runtime -L${{ github.workspace }}/build/runtime/threadPool host.o kernel.o -lc -lx86Runtime -lthreadPool -lpthread ./reverse - name: Execute the dynamic shared memory demo run: | cd ${{ github.workspace }}/examples/dynamicSharedMemory clang++ -std=c++11 reverse.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 reverse-cuda-nvptx64-nvidia-cuda-sm_50.bc kernel.bc hostTranslator reverse-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 reverse -fPIC -no-pie -L${{ github.workspace }}/build/runtime -L${{ github.workspace }}/build/runtime/threadPool host.o kernel.o -lc -lx86Runtime -lthreadPool -lpthread ./reverse - name: Execute Hetero-mark benchmark run: | cd ${{ github.workspace }}/build make CTEST_OUTPUT_ON_FAILURE=1 test - 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 -I${{ github.workspace }}/cuda-10.1/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