Add prefetch method to PaddleAPI's GradientMachine.
Created by: reyoung
There is not prefetch
method in class GradientMachine defined in PaddleAPI.h However, we need to add this method, which related to #364 (closed). In particular, we need to use it with sparse_udpate and sparse_remote_update.
When used with sparse update
, prefetch
is supposed to be invoked before forward
/backward
. sparse_update
through SWIG cannot be performed without prefetch
.
Also prefetch
should be added to the monkey patch method forwardTest
when sparse update
is enabled.
The whole architecture of multi-language support is described by issue #258 (closed) .