本家様 https://bturo.pages.mpcdf.de/gapstop_tm/
git https://gitlab.mpcdf.mpg.de/bturo/gapstop_tm

GPU Accelerated Python Stopgap for Template Matching

gapstop is able to leverage the power of GPU accelerated multi-node HPC
systems to be efficiently used for template matching. It speeds up template
matching by using an MPI-parallel layout and offloading the compute-heavy
correlation kernel to one or more accelerator devices per MPI-process
using JAX.

(google様翻訳:
GPU アクセラレーションによるテンプレート マッチングのための Python の暫定的な解決策,
gapstop は、GPU アクセラレーション マルチノード HPC システムのパワーを活用して、テンプレート マッチングに効率的に使用できます。
MPI 並列レイアウトを使用し、JAX を使用して計算負荷の高い相関カーネルを MPI プロセスごとに 1 つ以上のアクセラレータ デバイスにオフロードすることで、テンプレート マッチングを高速化します。
)

インストール

pyenv/anacondaで作ってます
まずconda環境を読み込みます

source /apps/pyenv/versions/anaconda3-2024.10-1/etc/profile.d/conda.sh

もしまだconda環境を作ってないなら

git clone https://github.com/yyuu/pyenv.git /apps/pyenv
export PYENV_ROOT=/apps/pyenv
export PATH=$PYENV_ROOT/bin:$PATH
pyenv install anaconda3-2024.10-1
source /apps/pyenv/versions/anaconda3-2024.10-1/etc/profile.d/conda.sh

として構築開始

[root@rockylinux9 ~]# dnf install environment-modules openmpi-devel
[root@rockylinux9 ~]# source /etc/profile.d/modules.sh
[root@rockylinux9 ~]# module load mpi/openmpi-x86_64                       <-- mpi4pyのコンパイルのために環境をロードしておきます
 
[root@rockylinux9 ~]# conda create -n GAPSTOP_TM  pip -c conda-forge
 
[root@rockylinux9 ~]# conda activate GAPSTOP_TM
 
(GAPSTOP_TM) [root@rockylinux9 ~]# pip install "gapstop @ git+https://gitlab.mpcdf.mpg.de/bturo/gapstop_tm.git"
Collecting gapstop@ git+https://gitlab.mpcdf.mpg.de/bturo/gapstop_tm.git
  Cloning https://gitlab.mpcdf.mpg.de/bturo/gapstop_tm.git to /tmp/pip-install-qeplj5d9/gapstop_0501ddf738c64c0bb42c4ee239975d2d
  Running command git clone --filter=blob:none --quiet https://gitlab.mpcdf.mpg.de/bturo/gapstop_tm.git /tmp/pip-install-qeplj5d9/gapstop_0501ddf738c64c0bb42c4ee239975d2d
  Resolved https://gitlab.mpcdf.mpg.de/bturo/gapstop_tm.git to commit a7463559ed716c6b71028d546675a3caa5089f4d
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
  WARNING: Generating metadata for package gapstop produced metadata for project name gapstop-tm. Fix your #egg=gapstop fragments.
Discarding git+https://gitlab.mpcdf.mpg.de/bturo/gapstop_tm.git: Requested gapstop-tm from git+https://gitlab.mpcdf.mpg.de/bturo/gapstop_tm.git has inconsistent name: expected 'gapstop', but metadata has 'gapstop-tm'
ERROR: Could not find a version that satisfies the requirement gapstop (unavailable) (from versions: none)
ERROR: No matching distribution found for gapstop (unavailable)
 
(GAPSTOP_TM) [root@rockylinux9 ~]#

とエラーになってしまった.
なので、gitを拾ってそこで作ってみた.

(GAPSTOP_TM) [root@rockylinux9 ~]# cd /apps/src
(GAPSTOP_TM) [root@rockylinux9 src]# git clone https://gitlab.mpcdf.mpg.de/bturo/gapstop_tm
(GAPSTOP_TM) [root@rockylinux9 src]# cd gapstop_tm
 
(GAPSTOP_TM) [root@rockylinux9 gapstop_tm]# pip install -e .[cuda12]   あるいは pip install -e .[cpu] 
 
(GAPSTOP_TM) [root@rockylinux9 gapstop_tm]# conda deactivate
[root@rockylinux9 gapstop_tm]#

environment-modules

「/apps/modulefiles/GAPSTOP_TM」

#%Module1.0
set          root       /apps/pyenv/versions/anaconda3-2024.02-1/envs/GAPSTOP_TM
prepend-path PATH       $root/bin
prepend-path LD_LIBRARY_PATH $root/lib

cuda12にすれば、jaxが入っているようでその確認をします

[root@rockylinux9 ~]# module load GAPSTOP_TM
[root@rockylinux9 ~]# python
Python 3.13.2 | packaged by conda-forge | (main, Feb 17 2025, 14:10:22) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import jax

cpuにAVXが含まれていないとエラーになる...

最新の60件
2025-05-24 2025-05-22 2025-05-21 2025-05-20 2025-05-19 2025-05-18 2025-05-17 2025-05-14 2025-05-13 2025-05-12 2025-05-11 2025-05-08 2025-05-07 2025-05-06 2025-05-05 2025-05-04 2025-05-03 2025-04-27 2025-04-26 2025-04-25 2025-04-24 2025-04-17 2025-04-13 2025-04-02 2025-04-01 2025-03-31 2025-03-29 2025-03-28 2025-03-27 2025-03-26 2025-03-23 2025-03-22 2025-03-20

edit


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2025-03-26 (水) 13:39:07