You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Array APIImplementation of standardized Array API to conform to Pandas and NumPy. This is a separate API.ChapelNeeds attention from a member of the Chapel teamenhancementNew feature or request
xp.diff is pretty slow in Arkouda. It uses no parallelism for the 1st order difference and that makes it really slow for distributed arrays.
Also it is written in a way that adds a lot of overhead for 1D arrays and should probably be optimized for that case.
// 1st order difference: requires no temporary storage
var y = makeDistArray(outDom, t);
Here we pass the domain we get from subDomain which returns a DefaultRectangular domain to makeDistArray and we hit the bug where makeDistArray does not really make a distributed array: #4233
Without digging too deep, that subDomain call there also looks a bit less than ideal to me. Why does it take .shape of an array/domain and not simply a domain? The "shape" of a domain does not have any distribution info, whereas I would expect a call named subDomain to generate a subdomain with the same distribution such that it is aligned with its parent domain.
This is definitely not to say that what makeDistArray does is right, though.
a call named subDomain to generate a subdomain with the same distribution such that it is aligned with its parent domain.
I agree that the subDomain would have the same distribution, but I'm not sure if it should be aligned with the parent domain in Arkouda since Arkouda may expect arrays of a certain size to all have the same distribution for good performance. That can be hurt by this. Brad had similar thoughts where aligning the domains would lead to good performance in this function, but problems in subsequent operations. I am open to changing my mind on this, but it would require a good amount of bookkeeping/structural setup to manage this cleanly.
Array APIImplementation of standardized Array API to conform to Pandas and NumPy. This is a separate API.ChapelNeeds attention from a member of the Chapel teamenhancementNew feature or request
Activity
ShreyasKhandekar commentedon Apr 10, 2025
This is due to the following lines of code:
arkouda/src/UtilMsg.chpl
Lines 56 to 59 in 0a7850b
Here we pass the domain we get from
subDomainwhich returns a DefaultRectangular domain tomakeDistArrayand we hit the bug wheremakeDistArraydoes not really make a distributed array: #4233e-kayrakli commentedon Apr 11, 2025
Without digging too deep, that
subDomaincall there also looks a bit less than ideal to me. Why does it take.shapeof an array/domain and not simply a domain? The "shape" of a domain does not have any distribution info, whereas I would expect a call namedsubDomainto generate a subdomain with the same distribution such that it is aligned with its parent domain.This is definitely not to say that what
makeDistArraydoes is right, though.ShreyasKhandekar commentedon Apr 11, 2025
I agree that the subDomain would have the same distribution, but I'm not sure if it should be aligned with the parent domain in Arkouda since Arkouda may expect arrays of a certain size to all have the same distribution for good performance. That can be hurt by this. Brad had similar thoughts where aligning the domains would lead to good performance in this function, but problems in subsequent operations. I am open to changing my mind on this, but it would require a good amount of bookkeeping/structural setup to manage this cleanly.
e-kayrakli commentedon Apr 11, 2025
That's a good point.
ShreyasKhandekar commentedon Apr 17, 2025
Resolved by #4242
e-kayrakli commentedon May 9, 2025
@ShreyasKhandekar should we close this?
ShreyasKhandekar commentedon May 9, 2025
Yes, thanks! I thought it would auto-close once the PR was merged.