Skip to content

Commit d20490a

Browse files
committed
testing workflows with GPU
1 parent 520f64c commit d20490a

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- main
77
- final_project
88
- gpu_branch
9+
- workflows
910

1011
pull_request:
1112
branches:

.github/workflows/tests.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- main
77
- final_project
88
- gpu_branch
9+
- workflows
910

1011
pull_request:
1112
branches:
@@ -18,24 +19,30 @@ jobs:
1819
name: Testing using pytest
1920
runs-on: ubuntu-latest
2021
container:
21-
image: cupy/cupy:v13.4.0
22+
image: nvidia/cuda:12.1.0-devel-ubuntu22.04
2223

2324
steps:
2425
- uses: actions/checkout@v3
2526

26-
- name: Install system dependencies
27+
- name: Set up Python
28+
uses: actions/setup-python@v3
29+
with:
30+
python-version: 3.10.16
31+
32+
- name: Set up Python environment
2733
run: |
28-
apt-get update && apt-get install -y python3-venv python3-pip
34+
python -m venv venv
35+
source venv/bin/activate
36+
shell: bash -e {0}
2937

30-
- name: Install additional dependencies
38+
- name: Install dependencies
3139
run: |
32-
python3 -m venv venv
3340
source venv/bin/activate
3441
python -m pip install .
3542
shell: bash -e {0}
3643

3744
- name: Test with pytest
3845
run: |
3946
source venv/bin/activate
40-
python -m pytest
47+
python -m pytest -v
4148
shell: bash -e {0}

src/pyclassify/eigenvalues.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,8 @@ def eigenvalues_cp(A):
8181
This function checks if the input matrix is square and symmetric, then computes its eigenvalues using
8282
CuPy's sparse linear algebra solvers. It uses `eigsh` for more efficient computation.
8383
IMPORTANT: it important to underline a couple of things regarding this function:
84-
- installing using the command
85-
.. code-block:: shell
86-
python -m pip install cupy-cuda12x
87-
does not allow, for some reason, to import cupyx.scipy.sparse.linalg, and it necessary to import the
84+
- installing using the command 'python -m pip install cupy-cuda12x' does not allow, for some reason,
85+
to import cupyx.scipy.sparse.linalg, and it necessary to import the
8886
function manually form the source code. The problem can be observed using python3.10, while for
8987
python3.12 things seem to work.
9088
- the eighs function in this case does not allow to compute *all* the eigenvalues, but only a number

0 commit comments

Comments
 (0)