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
Is there a way to define quantities in local devices and then perform calculations in the host using them multiple times?
To make things clear, an example would be:
I have an array x and some D local devices;
I distribute x to the devices (such as with pmap or maybe using sharding);
I compute some quantity y in each device, also using collective operations;
In the host, I call a function fun(v) which collects y.dot(v) computed on each device, and then sums these results.
This could be done using pmap, but I'd need to use fun(v) many times while keeping the ys unchanged, what would be the best way to do this? Hopefully this is clear enough. Thank you in advance.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is there a way to define quantities in local devices and then perform calculations in the host using them multiple times?
To make things clear, an example would be:
x
and someD
local devices;x
to the devices (such as withpmap
or maybe using sharding);y
in each device, also using collective operations;fun(v)
which collectsy.dot(v)
computed on each device, and then sums these results.This could be done using
pmap
, but I'd need to usefun(v)
many times while keeping they
s unchanged, what would be the best way to do this? Hopefully this is clear enough. Thank you in advance.Beta Was this translation helpful? Give feedback.
All reactions