Skip to content

Type gt::complex_float16_t #1126

Type gt::complex_float16_t

Type gt::complex_float16_t #1126

Workflow file for this run

name: CPU CI, CUDA/HIP build CI
on:
push:
branches: [ main, 'pr/*' ]
pull_request:
branches: [ main ]
jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: DoozyX/clang-format-lint-action@v0.14
with:
source: '.'
extensions: 'h,cxx'
clangFormatVersion: 9
- uses: DoozyX/clang-format-lint-action@v0.14
with:
source: '.'
extensions: 'h,cxx'
clangFormatVersion: 14
tests-cpu:
runs-on: ubuntu-20.04
strategy:
matrix:
cxx: [ 'g++-9', 'g++-10', 'clang++-10' ]
name: tests-cpu-${{ matrix.cxx }}
env:
CMAKE_BUILD_PARALLEL_LEVEL: 8
steps:
- uses: actions/checkout@v3
- name: install packages
run: sudo apt-get update && sudo apt-get install -y libopenblas-dev libfftw3-dev liblapacke-dev
- name: cmake
run: cmake -S . -B build-tests-${{ matrix.cxx }} -DGTENSOR_DEVICE=host -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGTENSOR_ENABLE_CLIB=ON -DGTENSOR_ENABLE_BLAS=OFF -DGTENSOR_ENABLE_FFT=ON -DGTENSOR_ENABLE_SOLVER=OFF
env:
CXX: ${{ matrix.cxx }}
- name: build
run: cmake --build build-tests-${{ matrix.cxx }} -v
- name: test
run: cmake --build build-tests-${{ matrix.cxx }} -t test
tests-cpu-cxx20:
runs-on: ubuntu-22.04
strategy:
matrix:
cxx: [ 'g++-12', 'clang++-14' ]
name: tests-cpu-cxx20-${{ matrix.cxx }}
env:
CMAKE_BUILD_PARALLEL_LEVEL: 8
steps:
- uses: actions/checkout@v3
- name: cmake
run: cmake -S . -B build-tests-${{ matrix.cxx }} -DGTENSOR_DEVICE=host -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_STANDARD=20
env:
CXX: ${{ matrix.cxx }}
- name: build
run: cmake --build build-tests-${{ matrix.cxx }} -v
- name: test
run: cmake --build build-tests-${{ matrix.cxx }} -t test
examples-cpu:
runs-on: ubuntu-20.04
strategy:
matrix:
cxx: [ 'g++-9', 'g++-10', 'clang++-10' ]
name: examples-cpu-${{ matrix.cxx }}
env:
CMAKE_BUILD_PARALLEL_LEVEL: 8
steps:
- uses: actions/checkout@v3
- name: cmake
run: cmake -S . -B build-examples-${{ matrix.cxx }} -DGTENSOR_DEVICE=host -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGTENSOR_BUILD_EXAMPLES=ON -DBUILD_TESTING=OFF -DGTENSOR_ENABLE_CLIB=ON
env:
CXX: ${{ matrix.cxx }}
- name: build
run: cmake --build build-examples-${{ matrix.cxx }} -v
- name: daxpy
run: ./build-examples-${{ matrix.cxx }}/examples/daxpy
- name: stencil1d
run: ./build-examples-${{ matrix.cxx }}/examples/stencil1d
- name: mult_table
run: ./build-examples-${{ matrix.cxx }}/examples/mult_table
examples-cpu-ub:
runs-on: ubuntu-22.04
strategy:
matrix:
cxx: [ 'clang++-14' ]
name: examples-cpu-ub-${{ matrix.cxx }}
env:
CMAKE_BUILD_PARALLEL_LEVEL: 8
steps:
- uses: actions/checkout@v3
- name: cmake
run: cmake -S . -B build-examples-ub-${{ matrix.cxx }} -DGTENSOR_DEVICE=host -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGTENSOR_BUILD_EXAMPLES=ON -DBUILD_TESTING=OFF -DGTENSOR_ENABLE_CLIB=ON -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O1 -g -fsanitize=address,undefined,implicit-conversion,integer,nullability -fno-sanitize-recover=address,undefined,implicit-conversion,integer,nullability -fno-omit-frame-pointer -fno-optimize-sibling-calls"
env:
CXX: ${{ matrix.cxx }}
- name: build
run: cmake --build build-examples-ub-${{ matrix.cxx }} -v
- name: daxpy
run: ./build-examples-ub-${{ matrix.cxx }}/examples/daxpy
- name: stencil1d
run: ./build-examples-ub-${{ matrix.cxx }}/examples/stencil1d
- name: mult_table
run: ./build-examples-ub-${{ matrix.cxx }}/examples/mult_table
examples-cpu-gnu-make:
runs-on: ubuntu-latest
env:
CMAKE_BUILD_PARALLEL_LEVEL: 8
steps:
- uses: actions/checkout@v3
- name: setup gtensor subdir
run: mkdir -p external/gtensor && cp -R ../include external/gtensor/
working-directory: ${{ github.workspace }}/examples
- name: build
run: make GTENSOR_DEVICE=host
working-directory: ${{ github.workspace }}/examples
- name: daxpy
run: ./daxpy
working-directory: ${{ github.workspace }}/examples
- name: stencil1d
run: ./stencil1d
working-directory: ${{ github.workspace }}/examples
- name: mult_table
run: ./mult_table
working-directory: ${{ github.workspace }}/examples
cmake-subdir:
runs-on: ubuntu-latest
env:
cxx: 'clang++-9'
CMAKE_BUILD_PARALLEL_LEVEL: 8
defaults:
run:
working-directory: ${{ github.workspace }}/examples
steps:
- uses: actions/checkout@v3
- name: cmake
run: cmake -S . -B build-subdir -DGTENSOR_DEVICE=host -DCMAKE_BUILD_TYPE=RelWithDebInfo
- name: build
run: cmake --build build-subdir -v
- name: daxpy
run: ./build-subdir/daxpy
- name: stencil1d
run: ./build-subdir/stencil1d
- name: mult_table
run: ./build-subdir/mult_table
cmake-install:
runs-on: ubuntu-latest
env:
cxx: 'clang++-9'
CMAKE_BUILD_PARALLEL_LEVEL: 8
steps:
- uses: actions/checkout@v3
- name: gtensor cmake
run: cmake -S . -B build-install -DGTENSOR_DEVICE=host -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/gtensor-install -DBUILD_TESTING=OFF -DGTENSOR_ENABLE_FORTRAN=ON
- name: gtensor install
run: cmake --build build-install -v -t install
- name: examples cmake
run: cmake -S . -B build-find-package -DGTENSOR_DEVICE=host -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGTENSOR_EXAMPLES_USE_FIND_PACKAGE=ON -DGTENSOR_ENABLE_CLIB=ON -DGTENSOR_ENABLE_FORTRAN=ON
working-directory: ${{ github.workspace }}/examples
env:
gtensor_DIR: ${{ github.workspace }}/gtensor-install
- name: examples build
run: cmake --build build-find-package -v
working-directory: ${{ github.workspace }}/examples
- name: daxpy
run: ./build-find-package/daxpy
working-directory: ${{ github.workspace }}/examples
- name: stencil1d
run: ./build-find-package/stencil1d
working-directory: ${{ github.workspace }}/examples
- name: mult_table
run: ./build-find-package/mult_table
working-directory: ${{ github.workspace }}/examples
build-cuda:
runs-on: ubuntu-latest
container: nvidia/cuda:11.1.1-devel-ubuntu20.04
env:
GTEST_VERSION: 1.10.0
GTEST_ROOT: ${{ github.workspace }}/googletest
CMAKE_BUILD_PARALLEL_LEVEL: 8
steps:
- uses: actions/checkout@v3
- name: install packages
run: apt-get update && apt-get install -y wget git
- name: install cmake
run: |
wget -O cmake.sh 'https://github.com/Kitware/CMake/releases/download/v3.18.4/cmake-3.18.4-Linux-x86_64.sh'
bash cmake.sh --prefix=/usr --skip-license --exclude-subdir
- name: install googletest
run: |
mkdir -p ${{ env.GTEST_ROOT }}
cd ${{ env.GTEST_ROOT }}
wget https://github.com/google/googletest/archive/release-${{ env.GTEST_VERSION }}.tar.gz
tar xzf release-${{ env.GTEST_VERSION }}.tar.gz
cmake -S googletest-release-${{ env.GTEST_VERSION }} -B build -DCMAKE_INSTALL_PREFIX=${{ env.GTEST_ROOT }}
cmake --build build -t install
env:
CXX: g++
- name: cmake thrust
run: cmake -S . -B build-cuda -DGTENSOR_DEVICE=cuda -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGTENSOR_BUILD_EXAMPLES=ON -DGTENSOR_USE_THRUST=ON -DGTEST_ROOT=${{ env.GTEST_ROOT }} -DGTENSOR_ENABLE_CLIB=ON -DGTENSOR_ENABLE_BLAS=ON -DGTENSOR_ENABLE_FFT=ON -DGTENSOR_ENABLE_SOLVER=ON -DCMAKE_CUDA_FLAGS_RELWITHDEBINFO="-O2 -g -DNDEBUG -Werror=all-warnings"
- name: cmake thrust build
run: cmake --build build-cuda -v
- name: cmake thrust debug
run: cmake -S . -B build-cuda-debug -DGTENSOR_DEVICE=cuda -DCMAKE_BUILD_TYPE=Debug -DGTENSOR_BUILD_EXAMPLES=ON -DGTENSOR_USE_THRUST=ON -DGTEST_ROOT=${{ env.GTEST_ROOT }} -DGTENSOR_ENABLE_CLIB=ON -DGTENSOR_ENABLE_BLAS=ON -DGTENSOR_ENABLE_FFT=ON -DGTENSOR_ENABLE_SOLVER=ON -DCMAKE_CUDA_FLAGS_DEBUG="-g -Werror=all-warnings"
- name: cmake thrust debug build
run: cmake --build build-cuda-debug -v
- name: cmake nothrust
run: cmake -S . -B build-cuda-nothrust -DGTENSOR_DEVICE=cuda -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGTENSOR_BUILD_EXAMPLES=ON -DGTENSOR_USE_THRUST=OFF -DGTEST_ROOT=${{ env.GTEST_ROOT }} -DGTENSOR_ENABLE_CLIB=ON -DGTENSOR_ENABLE_BLAS=ON -DGTENSOR_ENABLE_FFT=ON -DGTENSOR_ENABLE_SOLVER=ON -DCMAKE_CUDA_FLAGS_RELWITHDEBINFO="-O2 -g -DNDEBUG -Werror=all-warnings"
- name: cmake nothrust build
run: cmake --build build-cuda-nothrust -v
- name: GNU make setup gtensor subdir
run: mkdir -p external/gtensor && cp -R ../include external/gtensor/
working-directory: ${{ github.workspace }}/examples
- name: GNU make build
run: make GTENSOR_DEVICE=cuda
working-directory: ${{ github.workspace }}/examples
build-cuda-rmm-umpire:
runs-on: ubuntu-latest
container: nvidia/cuda:12.0.1-devel-ubuntu22.04
env:
CMAKE_VERSION: 3.25.3
GTEST_VERSION: 1.12.1
GTEST_ROOT: ${{ github.workspace }}/googletest
CMAKE_BUILD_PARALLEL_LEVEL: 8
DEBIAN_FRONTEND: noninteractive
UMPIRE_ROOT: ${{ github.workspace }}/umpire
steps:
- uses: actions/checkout@v3
- name: install packages
run: apt-get update && apt-get install -y wget git
- name: install cmake
run: |
wget -O cmake.sh 'https://github.com/Kitware/CMake/releases/download/v${{ env.CMAKE_VERSION}}/cmake-${{env.CMAKE_VERSION }}-Linux-x86_64.sh'
bash cmake.sh --prefix=/usr --skip-license --exclude-subdir
- name: install googletest
run: |
mkdir -p ${{ env.GTEST_ROOT }}
cd ${{ env.GTEST_ROOT }}
wget https://github.com/google/googletest/archive/release-${{ env.GTEST_VERSION }}.tar.gz
tar xzf release-${{ env.GTEST_VERSION }}.tar.gz
cmake -S googletest-release-${{ env.GTEST_VERSION }} -B build -DCMAKE_INSTALL_PREFIX=${{ env.GTEST_ROOT }}
cmake --build build -t install
env:
CXX: g++
- name: cmake nothrust rmm
run: cmake -S . -B build-cuda-rmm -DGTENSOR_DEVICE=cuda -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGTENSOR_BUILD_EXAMPLES=ON -DGTENSOR_USE_THRUST=OFF -DGTEST_ROOT=${{ env.GTEST_ROOT }} -DGTENSOR_ENABLE_CLIB=ON -DGTENSOR_ENABLE_BLAS=ON -DGTENSOR_ENABLE_FFT=ON -DGTENSOR_ENABLE_SOLVER=ON -DGTENSOR_USE_RMM=ON
- name: cmake nothrust rmm build
run: cmake --build build-cuda-rmm -v
- name: install umpire
run: |
mkdir -p ${{ env.UMPIRE_ROOT }}
cd ${{ env.UMPIRE_ROOT }}
git clone --recursive https://github.com/LLNL/Umpire.git src
cmake -S src -B build -DCMAKE_INSTALL_PREFIX=${{ env.UMPIRE_ROOT }}/install -DENABLE_CUDA=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build -t install
- name: cmake nothrust umpire
run: cmake -S . -B build-cuda-umpire -DGTENSOR_DEVICE=cuda -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGTENSOR_BUILD_EXAMPLES=ON -DGTENSOR_USE_THRUST=OFF -DGTEST_ROOT=${{ env.GTEST_ROOT }} -DGTENSOR_ENABLE_CLIB=ON -DGTENSOR_ENABLE_BLAS=ON -DGTENSOR_ENABLE_FFT=ON -DGTENSOR_ENABLE_SOLVER=ON
env:
CMAKE_PREFIX_PATH: ${{env.CMAKE_PREFIX_PATH}}:${{ env.UMPIRE_ROOT }}/install
- name: cmake nothrust umpire build
run: cmake --build build-cuda-umpire -v
build-hip:
runs-on: ubuntu-latest
container: rocm/dev-ubuntu-22.04:5.4.2-complete
env:
CMAKE_PREFIX_PATH: /opt/rocm/lib/cmake
CXX: /opt/rocm/bin/hipcc
HCC_AMDGPU_TARGET: gfx90a
GTEST_VERSION: 1.12.1
GTEST_ROOT: ${{ github.workspace }}/googletest
CMAKE_BUILD_PARALLEL_LEVEL: 8
steps:
- uses: actions/checkout@v3
- name: install core packages
run: apt-get update -y && apt-get install -y wget git cmake clang
- name: install extra ROCm packages
run: apt-get install -y rocthrust rocprim rocfft rocblas hipfft rocsolver rocsparse
- name: install googletest
run: |
mkdir -p ${{ env.GTEST_ROOT }}
cd ${{ env.GTEST_ROOT }}
wget https://github.com/google/googletest/archive/release-${{ env.GTEST_VERSION }}.tar.gz
tar xzf release-${{ env.GTEST_VERSION }}.tar.gz
cmake -S googletest-release-${{ env.GTEST_VERSION }} -B build -DCMAKE_INSTALL_PREFIX=${{ env.GTEST_ROOT }}
cmake --build build -t install
env:
CXX: clang++
- name: cmake thrust
run: cmake -S . -B build-hip -DGTENSOR_DEVICE=hip -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGTENSOR_BUILD_EXAMPLES=ON -DGTENSOR_USE_THRUST=ON -DGTEST_ROOT=${{ env.GTEST_ROOT }} -DGTENSOR_ENABLE_CLIB=ON -DGTENSOR_ENABLE_BLAS=ON -DGTENSOR_ENABLE_FFT=ON -DGTENSOR_ENABLE_SOLVER=ON
- name: cmake thrust build
run: cmake --build build-hip -v
- name: cmake thrust debug
run: cmake -S . -B build-hip-debug -DGTENSOR_DEVICE=hip -DCMAKE_BUILD_TYPE=Debug -DGTENSOR_BUILD_EXAMPLES=ON -DGTENSOR_USE_THRUST=ON -DGTEST_ROOT=${{ env.GTEST_ROOT }} -DGTENSOR_ENABLE_CLIB=ON -DGTENSOR_ENABLE_BLAS=ON -DGTENSOR_ENABLE_FFT=ON -DGTENSOR_ENABLE_SOLVER=ON
- name: cmake thrust debug build
run: cmake --build build-hip-debug -v
- name: cmake nothrust
run: cmake -S . -B build-hip-nothrust -DGTENSOR_DEVICE=hip -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGTENSOR_BUILD_EXAMPLES=ON -DGTENSOR_USE_THRUST=OFF -DGTEST_ROOT=${{ env.GTEST_ROOT }} -DGTENSOR_ENABLE_CLIB=ON -DGTENSOR_ENABLE_BLAS=ON -DGTENSOR_ENABLE_FFT=ON -DGTENSOR_ENABLE_SOLVER=ON
- name: cmake nothrust build
run: cmake --build build-hip-nothrust -v
- name: GNU make setup gtensor subdir
run: mkdir -p external/gtensor && cp -R ../include external/gtensor/
working-directory: ${{ github.workspace }}/examples
- name: GNU make build
run: make GTENSOR_DEVICE=hip
working-directory: ${{ github.workspace }}/examples
build-hip-umpire:
runs-on: ubuntu-latest
container: rocm/dev-ubuntu-22.04:5.4.2-complete
env:
CMAKE_PREFIX_PATH: /opt/rocm/lib/cmake
ROCM_PATH: /opt/rocm
CXX: /opt/rocm/bin/hipcc
HCC_AMDGPU_TARGET: gfx90a
GTEST_VERSION: 1.12.1
GTEST_ROOT: ${{ github.workspace }}/googletest
UMPIRE_ROOT: ${{ github.workspace }}/umpire
CMAKE_BUILD_PARALLEL_LEVEL: 8
steps:
- uses: actions/checkout@v3
- name: install core packages
run: apt-get update -y && apt-get install -y wget git cmake clang
- name: install extra ROCm packages
run: apt-get install -y rocthrust rocprim rocfft rocblas hipfft rocsolver rocsparse
- name: install googletest
run: |
mkdir -p ${{ env.GTEST_ROOT }}
cd ${{ env.GTEST_ROOT }}
wget https://github.com/google/googletest/archive/release-${{ env.GTEST_VERSION }}.tar.gz
tar xzf release-${{ env.GTEST_VERSION }}.tar.gz
cmake -S googletest-release-${{ env.GTEST_VERSION }} -B build -DCMAKE_INSTALL_PREFIX=${{ env.GTEST_ROOT }}
cmake --build build -t install
env:
CXX: clang++
- name: install umpire
run: |
mkdir -p ${{ env.UMPIRE_ROOT }}
cd ${{ env.UMPIRE_ROOT }}
git clone --recursive https://github.com/LLNL/Umpire.git src
cmake -S src -B build -DCMAKE_INSTALL_PREFIX=${{ env.UMPIRE_ROOT }}/install -DENABLE_HIP=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build -t install
- name: cmake nothrust umpire
run: cmake -S . -B build-hip-umpire -DGTENSOR_DEVICE=hip -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGTENSOR_BUILD_EXAMPLES=ON -DGTENSOR_USE_THRUST=OFF -DGTEST_ROOT=${{ env.GTEST_ROOT }} -DGTENSOR_ENABLE_CLIB=ON -DGTENSOR_ENABLE_BLAS=ON -DGTENSOR_ENABLE_FFT=ON -DGTENSOR_ENABLE_SOLVER=ON
env:
CMAKE_PREFIX_PATH: ${{env.CMAKE_PREFIX_PATH}}:${{ env.UMPIRE_ROOT }}/install
- name: cmake nothrust umpire build
run: cmake --build build-hip-umpire -v