diff --git a/paddle/fluid/operators/softmax_mask_fuse_upper_triangle_op.cc b/paddle/fluid/operators/fused_softmax_mask_upper_triangle_op.cc similarity index 92% rename from paddle/fluid/operators/softmax_mask_fuse_upper_triangle_op.cc rename to paddle/fluid/operators/fused_softmax_mask_upper_triangle_op.cc index fa5f996f5c1506a68f1cf8464887c6b313f98660..c737ba361e0f2573d46def53d1b566774a4bd90f 100644 --- a/paddle/fluid/operators/softmax_mask_fuse_upper_triangle_op.cc +++ b/paddle/fluid/operators/fused_softmax_mask_upper_triangle_op.cc @@ -10,7 +10,7 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -#include "paddle/fluid/operators/softmax_mask_fuse_upper_triangle_op.h" +#include "paddle/fluid/operators/fused_softmax_mask_upper_triangle_op.h" #include "paddle/fluid/framework/generator.h" #include "paddle/fluid/framework/op_registry.h" namespace paddle { @@ -82,7 +82,7 @@ class SoftmaxMaskFuseUpperTriangleGradOpMaker protected: void Apply(GradOpPtr op) const override { - op->SetType("softmax_mask_fuse_upper_triangle_grad"); + op->SetType("fused_softmax_mask_upper_triangle_grad"); op->SetInput("Softmax", this->Output("Out")); op->SetInput(framework::GradVarName("Out"), this->OutputGrad("Out")); op->SetOutput(framework::GradVarName("X"), this->InputGrad("X")); @@ -94,13 +94,13 @@ class SoftmaxMaskFuseUpperTriangleGradOpMaker namespace ops = paddle::operators; REGISTER_OPERATOR( - softmax_mask_fuse_upper_triangle, ops::SoftmaxMaskFuseUpperTriangleOp, + fused_softmax_mask_upper_triangle, ops::SoftmaxMaskFuseUpperTriangleOp, ops::SoftmaxMaskFuseUpperTriangleOpMaker, ops::SoftmaxMaskFuseUpperTriangleGradOpMaker, ops::SoftmaxMaskFuseUpperTriangleGradOpMaker); -REGISTER_OPERATOR(softmax_mask_fuse_upper_triangle_grad, +REGISTER_OPERATOR(fused_softmax_mask_upper_triangle_grad, ops::SoftmaxMaskFuseUpperTriangleOpGrad); -REGISTER_OP_CPU_KERNEL(softmax_mask_fuse_upper_triangle, +REGISTER_OP_CPU_KERNEL(fused_softmax_mask_upper_triangle, ops::SoftmaxMaskFuseUpperTriangleCPUKernel< paddle::platform::CPUDeviceContext, float>, ops::SoftmaxMaskFuseUpperTriangleCPUKernel< diff --git a/paddle/fluid/operators/softmax_mask_fuse_upper_triangle_op.cu b/paddle/fluid/operators/fused_softmax_mask_upper_triangle_op.cu similarity index 99% rename from paddle/fluid/operators/softmax_mask_fuse_upper_triangle_op.cu rename to paddle/fluid/operators/fused_softmax_mask_upper_triangle_op.cu index 9a1b4332e8b9f39d4ad405cce664208a8b34b4cf..3bebbee1fb7ccb0e465d84a542f214cb59ed54c6 100644 --- a/paddle/fluid/operators/softmax_mask_fuse_upper_triangle_op.cu +++ b/paddle/fluid/operators/fused_softmax_mask_upper_triangle_op.cu @@ -31,7 +31,7 @@ limitations under the License. */ #include "paddle/fluid/framework/generator.h" #include "paddle/fluid/framework/op_registry.h" #include "paddle/fluid/memory/memcpy.h" -#include "paddle/fluid/operators/softmax_mask_fuse_upper_triangle_op.h" +#include "paddle/fluid/operators/fused_softmax_mask_upper_triangle_op.h" #include "paddle/fluid/platform/float16.h" namespace paddle { @@ -534,12 +534,12 @@ class SoftmaxMaskFuseUpperTriangleGradKernel : public framework::OpKernel { namespace ops = paddle::operators; namespace plat = paddle::platform; REGISTER_OP_CUDA_KERNEL( - softmax_mask_fuse_upper_triangle, + fused_softmax_mask_upper_triangle, ops::SoftmaxMaskFuseUpperTriangleKernel, ops::SoftmaxMaskFuseUpperTriangleKernel); REGISTER_OP_CUDA_KERNEL( - softmax_mask_fuse_upper_triangle_grad, + fused_softmax_mask_upper_triangle_grad, ops::SoftmaxMaskFuseUpperTriangleGradKernel, ops::SoftmaxMaskFuseUpperTriangleGradKernel