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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
repos:
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.5.1'
rev: 'v1.19.1'
hooks:
- id: mypy
language: system
pass_filenames: false
args: ['legate_sparse']
- repo: https://github.com/psf/black
rev: 23.9.1
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.12.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 7.0.0
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
rev: 7.3.0
hooks:
- id: flake8
args: [--config=.flake8]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: 'v16.0.6' # Use the sha / tag you want to point at
rev: 'v21.1.8' # Use the sha / tag you want to point at
hooks:
- id: clang-format
files: \.(cu|cuh|h|cc|inl)$
Expand Down
3 changes: 1 addition & 2 deletions examples/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,7 @@ class DummyScope:
that may or may not use resource scoping.
"""

def __init__(self):
...
def __init__(self): ...

def __enter__(self):
"""Enter the context (no-op)."""
Expand Down
4 changes: 3 additions & 1 deletion examples/pde.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,9 @@ def execute(nx, ny, plot, plot_fname, throughput, tol, max_iters, warmup_iters,
# If we're testing throughput, run only the prescribed number of iterations.
if throughput:
if use_legate:
p_sol, iters = linalg.cg(A, bflat, rtol=tol, maxiter=max_iters, conv_test_iters=max_iters)
p_sol, iters = linalg.cg(
A, bflat, rtol=tol, maxiter=max_iters, conv_test_iters=max_iters
)
else:
p_sol, iters = linalg.cg(A, bflat, rtol=tol, maxiter=max_iters)
else:
Expand Down
3 changes: 1 addition & 2 deletions legate_sparse/coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ def should_wrap(obj: object) -> bool:


class AnyCallable(Protocol):
def __call__(self, *args: Any, **kwargs: Any) -> Any:
...
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...


def wrap(func: AnyCallable) -> Any:
Expand Down
1 change: 1 addition & 0 deletions legate_sparse/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
def _is_sparse_matrix(obj) -> bool:
return any((isinstance(obj, csr_array), isinstance(obj, dia_array)))


def isspmatrix(obj) -> bool:
"""Check if an object is a legate sparse matrix.

Expand Down
4 changes: 2 additions & 2 deletions scripts/memlog_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

# Parse the log file
allocations = parse_memlog('memlog.txt')

# Export to CSV
export_to_csv(allocations, 'memory_analysis.csv')

# Create visualizations (requires pandas, matplotlib, seaborn)
visualize_allocations(allocations)
""" # noqa: W293
Expand Down