gpt2: managed -> async and pinned memory (2* faster loading) #101
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: Build Project | |
| on: | |
| push: | |
| workflow_dispatch: | |
| jobs: | |
| test-project: | |
| strategy: | |
| matrix: | |
| build_type: [Debug, Release] | |
| # compiler: [gcc, clang] | |
| fail-fast: false | |
| name: Dalotia Evaluation Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: install openblas | |
| run: sudo apt-get install libopenblas-dev | |
| - name: Checkout | |
| uses: actions/checkout@v4.2.0 | |
| # https://github.com/actions/checkout/issues/462#issuecomment-1697584038 | |
| - name: Patch CMakeLists for PAT access | |
| env: | |
| GH_PAT: ${{ secrets.READ_TOKEN }} | |
| run: | | |
| # Need a little regex here so we can download repo with PAT | |
| sed -i 's|git@github.com:|https://$ENV\{GH_PAT\}@github.com/|g' CMakeLists.txt | |
| - name: Configure and Build Project | |
| uses: threeal/cmake-action@v1.3.0 | |
| with: | |
| run-build: true | |
| build-args: --config ${{ matrix.build_type }} | |
| # cxx-compiler: ${{ matrix.compiler }} | |
| build-dir: build-${{ matrix.build_type }} | |
| options: DALOTIA_E_WITH_BOOST_MULTI=ON | |
| - name: Run GPT-2 smoke test | |
| if: matrix.build_type == 'Release' | |
| run: | | |
| cd build-${{ matrix.build_type }}/benchmarks/GPT2 | |
| ./gpt2_cpp ./model.safetensors 1 | |
| build-cublas: | |
| name: Build with cuBLAS (compile-only) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install OpenBLAS | |
| run: sudo apt-get install libopenblas-dev | |
| - name: Checkout | |
| uses: actions/checkout@v4.2.0 | |
| - name: Install CUDA Toolkit | |
| uses: Jimver/cuda-toolkit@8022558310ea543e35132143092835585f60e628 # v0.2.21 | |
| id: cuda-toolkit | |
| with: | |
| cuda: '12.6.3' | |
| method: 'network' | |
| sub-packages: '["nvcc", "cudart-dev"]' | |
| non-cuda-sub-packages: '["libcufile-dev", "libcublas-dev"]' | |
| # https://github.com/actions/checkout/issues/462#issuecomment-1697584038 | |
| - name: Patch CMakeLists for PAT access | |
| env: | |
| GH_PAT: ${{ secrets.READ_TOKEN }} | |
| run: | | |
| sed -i 's|git@github.com:|https://$ENV\{GH_PAT\}@github.com/|g' CMakeLists.txt | |
| - name: Configure and Build with cuBLAS | |
| uses: threeal/cmake-action@v1.3.0 | |
| with: | |
| run-build: true | |
| options: DALOTIA_E_WITH_CUBLAS=ON DALOTIA_E_WITH_BOOST_MULTI=ON DALOTIA_E_WITH_FORTRAN=OFF DALOTIA_E_WITH_CACHEFLUSH=OFF | |
| build-dir: build-cublas |