Skip to content

Commit

Permalink
bumping python and pytorch version in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tvercaut committed Sep 26, 2024
1 parent 7d2d79a commit cb62be6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
torch-version: ["1.13.1", "2.0.1"]
python-version: ["3.8", "3.10", "3.12"]
torch-version: ["1.13.1", "2.4.1"]

steps:
- uses: actions/checkout@v3
Expand Down
6 changes: 6 additions & 0 deletions torchsparsegradutils/indexed_matmul.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ def segment_mm(a, b, seglen_a):
Returns:
torch.Tensor: The output dense matrix of shape ``(N, D2)``
"""
if torch.__version__ < (2, 4):
raise NotImplementedError("PyTorch version is too old for nested tesors")

if dgl_installed:
# DGL is probably more computationally efficient
# See https://github.com/pytorch/pytorch/issues/136747
Expand Down Expand Up @@ -74,6 +77,9 @@ def gather_mm(a, b, idx_b):
Returns:
torch.Tensor: The output dense matrix of shape ``(N, D2)``
"""
if torch.__version__ < (2, 4):
raise NotImplementedError("PyTorch version is too old for nested tesors")

if dgl_installed:
# DGL is more computationally efficient
# See https://github.com/pytorch/pytorch/issues/136747
Expand Down
5 changes: 5 additions & 0 deletions torchsparsegradutils/tests/test_indexed_matmul.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import torch
import pytest

if torch.__version__ < (2, 4):
pytest.skip(
"Skipping test based on nested tensors since an old version of pytorch is used", allow_module_level=True
)

from torchsparsegradutils import gather_mm, segment_mm

# Identify Testing Parameters
Expand Down

0 comments on commit cb62be6

Please sign in to comment.