-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
Status: Stale 🍞Been open for a while with no activityBeen open for a while with no activityType: New Feature ➕Introduction of a completely new addition to the codebaseIntroduction of a completely new addition to the codebase
Description
In this issue, I will be creating a new tensor type called PromiseTensor. This Issue will be updated to reflect what I intend to build as I am working on it.
This will allow one worker to:
- tell another worker that it will receive a tensor with a certain id in the future.
x = th.tensor([1,2,3,4]).promise() # initialize a promise
x_promise = sy.PromiseTensor() # alternative promise initialization
ptr_to_x_promise = x_promise.send(bob)
- give another worker a list of operations to execute once the tensor arrives.
# send Bob an operation to execute once the promise x is fulfilled - returns promise y
ptr_to_y_promise = ptr_to_x_promise + ptr_to_x_promise
# send Bob an operation to execute once the promise y is fulfilled
ptr_to_z_promise = ptr_to_y_promise + ptr_to_y_promise
- keep the promise at any time
ptr_to_z = x.keep(th.tensor([1,2,3])
z = ptr_to_z.get()
However, while this above example uses a PromiseTensor, the promise architecture should be created as a generic Promise object (not unlike our generic Pointer object).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Status: Stale 🍞Been open for a while with no activityBeen open for a while with no activityType: New Feature ➕Introduction of a completely new addition to the codebaseIntroduction of a completely new addition to the codebase