Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/spack-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,16 @@ jobs:
backend:
- name: nvcc
image: gcc
compiler: nvcc_wrapper
kokkos: +cuda +wrapper cuda_arch=90
kokkos_fft: device_backend=cufft
spack_path: ""
- name: rocm
image: rocm
compiler: hipcc
kokkos: +rocm amdgpu_target=gfx90a
kokkos_fft: device_backend=hipfft
spack_path: spack-configs/rocm

steps:
- name: Free Disk Space (Ubuntu)
Expand All @@ -32,15 +40,17 @@ jobs:
- name: Clone and install spack
run: |
docker run -v ${{ github.workspace }}:/work ghcr.io/kokkos/kokkos-fft/base_${{ matrix.backend.image }}:latest \
bash -c "git clone --depth=2 --branch=v1.0.1 https://github.com/spack/spack.git"
bash -c "git clone --depth=2 --branch=v1.0.2 https://github.com/spack/spack.git"

- name: Configure and build with CMake
run: |
docker run -v ${{ github.workspace }}:/work ghcr.io/kokkos/kokkos-fft/base_${{ matrix.backend.image }}:latest \
bash -c "source spack/share/spack/setup-env.sh && \
export SPACK_USER_CONFIG_PATH=${{ matrix.backend.spack_path }} && \
spack compiler find && \
spack spec kokkos-fft ${{ matrix.backend.kokkos_fft }} +tests ^kokkos ${{ matrix.backend.kokkos }} && \
spack install kokkos-fft ${{ matrix.backend.kokkos_fft }} +tests ^kokkos ${{ matrix.backend.kokkos }} && \
spack load kokkos kokkos-fft && \
cd install_test/as_library && \
cmake -B build && \
cmake -D CMAKE_CXX_COMPILER=${{ matrix.backend.compiler }} -B build && \
cmake --build build -j 4"
13 changes: 7 additions & 6 deletions docker/rocm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,24 @@ RUN apt-get update && apt-get install -y \
hipfft \
rocfft \
libfftw3-dev \
python3 \
gfortran \
$ADDITIONAL_PACKAGES \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

ENV FFTWDIR "/usr"

ENV PATH=/opt/rocm/bin:$PATH
ENV LD_LIBRARY_PATH /opt/rocm/hipfft/lib:$LD_LIBRARY_PATH
ENV CMAKE_PREFIX_PATH /opt/rocm/hip/:/opt/rocm/:$CMAKE_PREFIX_PATH
ENV FFTWDIR=/usr \
CMAKE_DIR=/opt/cmake \
PATH=/opt/rocm/bin:$PATH \
LD_LIBRARY_PATH=/opt/rocm/hipfft/lib:$LD_LIBRARY_PATH \
CMAKE_PREFIX_PATH=/opt/rocm/hip/:/opt/rocm/:$CMAKE_PREFIX_PATH

RUN git config --global --add safe.directory "*"

# Install newer CMake manually
ARG CMAKE_VERSION=3.23.2

ENV CMAKE_DIR=/opt/cmake
RUN CMAKE_URL=https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION} && \
CMAKE_SCRIPT=cmake-${CMAKE_VERSION}-linux-x86_64.sh && \
CMAKE_SHA256=cmake-${CMAKE_VERSION}-SHA-256.txt && \
Expand Down
134 changes: 134 additions & 0 deletions spack-configs/rocm/packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# SPDX-FileCopyrightText: (C) The kokkos-fft development team, see COPYRIGHT.md file
#
# SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception

packages:
llvm-amdgpu:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/rocm
extra_attributes:
compilers:
c: /opt/rocm/bin/amdclang
cxx: /opt/rocm/bin/amdclang++
hip:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/rocm-6.2.0
hipfft:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/rocm-6.2.0
hipblas:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/rocm-6.2.0
hipcub:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/rocm-6.2.0
hipfort:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/rocm-6.2.0
hipify-clang:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/rocm-6.2.0
hiprand:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/rocm-6.2.0
hipsolver:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/rocm-6.2.0
hipsparse:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/rocm-6.2.0
hsa-rocr-dev:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/rocm-6.2.0
hsakmt-roct:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/rocm-6.2.0
miopen-hip:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/rocm-6.2.0
rccl:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/rocm-6.2.0
rocalution:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/rocm-6.2.0
rocfft:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/rocm-6.2.0
rocprim:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/rocm-6.2.0
rocblas:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/rocm-6.2.0
roctracer-dev:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/rocm-6.2.0
rocsparse:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/rocm-6.2.0
rocsolver:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/rocm-6.2.0
rocrand:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/rocm-6.2.0
rocprofiler-dev:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/rocm-6.2.0
python:
buildable: false
externals:
- spec: [email protected]+bz2+crypt+ctypes+dbm+lzma+pyexpat~pythoncmd+readline+sqlite3+ssl~tkinter+uuid+zlib
prefix: /usr
cmake:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/cmake
Loading