Skip to content

Commit

Permalink
[phi]migrate increment addmm multinomial cholesky kernels to phi (#39858
Browse files Browse the repository at this point in the history
)

* migrate increment addmm multinomial cholesky kernels to phi

* test pr39869

* test pr39869

* fix style and ci
  • Loading branch information
Aganlengzi authored Feb 24, 2022
1 parent 127440c commit b695fd9
Show file tree
Hide file tree
Showing 34 changed files with 1,649 additions and 1,151 deletions.
12 changes: 3 additions & 9 deletions paddle/fluid/operators/addmm_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,20 @@ 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/addmm_op.h"
#include <memory>
#include <string>
#include <unordered_map>
#include <vector>
#include "paddle/fluid/framework/op_registry.h"
#ifdef PADDLE_WITH_MKLDNN
#include "paddle/fluid/platform/mkldnn_helper.h"
#endif

namespace paddle {
namespace operators {

constexpr int kMULMKLDNNINT8 = 1;

using framework::OpKernelType;
using framework::Tensor;

Expand Down Expand Up @@ -227,11 +229,3 @@ REGISTER_OPERATOR(addmm, ops::AddMMOp, ops::AddMMOpMaker,
ops::AddMMOpGradMaker<paddle::imperative::OpBase>);

REGISTER_OPERATOR(addmm_grad, ops::AddMMGradOp);

REGISTER_OP_CPU_KERNEL(
addmm, ops::AddMMKernel<paddle::platform::CPUDeviceContext, float>,
ops::AddMMKernel<paddle::platform::CPUDeviceContext, double>);

REGISTER_OP_CPU_KERNEL(
addmm_grad, ops::AddMMGradKernel<paddle::platform::CPUDeviceContext, float>,
ops::AddMMGradKernel<paddle::platform::CPUDeviceContext, double>);
195 changes: 0 additions & 195 deletions paddle/fluid/operators/addmm_op.h

This file was deleted.

10 changes: 1 addition & 9 deletions paddle/fluid/operators/cholesky_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ 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/cholesky_op.h"
#include "paddle/fluid/framework/op_registry.h"

namespace paddle {
namespace operators {
Expand Down Expand Up @@ -111,11 +111,3 @@ REGISTER_OPERATOR(cholesky, ops::CholeskyOp, ops::CholeskyOpMaker,
ops::CholeskyGradOpMaker<paddle::framework::OpDesc>,
ops::CholeskyGradOpMaker<paddle::imperative::OpBase>);
REGISTER_OPERATOR(cholesky_grad, ops::CholeskyGradOp);

REGISTER_OP_CPU_KERNEL(cholesky, ops::CholeskyCPUKernel<float>,
ops::CholeskyCPUKernel<double>);

REGISTER_OP_CPU_KERNEL(
cholesky_grad,
ops::CholeskyGradKernel<paddle::platform::CPUDeviceContext, float>,
ops::CholeskyGradKernel<paddle::platform::CPUDeviceContext, double>);
Loading

0 comments on commit b695fd9

Please sign in to comment.