Merge pull request #30243 from freedomtan:make_mlir_build_on_macos

PiperOrigin-RevId: 257193796
This commit is contained in:
TensorFlower Gardener 2019-07-09 08:11:05 -07:00
commit f425b028ad
2 changed files with 2 additions and 1 deletions

View File

@ -75,7 +75,7 @@ class FixedResultUniformScale {
Builder builder(op->getContext()); Builder builder(op->getContext());
IntegerType storage_type = builder.getIntegerType(BitWidth); IntegerType storage_type = builder.getIntegerType(BitWidth);
const double scale = static_cast<double>(ScaleMantissa) * const double scale = static_cast<double>(ScaleMantissa) *
::exp10(static_cast<double>(ScaleExp)); ::pow(10.0, static_cast<double>(ScaleExp));
return UniformQuantizedType::getChecked( return UniformQuantizedType::getChecked(
Sign, storage_type, result_type.getElementType(), scale, ZeroPoint, Sign, storage_type, result_type.getElementType(), scale, ZeroPoint,
StorageTypeMin, StorageTypeMax, builder.getUnknownLoc()); StorageTypeMin, StorageTypeMax, builder.getUnknownLoc());

View File

@ -16,6 +16,7 @@ limitations under the License.
#ifndef TENSORFLOW_COMPILER_MLIR_TENSORFLOW_TRANSLATE_MLIR_ROUNDTRIP_PASS_H_ #ifndef TENSORFLOW_COMPILER_MLIR_TENSORFLOW_TRANSLATE_MLIR_ROUNDTRIP_PASS_H_
#define 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/common_runtime/optimization_registry.h"
#include "tensorflow/core/lib/core/status.h" #include "tensorflow/core/lib/core/status.h"