提交 c08752ca 编写于 作者: A Abhinav Arora

Fix compile error

上级 feaf168d
...@@ -57,7 +57,8 @@ TEST(TensorContainsNAN, GPU) { ...@@ -57,7 +57,8 @@ TEST(TensorContainsNAN, GPU) {
} }
{ {
Tensor tensor; Tensor tensor;
float16* buf = tensor.mutable_data<paddle::platform::float16>({3}, gpu); paddle::platform::float16* buf =
tensor.mutable_data<paddle::platform::float16>({3}, gpu);
FillNAN<<<1, 1, 0, cuda_ctx->stream()>>>(buf); FillNAN<<<1, 1, 0, cuda_ctx->stream()>>>(buf);
cuda_ctx->Wait(); cuda_ctx->Wait();
ASSERT_TRUE(TensorContainsNAN(tensor)); ASSERT_TRUE(TensorContainsNAN(tensor));
...@@ -77,7 +78,8 @@ TEST(TensorContainsInf, GPU) { ...@@ -77,7 +78,8 @@ TEST(TensorContainsInf, GPU) {
} }
{ {
Tensor tensor; Tensor tensor;
float16* buf = tensor.mutable_data<paddle::platform::float16>({3}, gpu); paddle::platform::float16* buf =
tensor.mutable_data<paddle::platform::float16>({3}, gpu);
FillInf<<<1, 1, 0, cuda_ctx->stream()>>>(buf); FillInf<<<1, 1, 0, cuda_ctx->stream()>>>(buf);
cuda_ctx->Wait(); cuda_ctx->Wait();
ASSERT_TRUE(TensorContainsInf(tensor)); ASSERT_TRUE(TensorContainsInf(tensor));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册