diff --git a/tensorflow/compiler/mlir/lite/ir/tfl_traits.h b/tensorflow/compiler/mlir/lite/ir/tfl_traits.h index c9174dfdd07..807c1100b71 100644 --- a/tensorflow/compiler/mlir/lite/ir/tfl_traits.h +++ b/tensorflow/compiler/mlir/lite/ir/tfl_traits.h @@ -75,7 +75,7 @@ class FixedResultUniformScale { Builder builder(op->getContext()); IntegerType storage_type = builder.getIntegerType(BitWidth); const double scale = static_cast(ScaleMantissa) * - ::exp10(static_cast(ScaleExp)); + ::pow(10.0, static_cast(ScaleExp)); return UniformQuantizedType::getChecked( Sign, storage_type, result_type.getElementType(), scale, ZeroPoint, StorageTypeMin, StorageTypeMax, builder.getUnknownLoc()); diff --git a/tensorflow/compiler/mlir/tensorflow/translate/mlir_roundtrip_pass.h b/tensorflow/compiler/mlir/tensorflow/translate/mlir_roundtrip_pass.h index 6e8547f3dcd..96a66d4eab3 100644 --- a/tensorflow/compiler/mlir/tensorflow/translate/mlir_roundtrip_pass.h +++ b/tensorflow/compiler/mlir/tensorflow/translate/mlir_roundtrip_pass.h @@ -16,6 +16,7 @@ limitations under the License. #ifndef TENSORFLOW_COMPILER_MLIR_TENSORFLOW_TRANSLATE_MLIR_ROUNDTRIP_PASS_H_ #define TENSORFLOW_COMPILER_MLIR_TENSORFLOW_TRANSLATE_MLIR_ROUNDTRIP_PASS_H_ +#include "mlir/StandardOps/Ops.h" // TF:local_config_mlir #include "tensorflow/core/common_runtime/optimization_registry.h" #include "tensorflow/core/lib/core/status.h"