Update third_party/tensorflow/compiler/mlir/tensorflow/utils/... to not depend on the global Dialect Registry (NFC)
PiperOrigin-RevId: 328171679
This commit is contained in:
parent
6434448813
commit
73b5a44f33
|
@ -17,10 +17,13 @@ limitations under the License.
|
||||||
#define MLIR_HLO_DIALECT_MHLO_IR_REGISTER_H_
|
#define MLIR_HLO_DIALECT_MHLO_IR_REGISTER_H_
|
||||||
|
|
||||||
namespace mlir {
|
namespace mlir {
|
||||||
|
class DialectRegistry;
|
||||||
namespace mhlo {
|
namespace mhlo {
|
||||||
|
|
||||||
void registerAllDialects();
|
void registerAllDialects();
|
||||||
|
|
||||||
|
// Add chlo, mhlo, lmhlo dialects to the provided registry.
|
||||||
|
void registerAllMhloDialects(DialectRegistry ®istry);
|
||||||
}
|
}
|
||||||
} // namespace mlir
|
} // namespace mlir
|
||||||
|
|
||||||
|
|
|
@ -31,3 +31,11 @@ void mlir::mhlo::registerAllDialects() {
|
||||||
|
|
||||||
// Dependent dialects
|
// Dependent dialects
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void mlir::mhlo::registerAllMhloDialects(mlir::DialectRegistry ®istry) {
|
||||||
|
// clang-format off
|
||||||
|
registry.insert<mlir::chlo::HloClientDialect,
|
||||||
|
mlir::lmhlo::LmhloDialect,
|
||||||
|
mlir::mhlo::MhloDialect>();
|
||||||
|
// clang-format on
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue