GPU memory allocation support #534
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: TypeART-CI | |
| on: | |
| push: | |
| branches: [ master, devel ] | |
| pull_request: | |
| env: | |
| CXX: clang++ | |
| CC: clang | |
| OMP_NUM_THREAD: 2 | |
| jobs: | |
| format-check: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - run: | | |
| wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
| echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-18 main" | sudo tee /etc/apt/sources.list.d/llvm-18.list | |
| - name: Update apt | |
| run: sudo apt-get update | |
| - name: Install clang-format | |
| run: | | |
| sudo apt-get remove clang-format-* | |
| sudo apt-get install -t llvm-toolchain-noble-18 clang-format-18 | |
| - name: Format source code | |
| run: | | |
| find demo lib test \ | |
| -type f \ | |
| -a \( -name "*.c" -o -name "*.cpp" -o -name "*.h" \) \ | |
| -not -path "*/lulesh/*" -not -path "*/CallSite.h" \ | |
| -print0 \ | |
| | xargs -0 clang-format-18 -i | |
| - name: Format check | |
| run: | | |
| git status --porcelain --untracked-files=no | |
| git status --porcelain --untracked-files=no | xargs -o -I {} test -z \"{}\" | |
| codespell: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: codespell-project/actions-codespell@v2.2 | |
| lit-suite: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| preset: | |
| - name: ci-thread-safe-safeptr | |
| - name: ci-thread-safe | |
| - name: ci-thread-unsafe | |
| - name: ci-cov-thread-safe-safeptr | |
| coverage: true | |
| - name: ci-cov-thread-safe | |
| coverage: true | |
| - name: ci-cov-thread-unsafe | |
| coverage: true | |
| - name: ci-libcxx | |
| libcxx: true | |
| skip_test: true | |
| platform: | |
| - { os: ubuntu-22.04, llvm-version: 14, typeart-typegen-legacy: 0 } | |
| - { os: ubuntu-22.04, llvm-version: 14, typeart-typegen-legacy: 1 } | |
| - { os: ubuntu-24.04, llvm-version: 18, typeart-typegen-legacy: 0 } | |
| - { os: ubuntu-24.04, llvm-version: 19, typeart-typegen-legacy: 0 } | |
| - { os: ubuntu-24.04, llvm-version: 20, typeart-typegen-legacy: 0 } | |
| - { os: ubuntu-24.04, llvm-version: 21, typeart-typegen-legacy: 0 } | |
| - { os: ubuntu-24.04, llvm-version: 22, typeart-typegen-legacy: 0 } | |
| runs-on: ${{ matrix.platform.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup TypeART Environment | |
| uses: ./.github/actions/setup-typeart | |
| with: | |
| llvm-version: ${{ matrix.platform.llvm-version }} | |
| typeart-typegen-legacy: ${{ matrix.platform.typeart-typegen-legacy }} | |
| install-libcxx: ${{ matrix.preset.libcxx || 'false' }} | |
| install-lcov: ${{ matrix.preset.coverage || 'false' }} | |
| install-omp: 'true' | |
| setup-mold: 'true' | |
| - name: Configure TypeART | |
| run: cmake -B build --preset ${{ matrix.preset.name }} -DLLVM_DIR=${LLVM_CMAKE_DIR} -DLLVM_EXTERNAL_LIT=${EXTERNAL_LIT} | |
| - name: Build TypeART | |
| run: cmake --build build --parallel 2 | |
| - name: Prepare TypeART coverage | |
| if: matrix.preset.coverage | |
| run: cmake --build build --target typeart-lcov-clean | |
| - name: Test TypeART lit-suite | |
| if: matrix.preset.skip_test == false | |
| run: cmake --build build --target check-typeart | |
| - name: Build coverage report | |
| if: matrix.preset.coverage | |
| run: cmake --build build --target typeart-lcov-html | |
| - name: Coveralls (parallel) | |
| if: matrix.preset.coverage | |
| uses: coverallsapp/github-action@v2.3.6 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| path-to-lcov: build/typeart.coverage | |
| flag-name: ${{ matrix.preset.name }}-${{ matrix.platform.llvm-version }}-${{ matrix.platform.typeart-typegen-legacy }} | |
| parallel: true | |
| cuda-suite: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - llvm-version: 14 | |
| os: ubuntu-22.04 | |
| cuda: 11.8.0 | |
| - llvm-version: 22 | |
| os: ubuntu-24.04 | |
| cuda: 12.6.0 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: Jimver/cuda-toolkit@v0.2.35 | |
| id: cuda-toolkit | |
| with: | |
| cuda: "${{ matrix.cuda }}" | |
| method: network | |
| sub-packages: '["nvcc", "cudart", "cudart-dev"]' | |
| non-cuda-sub-packages: '["libcurand", "libcurand-dev"]' | |
| - name: Setup TypeART Environment | |
| uses: ./.github/actions/setup-typeart | |
| with: | |
| llvm-version: ${{ matrix.llvm-version }} | |
| typeart-typegen-legacy: 0 | |
| install-lcov: 'true' | |
| install-omp: 'true' | |
| setup-mold: 'true' | |
| - name: Configure TypeART | |
| run: cmake -B build --preset ci-cov-thread-safe -DLLVM_DIR=${LLVM_CMAKE_DIR} -DLLVM_EXTERNAL_LIT=${EXTERNAL_LIT} | |
| - name: Build TypeART | |
| run: cmake --build build --parallel 2 | |
| - name: Prepare TypeART coverage | |
| run: cmake --build build --target typeart-lcov-clean | |
| - name: Test TypeART cuda-suite | |
| run: cmake --build build --target check-typeart | |
| - name: Build coverage report | |
| run: cmake --build build --target typeart-lcov-html | |
| - name: Coveralls (parallel) | |
| uses: coverallsapp/github-action@v2.3.6 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| path-to-lcov: build/typeart.coverage | |
| flag-name: cuda-suite-${{ matrix.llvm-version }}-${{ matrix.cuda }} | |
| parallel: true | |
| hip-suite: | |
| runs-on: ubuntu-24.04 | |
| env: | |
| ROCM_PATH: /opt/rocm | |
| ROCM_VERSION: 6.4.4 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup ROCm Toolchain | |
| run: | | |
| sudo mkdir --parents --mode=0755 /etc/apt/keyrings | |
| wget -qO - https://repo.radeon.com/rocm/rocm.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/rocm.gpg | |
| echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/${ROCM_VERSION} noble main" | sudo tee /etc/apt/sources.list.d/rocm.list | |
| echo -e "Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600" | sudo tee /etc/apt/preferences.d/rocm-pin-600 | |
| - name: Install ROCm ${{ env.ROCM_VERSION }} | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends \ | |
| rocm-llvm \ | |
| rocm-llvm-dev \ | |
| rocm-dev | |
| - name: Setup ROCm Environment | |
| run: | | |
| sudo ln -sfn /opt/rocm-${ROCM_VERSION} /opt/rocm | |
| echo "/opt/rocm/llvm/bin" >> $GITHUB_PATH | |
| echo "/opt/rocm/bin" >> $GITHUB_PATH | |
| echo "LD_LIBRARY_PATH=/opt/rocm/llvm/lib:/opt/rocm/lib:${LD_LIBRARY_PATH}" >> $GITHUB_ENV | |
| - name: Setup TypeART Environment | |
| uses: ./.github/actions/setup-typeart | |
| with: | |
| llvm-version: 18 | |
| typeart-typegen-legacy: 0 | |
| install-lcov: 'true' | |
| install-omp: 'false' | |
| setup-mold: 'true' | |
| - name: Configure TypeART | |
| run: | | |
| cmake -B build --preset ci-cov-thread-safe \ | |
| -DCMAKE_C_COMPILER=/opt/rocm/bin/amdclang \ | |
| -DCMAKE_CXX_COMPILER=/opt/rocm/bin/amdclang++ \ | |
| -DLLVM_DIR=${ROCM_PATH}/llvm/lib/cmake/llvm -DLLVM_EXTERNAL_LIT=${EXTERNAL_LIT} \ | |
| -DTYPEART_CLANG_EXEC=/opt/rocm/bin/amdclang \ | |
| -DTYPEART_CLANGCXX_EXEC=/opt/rocm/bin/amdclang++ \ | |
| -DTYPEART_OPT_EXEC=/opt/rocm/llvm/bin/opt \ | |
| -DTYPEART_LLC_EXEC=/opt/rocm/llvm/bin/llc \ | |
| -DTYPEART_LLVMCONFIG_COMMAND=/opt/rocm/llvm/bin/llvm-config \ | |
| -DCMAKE_DISABLE_FIND_PACKAGE_OpenMP=ON | |
| - name: Build TypeART | |
| run: cmake --build build --parallel 2 | |
| - name: Prepare TypeART coverage | |
| run: cmake --build build --target typeart-lcov-clean | |
| - name: Test TypeART hip-suite | |
| run: cmake --build build --target check-typeart | |
| - name: Build coverage report | |
| run: cmake --build build --target typeart-lcov-html | |
| - name: Coveralls (parallel) | |
| uses: coverallsapp/github-action@v2.3.6 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| path-to-lcov: build/typeart.coverage | |
| flag-name: hip-suite-rocm-${{ env.ROCM_VERSION }} | |
| parallel: true | |
| finish-coverage: | |
| if: ${{ always() }} | |
| needs: [lit-suite, cuda-suite, hip-suite] | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Coveralls Finished | |
| uses: coverallsapp/github-action@v2.3.6 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| parallel-finished: true |