未验证 提交 2236286c 编写于 作者: H HongyuJia 提交者: GitHub

[DDim Decouple enforce.h] Change enforce.h->exception.h (#52492)

上级 5f6376b7
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "paddle/phi/core/enforce.h" #include "paddle/phi/api/ext/exception.h"
#include "paddle/phi/core/utils/dim.h" #include "paddle/phi/core/utils/dim.h"
namespace phi { namespace phi {
...@@ -42,10 +42,12 @@ namespace phi { ...@@ -42,10 +42,12 @@ namespace phi {
PADDLE_VISIT_DDIM_BASE(8, callback); \ PADDLE_VISIT_DDIM_BASE(8, callback); \
PADDLE_VISIT_DDIM_BASE(9, callback); \ PADDLE_VISIT_DDIM_BASE(9, callback); \
default: \ default: \
PADDLE_THROW(phi::errors::Unimplemented( \ PD_THROW( \
"Invalid dimension to be accessed. Now only supports access to " \ "Unimplemented error. Invalid dimension to be accessed. Now only " \
"dimension 0 to 9, but received dimension is %d.", \ "supports access to " \
rank)); \ "dimension 0 to 9, but received dimension is ", \
rank, \
"."); \
} }
template <typename T1, typename T2> template <typename T1, typename T2>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册