Created by: liym27
BuildStrategy 报错信息增强[仅涉及c++]
c++不合规报错检查增强
1. 报错内容表述欠缺
- 修改前报错:
trainer_id_ >= 0
- 修改后报错:
InvalidArgumentError: The trainer_id_ of strategy_ must be greater than or equal to 0, But received strategy_.trainer_id_ = -1.
2. 报错内容表述欠缺
- 修改前报错:
trainer_id_ < endpoints_ size
- 修改后报错:
InvalidArgumentError: The trainer_id_ of strategy_ must be less than the size of vector strategy_.trainers_endpoints_, But received strategy_.trainer_id_ = 2, the size of strategy_.trainers_endpoints_ is 2.
3. 未指明错误
- 修改前报错:
Please compile with MKLDNN first to use MKLDNN
- 修改后报错:
PreconditionNotMetError: FLAGS_use_mkldnn has been set to True, but PaddlePaddle is compiled without MKLDNN. Please compile PaddlePaddle with MKLDNN first.
4. 未指明错误
- 修改前报错:
Please compile with NGRAPH first to use NGRAPH
- 修改后报错:
PreconditionNotMetError: FLAGS_use_ngraph has been set to True, but PaddlePaddle is compiled without NGRAPH. Please compile PaddlePaddle with NGRAPH first.