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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
50 changes: 49 additions & 1 deletion .github/workflows/cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
name: Test on CUDA Build
runs-on: gpu
if: github.repository_owner == 'deepmodeling'
env:
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_MAXSIZE: 5G
container:
image: ghcr.io/deepmodeling/abacus-cuda
volumes:
Expand All @@ -29,10 +32,18 @@ jobs:
with:
submodules: recursive

- name: Report runner info
run: |
echo "runner_name=$RUNNER_NAME"
case "$RUNNER_NAME" in
gpu-runner-*) echo "runner_type=pod" ;;
*) echo "runner_type=vm" ;;
esac

- name: Install CI tools
run: |
sudo apt-get update
sudo apt-get install -y ccache xz-utils ninja-build pkg-config
sudo apt-get install -y ccache xz-utils ninja-build pkg-config zstd

- name: Install external tools from toolchain
run: |
Expand All @@ -41,6 +52,28 @@ jobs:
./scripts/stage4/install_stage4.sh
cd ..

- name: Restore ccache
id: ccache
uses: actions/cache/restore@v4
with:
path: /tmp/ccache.tar.zst
key: ccache-cuda-${{ github.sha }}
restore-keys: |
ccache-cuda-

- name: Unpack ccache
run: |
if [ -f /tmp/ccache.tar.zst ]; then
sudo mkdir -p /github/home/.ccache
sudo tar -I zstd -xf /tmp/ccache.tar.zst -C /github/home
sudo chown -R $(whoami) /github/home/.ccache
fi

- name: ccache stats (before build)
run: |
ccache --zero-stats || true
ccache -s

- name: Configure & Build
run: |
nvidia-smi
Expand All @@ -51,6 +84,21 @@ jobs:
cmake --build build -j "$(nproc)"
cmake --install build

- name: ccache stats (after build)
if: always()
run: ccache -s

- name: Pack ccache
if: always()
run: tar -I 'zstd -T0' -cf /tmp/ccache.tar.zst -C /github/home .ccache

- name: Save ccache
if: always()
uses: actions/cache/save@v4
with:
path: /tmp/ccache.tar.zst
key: ccache-cuda-${{ github.sha }}

- name: Module_LCAO CUDA Unittests
env:
GTEST_COLOR: 'yes'
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
name: Test
runs-on: X64
if: github.repository_owner == 'deepmodeling'
env:
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_MAXSIZE: 5G
container:
image: ghcr.io/deepmodeling/abacus-gnu
volumes:
Expand All @@ -33,12 +36,21 @@ jobs:
sudo chown -R $(whoami) .
git submodule update --init --recursive

- name: Report runner info
run: |
echo "runner_name=$RUNNER_NAME"
case "$RUNNER_NAME" in
gpu-runner-*) echo "runner_type=pod" ;;
*) echo "runner_type=vm" ;;
esac

- name: Install CI tools
run: |
sudo apt-get update
sudo apt-get install -y \
gfortran \
ccache \
zstd \
ca-certificates \
pkg-config \
python-is-python3 \
Expand All @@ -54,6 +66,28 @@ jobs:
./scripts/stage4/install_stage4.sh
cd ..

- name: Restore ccache
id: ccache
uses: actions/cache/restore@v4
with:
path: /tmp/ccache.tar.zst
key: ccache-gnu-${{ github.sha }}
restore-keys: |
ccache-gnu-

- name: Unpack ccache
run: |
if [ -f /tmp/ccache.tar.zst ]; then
sudo mkdir -p /github/home/.ccache
sudo tar -I zstd -xf /tmp/ccache.tar.zst -C /github/home
sudo chown -R $(whoami) /github/home/.ccache
fi

- name: ccache stats (before build)
run: |
ccache --zero-stats || true
ccache -s

- name: Configure
run: |
source toolchain/install/setup
Expand Down Expand Up @@ -85,6 +119,21 @@ jobs:
cmake --build build -j8
cmake --install build

- name: ccache stats (after build)
if: always()
run: ccache -s

- name: Pack ccache
if: always()
run: tar -I 'zstd -T0' -cf /tmp/ccache.tar.zst -C /github/home .ccache

- name: Save ccache
if: always()
uses: actions/cache/save@v4
with:
path: /tmp/ccache.tar.zst
key: ccache-gnu-${{ github.sha }}

- name: Check documentation consistency
run: |
ABACUS_BIN=$(find build -name "abacus_*" -type f -executable | head -1)
Expand Down
2 changes: 1 addition & 1 deletion python/pyabacus/src/ModuleBase/py_base_math.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "source_base/math_sphbes.h"
#include "source_base/math_integral.h"
#include "source_base/sph_bessel_tf.h"
#include "source_base/spherical_bessel_transformer.h"

#include "../utils/pybind_utils.h"

Expand Down
2 changes: 1 addition & 1 deletion source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ list(APPEND device_srcs
source_hamilt/module_xc/kernels/xc_functional_op.cpp
source_pw/module_pwdft/kernels/cal_density_real_op.cpp
source_pw/module_pwdft/kernels/mul_potential_op.cpp
source_pw/module_pwdft/kernels/vec_mul_cx_op.cpp
source_pw/module_pwdft/kernels/vec_mul_vec_complex_op.cpp
source_pw/module_pwdft/kernels/exx_cal_energy_op.cpp)

if(USE_CUDA)
Expand Down
Loading
Loading