Closed traktofon closed 6 years ago
Thanks. I might try to continue from here. CuArrays
has a switch to turn off scalar indexing which is very useful for testing to make sure that we don't hit the generic fallbacks and I plan to add something similar here. It should make it easier to fix the mapreduce
code.
I think I've now managed to fix all the cases that hit the slow fallbacks and are covered by tests. The tests now set DistributedArrays.allowscalar(false)
except for a few places and will therefore error if a generic fallback is used.
This change makes DistributedArrays work on julia 0.7, but compatibility with 0.6 is lost. All tests pass without deprecation warnings.
There are many minor syntax/library changes, and the following major changes:
broadcast
implementation has been rewritten. The basic strategy is to rewrite theBroadcasted
object into its equivalent for the localparts. This will probably only work if all involved arrays are distributed in a "compatible" way. More work is needed to make it fully general.localindexes
renamed tolocalindices
, reflecting the current convention in Julia.deepcopy(::DArray)
added.importall Base
was removed.Note that there seems to be an obscure issue in Julia which one currently has to work around by calling
using DistributedArrays
on the master process before calling@everywhere using DistributedArrays
.Calls to
reduce
andmapreduce
with thedims
keyword (which replace thereducedim
andmapreducedim
functions) are currently slow and I guess some part is falling back to methods forAbstractArray
. There is related code insrc/darray.jl
which is still getting called, but I haven't managed to figure out the call path from theBase
method.