Skip to content

Commit

Permalink
[xla:cpu] NFC: Remove deprecated XLA:CPU mlir based codegen part #1
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 629795760
  • Loading branch information
ezhulenev authored and tensorflower-gardener committed May 1, 2024
1 parent b4987cd commit fafd046
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 858 deletions.
2 changes: 0 additions & 2 deletions tensorflow/compiler/mlir/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ cc_library(
"@local_xla//xla/mlir/framework/ir:xla_framework",
"@local_xla//xla/mlir/framework/transforms:passes",
"@local_xla//xla/mlir_hlo:all_passes",
"@local_xla//xla/service/cpu:hlo_xla_runtime_pipeline",
],
)

Expand Down Expand Up @@ -205,7 +204,6 @@ cc_library(
"@llvm-project//mlir:Transforms",
"@local_xla//xla/mlir/framework/ir:xla_framework",
"@local_xla//xla/mlir_hlo:hlo_dialect_registration",
"@local_xla//xla/service/cpu:hlo_xla_runtime_pipeline",
"@stablehlo//:register",
],
)
Expand Down
2 changes: 0 additions & 2 deletions tensorflow/compiler/mlir/register_common_dialects.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ limitations under the License.
#include "tensorflow/compiler/mlir/tools/kernel_gen/ir/tf_framework_ops.h"
#include "xla/mlir/framework/ir/xla_framework.h"
#include "xla/mlir_hlo/mhlo/IR/register.h"
#include "xla/service/cpu/hlo_xla_runtime_pipeline.h"

namespace mlir {

Expand All @@ -38,7 +37,6 @@ void RegisterCommonToolingDialects(mlir::DialectRegistry& registry) {
mlir::registerAllDialects(registry);
mlir::registerAllExtensions(registry);
mlir::stablehlo::registerAllDialects(registry);
xla::cpu::RegisterHloXlaRuntimePipelineDialects(registry);

registry.insert<mlir::TFL::TensorFlowLiteDialect>();
registry.insert<mlir::kernel_gen::tf_framework::TFFrameworkDialect>();
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion tensorflow/compiler/mlir/tf_mlir_opt_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ limitations under the License.
#include "xla/mlir/framework/transforms/passes.h"
#include "xla/mlir_hlo/lhlo/transforms/passes.h"
#include "xla/mlir_hlo/mhlo/transforms/passes.h"
#include "xla/service/cpu/hlo_xla_runtime_pipeline.h"

int main(int argc, char **argv) {
tensorflow::InitMlir y(&argc, &argv);
Expand Down
1 change: 0 additions & 1 deletion third_party/xla/xla/mlir/runtime/transforms/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ cc_library(
":compilation_pipeline_options",
":compiler",
":passes",
"//xla/mlir/backends/cpu/transforms:passes",
"//xla/mlir/memref/transforms:passes",
"//xla/mlir/runtime/ir:rt",
"//xla/mlir_hlo:transforms_passes",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ limitations under the License.
#include "mlir/Target/LLVMIR/Dialect/X86Vector/X86VectorToLLVMIRTranslation.h" // from @llvm-project
#endif
#include "mlir/Transforms/Passes.h" // from @llvm-project
#include "xla/mlir/backends/cpu/transforms/passes.h"
#include "xla/mlir/memref/transforms/passes.h"
#include "xla/mlir/runtime/ir/rt_dialect.h"
#include "xla/mlir/runtime/transforms/compilation_pipeline_options.h"
Expand Down Expand Up @@ -106,7 +105,6 @@ static void CreateXlaCpuCompilationPipeline(mlir::OpPassManager& pm,

// Convert entry function to the XLA entrypoint.
pm.addPass(CreateExportRuntimeFunctionsPass());
pm.addPass(cpu::createConvertXlaCpuToCpuRuntimePass());
pm.addPass(CreateConvertCustomCallsPass());
pm.addPass(CreateConvertAssertsPass());

Expand Down
51 changes: 0 additions & 51 deletions third_party/xla/xla/service/cpu/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ cc_library(
":cpu_options",
":dot_op_emitter",
":executable_proto_cc",
":hlo_xla_runtime_pipeline",
":ir_emission_utils",
":ir_emitter",
":onednn_matmul_rewriter",
Expand Down Expand Up @@ -469,56 +468,6 @@ cc_library(
deps = [":xla_framework_proto_cc"],
)

cc_library(
name = "hlo_xla_runtime_pipeline",
srcs = ["hlo_xla_runtime_pipeline.cc"],
hdrs = ["hlo_xla_runtime_pipeline.h"],
local_defines = select({
":experimental_mlir_gpu_enabled": ["EXPERIMENTAL_MLIR_GPU=1"],
"//conditions:default": [],
}),
deps = [
"//xla:status",
"//xla/mlir/backends/cpu/transforms:passes",
"//xla/mlir/runtime/transforms:compiler",
"//xla/mlir_hlo:all_passes",
"//xla/mlir_hlo:mhlo_passes",
"//xla/mlir_hlo:transforms_passes",
"//xla/runtime:compiler",
"@llvm-project//mlir:ArithTransforms",
"@llvm-project//mlir:BufferizationToMemRef",
"@llvm-project//mlir:BufferizationTransforms",
"@llvm-project//mlir:ComplexToStandard",
"@llvm-project//mlir:FuncDialect",
"@llvm-project//mlir:FuncTransforms",
"@llvm-project//mlir:LinalgTransforms",
"@llvm-project//mlir:MemRefTransforms",
"@llvm-project//mlir:Pass",
"@llvm-project//mlir:ReconcileUnrealizedCasts",
"@llvm-project//mlir:SCFToControlFlow",
"@llvm-project//mlir:SCFTransforms",
"@llvm-project//mlir:ShapeToStandard",
"@llvm-project//mlir:ShapeTransforms",
"@llvm-project//mlir:SparseTensorTransforms",
"@llvm-project//mlir:Support",
"@llvm-project//mlir:TensorToLinalg",
"@llvm-project//mlir:TensorTransforms",
"@llvm-project//mlir:Transforms",
"@llvm-project//mlir:VectorToLLVM",
"@llvm-project//mlir:VectorToSCF",
"@llvm-project//mlir:VectorTransforms",
"@local_tsl//tsl/platform:errors",
"@local_tsl//tsl/platform:logging",
] + select({
":experimental_mlir_gpu_enabled": [
"@llvm-project//mlir:GPUDialect",
"@llvm-project//mlir:GPUToNVVMTransforms",
],
"//conditions:default": [],
}),
alwayslink = 1, # has pipeline registration
)

cc_library(
name = "simple_orc_jit",
srcs = [
Expand Down

0 comments on commit fafd046

Please sign in to comment.