File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
python/paddle/fluid/tests/unittests/mkldnn Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -87,8 +87,8 @@ class CastOp : public framework::OperatorWithKernel {
8787 int out_dtype = ctx.Attr <int >(" out_dtype" );
8888
8989 auto MKLDNNSupportsCast = [&]() -> bool {
90- int dtype_fp32 = ( int ) framework::proto::VarType::FP32;
91- int dtype_bf16 = ( int ) framework::proto::VarType::BF16;
90+ int dtype_fp32 = static_cast < int >( framework::proto::VarType::FP32) ;
91+ int dtype_bf16 = static_cast < int >( framework::proto::VarType::BF16) ;
9292
9393 if ((in_dtype != dtype_fp32 && in_dtype != dtype_bf16) or
9494 (out_dtype != dtype_fp32 && out_dtype != dtype_bf16))
Original file line number Diff line number Diff line change 1414
1515from __future__ import print_function
1616
17- from paddle .fluid .tests .unittests .op_test import OpTest , convert_float_to_uint16 , convert_uint16_to_float
1817import unittest
1918import numpy as np
2019
2120import paddle
2221import paddle .fluid .core as core
2322import paddle .fluid as fluid
2423from paddle .fluid import compiler , Program , program_guard
24+ from paddle .fluid .tests .unittests .op_test import OpTest , convert_float_to_uint16
2525
2626
2727@unittest .skipIf (not core .supports_bfloat16 (),
You can’t perform that action at this time.
0 commit comments