提交 11ee50ce 编写于 作者: T typhoonzero

update

上级 6308ccc2
......@@ -14,7 +14,6 @@ limitations under the License. */
#include <thrust/execution_policy.h>
#include <thrust/reduce.h>
#include <iostream>
#include "paddle/operators/accuracy_op.h"
#include "paddle/platform/cuda_helper.h"
......@@ -66,8 +65,7 @@ class AccuracyOpCUDAKernel : public framework::OpKernel<T> {
size_t num_samples = inference->dims()[0];
size_t infer_width = inference->dims()[1];
cudaError_t e = cudaMemset(accuracy_data, 0, sizeof(float));
PADDLE_ENFORCE_EQ(0, e, "cudaMemset error");
PADDLE_ENFORCE(cudaMemset(accuracy_data, 0, sizeof(float)));
if (num_samples == 0) {
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册