kernel_creator.cc
imports tensorflow/core/platform/errors.himports tensorflow/core/platform/status.h
SHA-2568466cfd1b986ece6bc4ef8a726a07d45464769b6c931caf0b46d0f6debd48df6
MaleculeMd(In₅)
Evidence
1/* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
2
3Licensed under the Apache License, Version 2.0 (the "License");
4you may not use this file except in compliance with the License.
5You may obtain a copy of the License at
6
7 http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software
10distributed under the License is …
11:42… IND, either express or implied.
12See the License for the specific language governing permissions and
13limitations under the License.
14================================================================ …
21:34… ------------------------------------------===//
22#include "tensorflow/compiler/mlir/tools/kernel_gen/kernel_creator.h"
23
24#include <string>
25
26#include "absl/status/status.h"
27#include "llvm/ADT/ArrayRef.h"
28#include "mlir/Conversion/AffineToStandard/AffineToStandard.h" // from @llvm-project
29#include "mlir/Conversion/ComplexToStandard/ComplexToStandard.h" // from @llvm-project
30#include "mlir/Conversion/GPUCommon/GPUCommonPass.h" // from @llvm-project
31#include "mlir/Conversion/GPUToNVVM/GPUToNVVMPass.h" // from @llvm-project
32#include "mlir/Conversion/ReconcileUnrealizedCasts/ReconcileUnrealizedCasts.h" // from @llvm-project
33#include "mlir/Conversion/SCFToControlFlow/SCFToControlFlow.h" // from @llvm-project
34#include "mlir/Conversion/SCFToGPU/SCFToGPUPass.h" // from @llvm-project
35#include "mlir/Conversion/ShapeToStandard/ShapeToStandard.h" // from @llvm-project
36#include "mlir/Dialect/Arith/IR/Arith.h" // from @llvm-project
37#include "mlir/Dialect/Arith/Transforms/Passes.h" // from @llvm-project
38#include "mlir/Dialect/Bufferization/Transforms/Passes.h" // from @llvm-project
39#include "mlir/Dialect/Complex/IR/Complex.h" // from @llvm-project
40#include "mlir/Dialect/ControlFlow/IR/ControlFlow.h" // from @llvm-project
41#include "mlir/Dialect/Func/IR/FuncOps.h" // from @llvm-project
42#include "mlir/Dialect/GPU/IR/GPUDialect.h" // from @llvm-project
43#include "mlir/Dialect/GPU/Transforms/Passes.h" // from @llvm-project
44#include "mlir/Dialect/LLVMIR/Transforms/OptimizeForNVVM.h" // from @llvm-project
45#include "mlir/Dialect/Linalg/Passes.h" // from @llvm-project
46#include "mlir/Dialect/MemRef/IR/MemRef.h" // from @llvm-project
47#include "mlir/Dialect/MemRef/Transforms/Passes.h" // from @llvm-project
48#include "mlir/Dialect/SCF/Transforms/Passes.h" // from @llvm-project
49#include "mlir/Dialect/Shape/IR/Shape.h" // from @llvm-project
50#include "mlir/IR/BuiltinTypeInterfaces.h" // from @llvm-project
51#include "mlir/IR/OwningOpRef.h" // from @llvm-project
52#include "mlir/Interfaces/DataLayoutInterfaces.h" // from @llvm-project
53#include "mlir/Parser/Parser.h" // from @llvm-project
54#include "mlir/Pass/PassManager.h" // from @llvm-project
55#include "mlir/Support/LLVM.h" // from @llvm-project
56#include "mlir/Support/LogicalResult.h" // from @llvm-project
57#include "mlir/Target/LLVMIR/Dialect/Builtin/BuiltinToLLVMIRTranslation.h" // from @llvm-project
58#include "mlir/Target/LLVMIR/Dialect/GPU/GPUToLLVMIRTranslation.h" // from @llvm-project
59#include "mlir/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.h" // from @llvm-project
60#include "mlir/Target/LLVMIR/Dialect/NVVM/NVVMToLLVMIRTranslation.h" // from @llvm-project
61#include "mlir/Target/LLVMIR/Dialect/ROCDL/ROCDLToLLVMIRTranslation.h" // from @llvm-project
62#include "mlir/Transforms/DialectConversion.h" // from @llvm-project
63#include "mlir/Transforms/Passes.h" // from @llvm-project
64#include "stablehlo/conversions/linalg/transforms/Passes.h" // from @stablehlo
65#include "stablehlo/dialect/ChloOps.h" // from @stablehlo
66#include "stablehlo/transforms/Passes.h" // from @stablehlo
67#include "tensorflow/compiler/mlir/tensorflow/utils/dump_mlir_util.h"
68#include "tensorflow/compiler/mlir/tools/kernel_gen/transforms/passes.h"
222:73… ferize
223 // in 2 steps: first Linalg, then Hlo. That would need refactoring of
224 // BufferizeTypeConverter.
225 pm.addNestedPass<FuncOp>(
226 mlir:: …
244:52… ations. This is needed so
245 // that loop bounds have the same value.
246 pm.addNestedPass<FuncOp>(::mlir::createCanonicalizerPass());
247 // Run CSE to …