We need an OP to scatter a tensor according to another LoD tensor
Current Fluid has only one scattering-related OP, which scatters an update tensor to an input tensor, according to a 1-D index tensor. See http://www.paddlepaddle.org/docs/0.14.0/api/fluid/en/layers.html#permalink-137-scatter for details.
However if the index tensor is a 1-D LoD tensor, we must scatter the update tensor to multiple rows of the input tensor, according to the LoD information. This is useful for calculating the union distribution from two distributions in models such as point-generators.
Further, scattering-related OPs (and its inverse Op gathering) are atomic OPs, which could be widely used. In frameworks like TensorFlow, developers usually has a whole set of scatter-related ops to use (https://www.tensorflow.org/versions/r1.8/api_docs/python/tf/scatter_nd , and many others). I think we should also provide a more comprehensive set of atomic ops in the future.