make mlir related stuff build on macos

1. exp10() is not a standard C function, macos has __exp10()
2. include "mlir/StandardOps/Ops.h" earlier to avoid TRUE and
   FALSE being defined in <mach/boolean.h>
This commit is contained in:
Koan-Sin Tan 2019-06-29 11:20:17 +08:00
parent 604988b5d4
commit 9d2e777314
5 changed files with 9 additions and 0 deletions

View File

@ -22,6 +22,11 @@ limitations under the License.
#include "mlir/Support/LLVM.h" // TF:local_config_mlir #include "mlir/Support/LLVM.h" // TF:local_config_mlir
#include "tensorflow/compiler/mlir/lite/utils/quantization_utils.h" #include "tensorflow/compiler/mlir/lite/utils/quantization_utils.h"
// exp10() is not a standard function
#if defined(__APPLE__)
#define exp10(x) __exp10(x)
#endif
namespace mlir { namespace mlir {
namespace OpTrait { namespace OpTrait {
namespace TFL { namespace TFL {

View File

@ -20,6 +20,7 @@ limitations under the License.
#include "mlir/IR/MLIRContext.h" // TF:local_config_mlir #include "mlir/IR/MLIRContext.h" // TF:local_config_mlir
#include "mlir/IR/Module.h" // TF:local_config_mlir #include "mlir/IR/Module.h" // TF:local_config_mlir
#include "mlir/IR/Operation.h" // TF:local_config_mlir #include "mlir/IR/Operation.h" // TF:local_config_mlir
#include "mlir/StandardOps/Ops.h" // TF:local_config_mlir
#include "tensorflow/compiler/mlir/tensorflow/translate/mlir_roundtrip_flags.h" #include "tensorflow/compiler/mlir/tensorflow/translate/mlir_roundtrip_flags.h"
#include "tensorflow/core/framework/function.h" #include "tensorflow/core/framework/function.h"
#include "tensorflow/core/framework/graph.pb.h" #include "tensorflow/core/framework/graph.pb.h"

View File

@ -18,6 +18,7 @@ limitations under the License.
#include "mlir/IR/MLIRContext.h" // TF:local_config_mlir #include "mlir/IR/MLIRContext.h" // TF:local_config_mlir
#include "mlir/IR/Module.h" // TF:local_config_mlir #include "mlir/IR/Module.h" // TF:local_config_mlir
#include "mlir/StandardOps/Ops.h" // TF:local_config_mlir
#include "tensorflow/compiler/mlir/tensorflow/translate/mlir_roundtrip_flags.h" #include "tensorflow/compiler/mlir/tensorflow/translate/mlir_roundtrip_flags.h"
#include "tensorflow/core/framework/function.h" #include "tensorflow/core/framework/function.h"
#include "tensorflow/core/framework/graph.pb.h" #include "tensorflow/core/framework/graph.pb.h"

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"

View File

@ -27,6 +27,7 @@ limitations under the License.
#include "mlir/IR/Location.h" // TF:local_config_mlir #include "mlir/IR/Location.h" // TF:local_config_mlir
#include "mlir/IR/Operation.h" // TF:local_config_mlir #include "mlir/IR/Operation.h" // TF:local_config_mlir
#include "mlir/IR/Types.h" // TF:local_config_mlir #include "mlir/IR/Types.h" // TF:local_config_mlir
#include "mlir/StandardOps/Ops.h" // TF:local_config_mlir
#include "tensorflow/core/framework/attr_value.pb.h" #include "tensorflow/core/framework/attr_value.pb.h"
#include "tensorflow/core/framework/function.h" #include "tensorflow/core/framework/function.h"
#include "tensorflow/core/framework/node_def.pb.h" #include "tensorflow/core/framework/node_def.pb.h"