First, I'm sorry for not taking a closer look at the 8.0 draft releases (but you can see I started to back in late March). I thought there would be beta releases to more closely review and try.
Anyway, removing nthreads and chunks from the descriptor and adding them to context is a backwards-incompatible change that I would expect to be given a heads-up about (the stability of SuiteSparse:GraphBLAS has spoiled us!). We can more-or-less handle this in python-graphblas, but it's awkward to keep our current syntax which we like. For example, we can do A.reduce_scalar().new(nthreads=8) and C(nthreads=4) << A @ B. This syntax can easily support options that other implementations may have, and continues to support SuiteSparse-specific descriptors. Now, the most natural way to spell this in Python is:
with Context(nthreads=8):
C << A @ B
which is fine and we will also support this, but I don't like forcing this verbose (it requires multiple lines) syntax when we already have a perfectly nice and concise syntax. This is also (currently) very SuiteSparse:GraphbLAS-specific, so it will be more difficult to handle multiple implementations in Python. (We'll see what happens with Context in the C API).
So, how terrible would it be to support nthreads and chunks in the descriptor again, which would take priority over the engaged context?
Side note: I also find it awkward that contexts aren't stacked (if I understand correctly), such as:
with Context(nthreads=8) as c1:
# nthreads is 8
....
with Context(nthreads=4) as c2:
# nthreads is 4
....
# Now nthreads is from the global context, but c1 (nthreads=8) would be more natural
...
First, I'm sorry for not taking a closer look at the 8.0 draft releases (but you can see I started to back in late March). I thought there would be beta releases to more closely review and try.
Anyway, removing nthreads and chunks from the descriptor and adding them to context is a backwards-incompatible change that I would expect to be given a heads-up about (the stability of SuiteSparse:GraphBLAS has spoiled us!). We can more-or-less handle this in
python-graphblas, but it's awkward to keep our current syntax which we like. For example, we can doA.reduce_scalar().new(nthreads=8)andC(nthreads=4) << A @ B. This syntax can easily support options that other implementations may have, and continues to support SuiteSparse-specific descriptors. Now, the most natural way to spell this in Python is:which is fine and we will also support this, but I don't like forcing this verbose (it requires multiple lines) syntax when we already have a perfectly nice and concise syntax. This is also (currently) very SuiteSparse:GraphbLAS-specific, so it will be more difficult to handle multiple implementations in Python. (We'll see what happens with Context in the C API).
So, how terrible would it be to support
nthreadsandchunksin the descriptor again, which would take priority over the engaged context?Side note: I also find it awkward that contexts aren't stacked (if I understand correctly), such as: