- Notifications
You must be signed in to change notification settings - Fork15
Update to SuiteSparse:GraphBLAS 8.0.0#456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
45 commits Select commitHold shift + click to select a range
375835b Update to SuiteSparse:GraphBLAS 8.0.0
eriknw94f968b Let the tests run
eriknwf75ee19 oops
eriknwb57cbff Allow contexts to stack/chain together
eriknwea116ea Merge branch 'main' into v8.0.0
eriknw0ae080e Update to 8.0.1
eriknwa1b757e Make `dtypes` a directory so we can add `gb.dtypes.ss`
eriknw8ec612f bump ruff and mark more slow tests
eriknw3996198 moar
eriknwe44c08f JIT for binary and indexunary operators (untested, undocumented)
eriknwaa627d0 oops forgot to add file
eriknw620735c Add test for suitesparse jit
eriknw31faf9b Bump pre-commit
eriknwa835b33 Merge branch 'main' into v8.0.0
eriknw206d433 Merge branch 'main' into v8.0.0
eriknw0e6a217 bump ruff
eriknwb4234e9 Handle scipy 1.11.0
eriknw3416f31 oops fix usage of check_status_carg
eriknw36be766 Add ways to use easily use burble in tests
eriknw20bde63 Try this to allow pre-release
eriknw70a7b98 oops and here
eriknwda1fac3 Merge branch 'main' into v8.0.0
eriknwe259d22 Fix bad merge
eriknw05d3db8 Try to fix SS JIT config when testing on Linux
eriknw8ffd6ba Install c-compiler for JIT
eriknw00d2e6b More experimentation
eriknw76dc467 Better handle JIT UDT numpy and numba dtypes
eriknw0526bfb Try this
eriknw0763253 skip ssjit tests on macos for now
eriknw1125674 Merge branch 'main' into v8.0.0
eriknwd7a9460 fix `ss.dtypes`
eriknw8c3692a Run with SuiteSparse 7 and 8
eriknw9a9d24b Enable SS 7 in CI; and a bit more coverage
eriknw0d564e0 Try this
eriknw1add974 Still experimenting
eriknw1109d02 Another try
eriknw3c234f3 skip SS JIT on macos again
eriknwd3e2a4f Oops, forgot to commit this when trying clang
eriknwc9b3beb Don't use `-isysroot` for SS JIT on macos
eriknw86bddfc Clean up; SS JIT working on macos in CI now!
eriknw546814b Clean up; change dependency metadata to only use SS:GB 7
eriknwfdd4cad Test python-suitespare-graphblas 8 wheels
eriknwaee83f8 hmm, don't test JIT on Windows with suitesparse-graphblas wheels
eriknw8639b0b Clean up again
eriknw6270abf Update ss config doc for experimental GPU support
eriknwFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
36 changes: 21 additions & 15 deletions.github/workflows/test_and_build.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions.pre-commit-config.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletiondocs/env.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletionsgraphblas/binary/ss.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| from ..core import operator | ||
| from ..core.ss.binary import register_new # noqa: F401 | ||
| _delayed = {} | ||
2 changes: 1 addition & 1 deletiongraphblas/core/dtypes.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletionsgraphblas/core/ss/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| import suitesparse_graphblas as _ssgb | ||
| _IS_SSGB7 = _ssgb.__version__.split(".", 1)[0] == "7" |
72 changes: 72 additions & 0 deletionsgraphblas/core/ss/binary.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| from ... import backend | ||
| from ...dtypes import lookup_dtype | ||
| from ...exceptions import check_status_carg | ||
| from .. import NULL, ffi, lib | ||
| from ..operator.base import TypedOpBase | ||
| from ..operator.binary import BinaryOp, TypedUserBinaryOp | ||
| from . import _IS_SSGB7 | ||
| ffi_new = ffi.new | ||
| class TypedJitBinaryOp(TypedOpBase): | ||
| __slots__ = "_monoid", "_jit_c_definition" | ||
| opclass = "BinaryOp" | ||
| def __init__(self, parent, name, type_, return_type, gb_obj, jit_c_definition, dtype2=None): | ||
| super().__init__(parent, name, type_, return_type, gb_obj, name, dtype2=dtype2) | ||
| self._monoid = None | ||
| self._jit_c_definition = jit_c_definition | ||
| @property | ||
| def jit_c_definition(self): | ||
| return self._jit_c_definition | ||
| monoid = TypedUserBinaryOp.monoid | ||
| commutes_to = TypedUserBinaryOp.commutes_to | ||
| _semiring_commutes_to = TypedUserBinaryOp._semiring_commutes_to | ||
| is_commutative = TypedUserBinaryOp.is_commutative | ||
| type2 = TypedUserBinaryOp.type2 | ||
| __call__ = TypedUserBinaryOp.__call__ | ||
| def register_new(name, jit_c_definition, left_type, right_type, ret_type): | ||
| if backend != "suitesparse": # pragma: no cover (safety) | ||
| raise RuntimeError( | ||
| "`gb.binary.ss.register_new` invalid when not using 'suitesparse' backend" | ||
| ) | ||
| if _IS_SSGB7: | ||
| # JIT was introduced in SuiteSparse:GraphBLAS 8.0 | ||
| import suitesparse_graphblas as ssgb | ||
| raise RuntimeError( | ||
| "JIT was added to SuiteSparse:GraphBLAS in version 8; " | ||
| f"current version is {ssgb.__version__}" | ||
| ) | ||
| left_type = lookup_dtype(left_type) | ||
| right_type = lookup_dtype(right_type) | ||
| ret_type = lookup_dtype(ret_type) | ||
| name = name if name.startswith("ss.") else f"ss.{name}" | ||
| module, funcname = BinaryOp._remove_nesting(name) | ||
| rv = BinaryOp(name) | ||
| gb_obj = ffi_new("GrB_BinaryOp*") | ||
| check_status_carg( | ||
| lib.GxB_BinaryOp_new( | ||
| gb_obj, | ||
| NULL, | ||
| ret_type._carg, | ||
| left_type._carg, | ||
| right_type._carg, | ||
| ffi_new("char[]", funcname.encode()), | ||
| ffi_new("char[]", jit_c_definition.encode()), | ||
| ), | ||
| "BinaryOp", | ||
| gb_obj[0], | ||
| ) | ||
| op = TypedJitBinaryOp( | ||
| rv, funcname, left_type, ret_type, gb_obj[0], jit_c_definition, dtype2=right_type | ||
| ) | ||
| rv._add(op) | ||
| setattr(module, funcname, rv) | ||
| return rv |
16 changes: 8 additions & 8 deletionsgraphblas/core/ss/config.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.