def remote_get(self): """Assuming .child is a PointerTensor, this method calls .get() on the tensor that the .child is pointing to (which should also be a PointerTensor) TODO: make this kind of message forwarding generic? """ if not self.has_child(): raise InvalidTensorForRemoteGet(self) self.child.remote_get() return self
def remote_get(self): """Assuming .child is a PointerTensor, this method calls .get() on the tensor that the .child is pointing to (which should also be a PointerTensor) TODO: make this kind of message forwarding generic? """ if not hasattr(self, "child"): raise InvalidTensorForRemoteGet(self) location = self.child.location self.owner.send_command(message=("mid_get", self.child, (), {}), recipient=location) return self
def mid_get(self): """This method calls .get() on a child pointer and correctly registers the results""" if not self.has_child(): raise InvalidTensorForRemoteGet(self) self.child.mid_get()