Skip to content

Commit

Permalink
add op_version
Browse files Browse the repository at this point in the history
  • Loading branch information
HexToString committed Jan 5, 2022
1 parent c688b5a commit 562f897
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions paddle/fluid/operators/expand_as_v2_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ See the License for the specific language governing permissions and
limitations under the License. */

#include "paddle/fluid/operators/expand_as_v2_op.h"
#include "paddle/fluid/framework/op_version_registry.h"
#include <memory>
#include <vector>

Expand Down Expand Up @@ -148,3 +149,9 @@ REGISTER_OP_CUDA_KERNEL(
ops::ExpandAsV2GradKernel<paddle::platform::CUDADeviceContext, float>,
ops::ExpandAsV2GradKernel<paddle::platform::CUDADeviceContext, double>);
#endif

REGISTER_OP_VERSION(expand_as_v2)
.AddCheckpoint(
R"ROC(fix expand_as_v2 and add new input [Y])ROC",
paddle::framework::compatible::OpVersionDesc()
.NewInput("Y", "Expand X according to the shape of Y"));

0 comments on commit 562f897

Please sign in to comment.