# Copyright 2020 The IREE Authors
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

set(TF_MLIR_HLO_SOURCE_DIR
  "${IREE_SOURCE_DIR}/third_party/mlir-hlo/"
)
set(TF_MLIR_HLO_BINARY_DIR
  "${IREE_BINARY_DIR}/third_party/mlir-hlo/"
)

external_cc_library(
  PACKAGE
    tensorflow
  NAME
    mlir_hlo
  ROOT
    ${TF_MLIR_HLO_SOURCE_DIR}
  DEPS
    MhloDialect
    MhloInferFusibilityOpInterface
    LmhloDialect
    ChloPasses
    MhloToStandard
    MhloPasses
    MhloLhloToLinalg
    MLIRMhloUtils
  INCLUDES
    "${TF_MLIR_HLO_SOURCE_DIR}/"
    "${TF_MLIR_HLO_SOURCE_DIR}/include/"
    "${TF_MLIR_HLO_BINARY_DIR}/"
    "${TF_MLIR_HLO_BINARY_DIR}/include/"
  PUBLIC
)

# Copyright 2020 The IREE Authors
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

set(TF_MLIR_HLO_SOURCE_DIR
  "${IREE_SOURCE_DIR}/third_party/mlir-hlo/"
)
set(TF_MLIR_HLO_BINARY_DIR
  "${IREE_BINARY_DIR}/third_party/mlir-hlo/"
)

external_cc_library(
  PACKAGE
    tensorflow
  NAME
    mlir_hlo
  ROOT
    ${TF_MLIR_HLO_SOURCE_DIR}
  DEPS
    MhloDialect
    MhloInferShapeEqualityOpInterface
    LmhloDialect
    ChloPasses
    MhloToStandard
    MhloPasses
    MhloLhloToLinalg
    MLIRMhloUtils
  INCLUDES
    "${TF_MLIR_HLO_SOURCE_DIR}/"
    "${TF_MLIR_HLO_SOURCE_DIR}/include/"
    "${TF_MLIR_HLO_BINARY_DIR}/"
    "${TF_MLIR_HLO_BINARY_DIR}/include/"
  PUBLIC
)

Fix MHLO build for InferFusibility -> InferShapeEquality rename
Fix MHLO build for InferFusibility -> InferShapeEquality rename

Replace reference to `MhloInferFusibilityOpInterface` with
`MhloInferShapeEqualityOpInterface`. This was changed in
https://github.com/tensorflow/tensorflow/commit/f79bd0770ec7
