提交 1c70600d 编写于 作者: A Abhinav Arora

Fix compile error

上级 c08752ca
...@@ -242,7 +242,9 @@ TEST(TensorContainsNAN, CPU) { ...@@ -242,7 +242,9 @@ TEST(TensorContainsNAN, CPU) {
{ {
paddle::framework::Tensor src; paddle::framework::Tensor src;
float16* buf = src.mutable_data<float16>({3}, paddle::platform::CPUPlace()); paddle::platform::float16* buf =
src.mutable_data<paddle::platform::float16>(
{3}, paddle::platform::CPUPlace());
buf[0] = 0.0; buf[0] = 0.0;
buf[1].x = 0x7fff; buf[1].x = 0x7fff;
buf[2] = 0.0; buf[2] = 0.0;
...@@ -266,7 +268,9 @@ TEST(TensorContainsInf, CPU) { ...@@ -266,7 +268,9 @@ TEST(TensorContainsInf, CPU) {
{ {
paddle::framework::Tensor src; paddle::framework::Tensor src;
float16* buf = src.mutable_data<float16>({3}, paddle::platform::CPUPlace()); paddle::platform::float16* buf =
src.mutable_data<paddle::platform::float16>(
{3}, paddle::platform::CPUPlace());
buf[0] = 1.0; buf[0] = 1.0;
buf[1].x = 0x7c00; buf[1].x = 0x7c00;
buf[2] = 0.0; buf[2] = 0.0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册