Skip to content

Commit

Permalink
rm ar6 gp
Browse files Browse the repository at this point in the history
  • Loading branch information
ameli committed Dec 4, 2023
1 parent d564cac commit 92b582e
Show file tree
Hide file tree
Showing 14 changed files with 121 additions and 36 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ jobs:
USE_CUDA: 0

- name: Test
if: (matrix.python-version != '3.12') # matplotlib still depends on deprecated distutils in the new python 3.12
run: |
python -m pip install --upgrade pytest
python -m pip install --upgrade pytest-cov
Expand Down
58 changes: 51 additions & 7 deletions .github/workflows/deploy-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,33 @@ jobs:
# does not need manylinux docker, thuns, CUDA can be installed in
# the github action's virtual machine using the Jimver's action
# in the previous action (see above).
- name: Build wheels in windows with CUDA support
- name: Build wheels in windows with CUDA support (X86_64)
if: matrix.os == 'windows-latest'
uses: pypa/[email protected]
env:
CIBW_ARCHS_WINDOWS: "AMD64 x86 ARM64"
CIBW_BUILD: "*-win_amd64 *-win_arm64"
CIBW_ARCHS_WINDOWS: "AMD64 x86"
CIBW_BUILD: "*-win_amd64"
CIBW_SKIP: "pp* cp36-* cp37-* cp38-*"
CIBW_BUILD_VERBOSITY: 1
CIBW_ENVIRONMENT: "USE_LONG_INT=0 USE_UNSIGNED_LONG_INT=0 USE_CBLAS=0 USE_CUDA=1 CUDA_DYNAMIC_LOADING=0"
with:
output-dir: wheelhouse

# Build wheel for windows with CUDA enabled. Note that cibuildwheel
# does not need manylinux docker, thuns, CUDA can be installed in
# the github action's virtual machine using the Jimver's action
# in the previous action (see above).
- name: Build wheels in windows without CUDA support (ARM64)
if: matrix.os == 'windows-latest'
uses: pypa/[email protected]
env:
CIBW_ARCHS_WINDOWS: "ARM64"
CIBW_BUILD: "*-win_arm64"
CIBW_SKIP: "pp* cp36-* cp37-* cp38-*"
CIBW_BUILD_VERBOSITY: 1
CIBW_ENVIRONMENT: "USE_LONG_INT=0 USE_UNSIGNED_LONG_INT=0 USE_CBLAS=0 USE_CUDA=0 CUDA_DYNAMIC_LOADING=0"
with:
output-dir: wheelhouse

# Do not enable compiling with CUDA for macos since NIVDIA no
# longer supports CUDA in the macos.
Expand Down Expand Up @@ -111,20 +127,48 @@ jobs:
# anaconda cloud upload size is 1GB, the large wheel size will not
# be a problem. The advantage of bundling cuda libraries to the
# wheel is that the end-user does not have to install cuda toolkit.
- name: Build wheels in linux with CUDA support
- name: Build wheels in linux with CUDA support (X86_64)
if: matrix.os == 'ubuntu-latest'
uses: pypa/[email protected]
env:
CIBW_MANYLINUX_X86_64_IMAGE: sameli/manylinux2014_x86_64_cuda_12.2
# CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
# CIBW_BEFORE_ALL_LINUX: chmod +x .github/scripts/install_cuda.sh && .github/scripts/install_cuda.sh
CIBW_ARCHS_LINUX: "x86_64 aarch64"
CIBW_BUILD: "*-manylinux_x86_64 *-manylinux_aarch64"
CIBW_ARCHS_LINUX: "x86_64"
CIBW_BUILD: "*-manylinux_x86_64"
CIBW_SKIP: "pp* cp36-* cp37-* cp38-*"
CIBW_BUILD_VERBOSITY: 1
CIBW_ENVIRONMENT: "USE_LONG_INT=0 USE_UNSIGNED_LONG_INT=0 USE_CBLAS=0 USE_CUDA=1 CUDA_DYNAMIC_LOADING=0 CUDA_HOME=/usr/local/cuda"
with:
output-dir: wheelhouse

# Enable compiling with CUDA, only for linux. Note that cuda must
# be installed "inside" the manylinux docker image, not in the main
# github virtual machine. Also, we should use manylinux2014, but
# not manylinux1. Because of this, we will not install CUDA with
# the Jimver's action (unlike we did so for the windows wheel in
# the above). The ``CUDA_DYNAMIC_LOADING=0`` disables dynamic
# loading of CUDA library. Base of this, when the wheels are
# created in manylinux platform, the cuda's libraries
# (libcudart.so, libcublas.so, libcusparse.so) will bundle to
# the wheel. This is increases the wheel size, bit since the
# anaconda cloud upload size is 1GB, the large wheel size will not
# be a problem. The advantage of bundling cuda libraries to the
# wheel is that the end-user does not have to install cuda toolkit.
- name: Build wheels in linux without CUDA support (AARCH64)
if: matrix.os == 'ubuntu-latest'
uses: pypa/[email protected]
env:
# CIBW_MANYLINUX_X86_64_IMAGE: sameli/manylinux2014_x86_64_cuda_12.2
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
# CIBW_BEFORE_ALL_LINUX: chmod +x .github/scripts/install_cuda.sh && .github/scripts/install_cuda.sh
CIBW_ARCHS_LINUX: "aarch64"
CIBW_BUILD: "*-manylinux_aarch64"
CIBW_SKIP: "pp* cp36-* cp37-* cp38-*"
CIBW_BUILD_VERBOSITY: 1
CIBW_ENVIRONMENT: "USE_LONG_INT=0 USE_UNSIGNED_LONG_INT=0 USE_CBLAS=0 USE_CUDA=0 CUDA_DYNAMIC_LOADING=0 CUDA_HOME=/usr/local/cuda"
with:
output-dir: wheelhouse

- name: Upload artifacts
uses: actions/upload-artifact@v3
Expand All @@ -147,7 +191,7 @@ jobs:
# To publish to pypi on each GitHub Release, use the following:
# if: github.event_name == 'release' && github.event.action == 'published'
steps:

- name: Clean runner space
if: matrix.os == 'ubuntu-latest'
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.11'

# Build doxygen files in /docs/doxygen/output/html
- name: Build doxygen
Expand Down
63 changes: 54 additions & 9 deletions .github/workflows/deploy-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: deploy-pypi

on:
# push:
# branches:
# - main
push:
branches:
- main
release:
types:
- published
Expand Down Expand Up @@ -79,17 +79,33 @@ jobs:
# does not need manylinux docker, thuns, CUDA can be installed in
# the github action's virtual machine using the Jimver's action
# in the previous action (see above).
- name: Build wheels in windows with CUDA support
- name: Build wheels in windows with CUDA support (X86_64)
if: matrix.os == 'windows-latest'
uses: pypa/[email protected]
env:
CIBW_ARCHS_WINDOWS: "AMD64 x86 ARM64"
CIBW_BUILD: "*-win_amd64 *-win_arm64"
CIBW_ARCHS_WINDOWS: "AMD64 x86"
CIBW_BUILD: "*-win_amd64"
CIBW_SKIP: "pp* cp36-* cp37-* cp38-*"
CIBW_BUILD_VERBOSITY: 1
CIBW_ENVIRONMENT: "USE_LONG_INT=0 USE_UNSIGNED_LONG_INT=0 USE_CBLAS=0 USE_CUDA=1 CUDA_DYNAMIC_LOADING=1"
with:
output-dir: wheelhouse

# Build wheel for windows with CUDA enabled. Note that cibuildwheel
# does not need manylinux docker, thuns, CUDA can be installed in
# the github action's virtual machine using the Jimver's action
# in the previous action (see above).
- name: Build wheels in windows without CUDA support (ARM64)
if: matrix.os == 'windows-latest'
uses: pypa/[email protected]
env:
CIBW_ARCHS_WINDOWS: "ARM64"
CIBW_BUILD: "*-win_arm64"
CIBW_SKIP: "pp* cp36-* cp37-* cp38-*"
CIBW_BUILD_VERBOSITY: 1
CIBW_ENVIRONMENT: "USE_LONG_INT=0 USE_UNSIGNED_LONG_INT=0 USE_CBLAS=0 USE_CUDA=0 CUDA_DYNAMIC_LOADING=1"
with:
output-dir: wheelhouse

# Do not enable compiling with CUDA for macos since NIVDIA no
# longer supports CUDA in the macos.
Expand Down Expand Up @@ -118,21 +134,50 @@ jobs:
# increase (cuda libs are large), and the manylinux wheel can be
# uploaded to pypi (pypi has 100MB upload limit). On the down side,
# the user has to install cuda library themselves.
- name: Build wheels in linux with CUDA support
- name: Build wheels in linux with CUDA support (X86_64)
if: matrix.os == 'ubuntu-latest'
uses: pypa/[email protected]
env:
CIBW_MANYLINUX_X86_64_IMAGE: sameli/manylinux2014_x86_64_cuda_12.2
# CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
# CIBW_BEFORE_ALL_LINUX: chmod +x .github/scripts/install_cuda.sh && .github/scripts/install_cuda.sh
CIBW_ARCHS_LINUX: "x86_64 aarch64"
CIBW_BUILD: "*-manylinux_x86_64 *-manylinux_aarch64"
CIBW_ARCHS_LINUX: "x86_64"
CIBW_BUILD: "*-manylinux_x86_64"
CIBW_SKIP: "pp* cp36-* cp37-* cp38-*"
CIBW_BUILD_VERBOSITY: 1
CIBW_ENVIRONMENT: "USE_LONG_INT=0 USE_UNSIGNED_LONG_INT=0 USE_CBLAS=0 USE_CUDA=1 CUDA_DYNAMIC_LOADING=1 CUDA_HOME=/usr/local/cuda"
# CIBW_BEFORE_BUILD_LINUX: yum update; yum install gcc-gfortran openblas-devel.x86_64 lapack-devel.x86_64 -y;
with:
output-dir: wheelhouse

# Enable compiling with CUDA, only for linux. Note that cuda must
# be installed "inside" the manylinux docker image, not in the main
# github virtual machine. Also, we should use manylinux2014, but
# not manylinux1. Because of this, we will not install CUDA with
# the Jimver's action (unlike we did so for the windows wheel in
# the above). The ``CUDA_DYNAMIC_LOADING=1`` enables dynamic
# loading of CUDA library. Base of this, when the wheels are
# created in manylinux platform, the cuda's libraries
# (libcudart.so, libcublas.so, libcusparse.so) will NOT bundle to
# the wheel. This is very good since the size of the wheel does not
# increase (cuda libs are large), and the manylinux wheel can be
# uploaded to pypi (pypi has 100MB upload limit). On the down side,
# the user has to install cuda library themselves.
- name: Build wheels in linux without CUDA support (AARCH64)
if: matrix.os == 'ubuntu-latest'
uses: pypa/[email protected]
env:
# CIBW_MANYLINUX_X86_64_IMAGE: sameli/manylinux2014_x86_64_cuda_12.2
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
# CIBW_BEFORE_ALL_LINUX: chmod +x .github/scripts/install_cuda.sh && .github/scripts/install_cuda.sh
CIBW_ARCHS_LINUX: "aarch64"
CIBW_BUILD: "*-manylinux_aarch64"
CIBW_SKIP: "pp* cp36-* cp37-* cp38-*"
CIBW_BUILD_VERBOSITY: 1
CIBW_ENVIRONMENT: "USE_LONG_INT=0 USE_UNSIGNED_LONG_INT=0 USE_CBLAS=0 USE_CUDA=0 CUDA_DYNAMIC_LOADING=1 CUDA_HOME=/usr/local/cuda"
# CIBW_BEFORE_BUILD_LINUX: yum update; yum install gcc-gfortran openblas-devel.x86_64 lapack-devel.x86_64 -y;
with:
output-dir: wheelhouse

- name: Upload artifacts
uses: actions/upload-artifact@v3
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Successful installation and tests performed on the following operating systems,
+ +-------------------+--------+-------+-------+-------+-------+-------+-------+-------+ +
| | AARCH-64 | CPU | |y| | |y| | |y| | |y| | |y| | |y| | |y| | |
+ + +--------+-------+-------+-------+-------+-------+-------+-------+ +
| | | GPU | |y| | |y| | |y| | |y| | |y| | |y| | |y| | |
| | | GPU | |n| | |n| | |n| | |n| | |n| | |n| | |n| | |
+----------+-------------------+--------+-------+-------+-------+-------+-------+-------+-------+-----------------+
| macOS | X86-64 | CPU | |y| | |y| | |y| | |y| | |n| | |n| | |n| | |build-macos| |
+ + +--------+-------+-------+-------+-------+-------+-------+-------+ +
Expand All @@ -78,7 +78,7 @@ Successful installation and tests performed on the following operating systems,
+ +-------------------+--------+-------+-------+-------+-------+-------+-------+-------+ +
| | ARM-64 | CPU | |y| | |y| | |y| | |y| | |n| | |n| | |n| | |
+ + +--------+-------+-------+-------+-------+-------+-------+-------+ +
| | | GPU | |y| | |y| | |y| | |y| | |n| | |n| | |n| | |
| | | GPU | |n| | |n| | |n| | |n| | |n| | |n| | |n| | |
+----------+-------------------+--------+-------+-------+-------+-------+-------+-------+-------+-----------------+

.. |build-linux| image:: https://img.shields.io/github/actions/workflow/status/ameli/imate/build-linux.yml
Expand Down
1 change: 1 addition & 0 deletions conda-recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ python:
- 3.9
- 3.10
- 3.11
- 3.12
3 changes: 0 additions & 3 deletions docs/notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,6 @@ Fast Trace Estimator
TODO
====

* Python 3.12 completely removes distutils. The distutils package should be
replaced with setuptools.

* Implement ``keep`` functionality for slq method.
* Hutchinson method can be implemented in C++ and also in CUDA on GPU.
* Other functions (besides traceinv and logdet)
Expand Down
4 changes: 2 additions & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Successful installation and tests performed on the following operating systems,
+ +-------------------+--------+-------+-------+-------+-------+-------+-------+-------+ +
| | AARCH-64 | CPU | |y| | |y| | |y| | |y| | |y| | |y| | |y| | |
+ + +--------+-------+-------+-------+-------+-------+-------+-------+ +
| | | GPU | |y| | |y| | |y| | |y| | |y| | |y| | |y| | |
| | | GPU | |n| | |n| | |n| | |n| | |n| | |n| | |n| | |
+----------+-------------------+--------+-------+-------+-------+-------+-------+-------+-------+-----------------+
| macOS | X86-64 | CPU | |y| | |y| | |y| | |y| | |n| | |n| | |n| | |build-macos| |
+ + +--------+-------+-------+-------+-------+-------+-------+-------+ +
Expand All @@ -109,7 +109,7 @@ Successful installation and tests performed on the following operating systems,
+ +-------------------+--------+-------+-------+-------+-------+-------+-------+-------+ +
| | ARM-64 | CPU | |y| | |y| | |y| | |y| | |n| | |n| | |n| | |
+ + +--------+-------+-------+-------+-------+-------+-------+-------+ +
| | | GPU | |y| | |y| | |y| | |y| | |n| | |n| | |n| | |
| | | GPU | |n| | |n| | |n| | |n| | |n| | |n| | |n| | |
+----------+-------------------+--------+-------+-------+-------+-------+-------+-------+-------+-----------------+

.. |build-linux| image:: https://img.shields.io/github/actions/workflow/status/ameli/imate/build-linux.yml
Expand Down
2 changes: 1 addition & 1 deletion docs/source/install/dependencies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ OpenMP (`Required`)

For **macOS** users:

It's crucial to note that OpenMP is not part of the default Apple Xcode's LLVM compiler. Even if you have Apple Xcode LLVM compiler readily installed on macOS, you will still need to install OpenMP separately via `libomp` Homebrew package (see below) or as part of the *open source* `LLVM compiler <https://llvm.org/>`__, via `llvm` Homebrew package.
It's crucial to note that OpenMP is not part of the default Apple Xcode's LLVM compiler. Even if you have Apple Xcode LLVM compiler readily installed on macOS, you will still need to install OpenMP separately via ``libomp`` Homebrew package (see below) or as part of the *open source* `LLVM compiler <https://llvm.org/>`__, via ``llvm`` Homebrew package.

For **Windows** users:

Expand Down
2 changes: 1 addition & 1 deletion docs/source/install/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Upon importing |project|, you may encounter this error:
.../site-packages/imate/logdet/../.dylibs/libomp.dylib:
cannot load 'libomp.dylib' (load command 0x80000034 is unknown)

This message indicates that OpenMP is not installed on your system, a requirement for the |project|. To resolve this issue, refer to `OpenMP installation instructions <dependencies_openmp>`.
This message indicates that OpenMP is not installed on your system, a requirement for the |project|. To resolve this issue, refer to :ref:`OpenMP installation instructions <dependencies_openmp>`.

Issue of Initializing ``libomp``
================================
Expand Down
4 changes: 2 additions & 2 deletions examples/_utilities/plot_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from mpl_toolkits.axes_grid1.inset_locator import inset_axes # noqa: F401
from mpl_toolkits.axes_grid1.inset_locator import InsetPosition # noqa: F401
from mpl_toolkits.axes_grid1.inset_locator import mark_inset # noqa: F401
from distutils.spawn import find_executable
import shutil
from .display_utilities import is_notebook

# Check DISPLAY
Expand Down Expand Up @@ -71,7 +71,7 @@ def load_plot_settings(font_scale=None):
# sns.set()

# LaTeX
if find_executable('latex'):
if shutil.which('latex'):
try:
# plt.rc('text', usetex=True)
matplotlib.rcParams['text.usetex'] = True
Expand Down
2 changes: 1 addition & 1 deletion imate/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.20.12"
__version__ = "0.20.13"
4 changes: 2 additions & 2 deletions imate/_utilities/plot_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from matplotlib.ticker import FormatStrFormatter, FuncFormatter # noqa: F401
from mpl_toolkits.axes_grid1 import make_axes_locatable # noqa: F401

from distutils.spawn import find_executable
import shutil
from .display_utilities import is_notebook
import logging
import warnings
Expand Down Expand Up @@ -72,7 +72,7 @@ def load_plot_settings():
# sns.set()

# LaTeX
if find_executable('latex'):
if shutil.which('latex'):
try:
# plt.rc('text',usetex=True)
matplotlib.rcParams['text.usetex'] = True
Expand Down
Loading

0 comments on commit 92b582e

Please sign in to comment.