提交 a5c74677 编写于 作者: X xiebaiyuan 提交者: GitHub

Merge pull request #1263 from xiebaiyuan/develop

enforce use gpu when gpu is on in CmakeList.  resloved #1262
......@@ -37,7 +37,13 @@ class PaddleMobile {
typedef typename PrecisionTrait<P>::ptype Ptype;
public:
PaddleMobile() {}
PaddleMobile() {
#ifndef PADDLE_MOBILE_CL
bool is_gpu = std::is_same<DeviceType<kGPU_CL>, Dtype>::value;
PADDLE_MOBILE_ENFORCE(!is_gpu,
"Not Enable GPU in CmakeList but run gpu codes ");
#endif
}
bool Load(const std::string &dirname, bool optimize = false,
bool quantification = false, int batch_size = 1,
bool loddable = false);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册