We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c88f1a commit efba1c7Copy full SHA for efba1c7
paddle/fluid/operators/save_load_op_test.cc
@@ -14,6 +14,7 @@ limitations under the License. */
14
15
#include "gtest/gtest.h"
16
#include "paddle/fluid/framework/op_registry.h"
17
+#include "paddle/fluid/platform/float16.h"
18
19
USE_NO_KERNEL_OP(save);
20
USE_NO_KERNEL_OP(load);
@@ -72,7 +73,7 @@ TEST(SaveLoadFP16Op, CPU) {
72
73
74
float* expect = tensor->mutable_data<float>(place);
75
for (int64_t i = 0; i < tensor->numel(); ++i) {
- expect[i] = static_cast<float>(i);
76
+ expect[i] = static_cast<float>(paddle::platform::float16(i));
77
}
78
79
paddle::framework::AttributeMap attrs;
0 commit comments