diff --git a/paddle/phi/kernels/cpu/embedding_grad_kernel.cc b/paddle/phi/kernels/cpu/embedding_grad_kernel.cc index 8402931ed89d26588fa8f95597a2bb52ddb13ba6..21b3e6da8d9efdac1e5866ef3ac1aac580d5a0b8 100644 --- a/paddle/phi/kernels/cpu/embedding_grad_kernel.cc +++ b/paddle/phi/kernels/cpu/embedding_grad_kernel.cc @@ -115,7 +115,8 @@ void EmbeddingGradKernel(const Context& ctx, } else if (input.dtype() == phi::DataType::INT64) { functor.template apply(); } else { - PADDLE_THROW("emebdding input only support int32 and int64"); + PADDLE_THROW(phi::errors::Unimplemented( + "emebdding input only support int32 and int64")); } } @@ -195,7 +196,8 @@ void EmbeddingSparseGradKernel(const Context& ctx, } else if (input.dtype() == phi::DataType::INT64) { functor.template apply(); } else { - PADDLE_THROW("emebdding input only support int32 and int64"); + PADDLE_THROW(phi::errors::Unimplemented( + "emebdding input only support int32 and int64")); } } diff --git a/paddle/phi/kernels/cpu/embedding_kernel.cc b/paddle/phi/kernels/cpu/embedding_kernel.cc index 2973f426aa5ef24ced571a14906f5765a01b361c..76cc3814b0567087ef8e5d40fe4031ed6598a49b 100644 --- a/paddle/phi/kernels/cpu/embedding_kernel.cc +++ b/paddle/phi/kernels/cpu/embedding_kernel.cc @@ -98,7 +98,8 @@ void EmbeddingKernel(const Context& ctx, } else if (input.dtype() == phi::DataType::INT64) { functor.template apply(); } else { - PADDLE_THROW("emebdding input only support int32 and int64"); + PADDLE_THROW(phi::errors::Unimplemented( + "emebdding input only support int32 and int64")); } } diff --git a/paddle/phi/kernels/cpu/sparse_weight_embedding_grad_kernel.cc b/paddle/phi/kernels/cpu/sparse_weight_embedding_grad_kernel.cc index 4846f209660bab20cfa66b91a5b4ae56342f372b..d78477073ad03b1b39aaae00c16aed81ea7fd056 100644 --- a/paddle/phi/kernels/cpu/sparse_weight_embedding_grad_kernel.cc +++ b/paddle/phi/kernels/cpu/sparse_weight_embedding_grad_kernel.cc @@ -180,7 +180,8 @@ void SparseWeightEmbeddingGradKernel(const Context& ctx, } else if (input.dtype() == phi::DataType::INT64) { functor.template apply(); } else { - PADDLE_THROW("emebdding input only support int32 and int64"); + PADDLE_THROW(phi::errors::Unimplemented( + "emebdding input only support int32 and int64")); } } @@ -199,7 +200,8 @@ void SparseWeightEmbeddingSparseGradKernel(const Context& ctx, } else if (input.dtype() == phi::DataType::INT64) { functor.template apply(); } else { - PADDLE_THROW("emebdding input only support int32 and int64"); + PADDLE_THROW(phi::errors::Unimplemented( + "emebdding input only support int32 and int64")); } } diff --git a/paddle/phi/kernels/cpu/sparse_weight_embedding_kernel.cc b/paddle/phi/kernels/cpu/sparse_weight_embedding_kernel.cc index fb29feee24ad5b6328070f8b20991610e37d412d..c0f95d03888b8df825341c282e08f80dafc988a8 100644 --- a/paddle/phi/kernels/cpu/sparse_weight_embedding_kernel.cc +++ b/paddle/phi/kernels/cpu/sparse_weight_embedding_kernel.cc @@ -102,7 +102,8 @@ void SparseWeightEmbeddingKernel(const Context& ctx, } else if (input.dtype() == phi::DataType::INT64) { functor.template apply(); } else { - PADDLE_THROW("emebdding input only support int32 and int64"); + PADDLE_THROW(phi::errors::Unimplemented( + "emebdding input only support int32 and int64")); } } diff --git a/paddle/phi/kernels/gpu/embedding_grad_kernel.cu b/paddle/phi/kernels/gpu/embedding_grad_kernel.cu index def7988ba519950c64753b58676870d54bc792cd..a970348760c18e2c67e9c7b366cdc2f5e18e3abd 100644 --- a/paddle/phi/kernels/gpu/embedding_grad_kernel.cu +++ b/paddle/phi/kernels/gpu/embedding_grad_kernel.cu @@ -131,7 +131,8 @@ void EmbeddingGradKernel(const Context& ctx, } else if (input.dtype() == phi::DataType::INT64) { functor.template apply(); } else { - PADDLE_THROW("emebdding input only support int32 and int64"); + PADDLE_THROW(phi::errors::Unimplemented( + "emebdding input only support int32 and int64")); } } @@ -233,7 +234,8 @@ void EmbeddingSparseGradKernel(const Context& ctx, } else if (input.dtype() == phi::DataType::INT64) { functor.template apply(); } else { - PADDLE_THROW("emebdding input only support int32 and int64"); + PADDLE_THROW(phi::errors::Unimplemented( + "emebdding input only support int32 and int64")); } } diff --git a/paddle/phi/kernels/gpu/embedding_kernel.cu b/paddle/phi/kernels/gpu/embedding_kernel.cu index 4d349c6ab5cc3806ba97e076a81329277e6a3cdc..7f3a31ba544d88534d8a606fba53e017a155023c 100644 --- a/paddle/phi/kernels/gpu/embedding_kernel.cu +++ b/paddle/phi/kernels/gpu/embedding_kernel.cu @@ -110,7 +110,8 @@ void EmbeddingKernel(const Context &ctx, } else if (input.dtype() == phi::DataType::INT64) { functor.template apply(); } else { - PADDLE_THROW("emebdding input only support int32 and int64"); + PADDLE_THROW(phi::errors::Unimplemented( + "emebdding input only support int32 and int64")); } }