#pragma once #include "mlir/Dialect/Func/IR/FuncOps.h" #include "mlir/Dialect/MemRef/IR/MemRef.h" #include "mlir/IR/Operation.h" #include "mlir/IR/PatternMatch.h" #include "mlir/IR/Value.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/STLFunctionalExtras.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "src/Accelerators/PIM/Common/IR/AddressAnalysis.hpp" #include "src/Accelerators/PIM/Common/IR/ConstantUtils.hpp" #include "src/Accelerators/PIM/Common/IR/CoreBlockUtils.hpp" #include "src/Accelerators/PIM/Common/IR/EntryPointUtils.hpp" #include "src/Accelerators/PIM/Common/IR/IndexingUtils.hpp" #include "src/Accelerators/PIM/Common/IR/ShapeUtils.hpp" #include "src/Accelerators/PIM/Common/IR/WeightUtils.hpp" #include "src/Accelerators/PIM/Common/Support/DebugDump.hpp" #include "src/Accelerators/PIM/Common/Support/FileSystemUtils.hpp" #include "src/Compiler/CompilerOptions.hpp" #include #include #include namespace onnx_mlir { inline constexpr llvm::StringLiteral kCoreIdAttrName = "coreId"; inline constexpr llvm::StringLiteral kCoreIdsAttrName = "coreIds"; inline constexpr llvm::StringLiteral kLocalMemoryAddressAttrName = "pim.local_memory_address"; inline constexpr llvm::StringLiteral kLocalMemorySizeAttrName = "pim.local_memory_size"; inline constexpr llvm::StringLiteral kPipelineHostBufferBytesAttrName = "pim.pipeline_host_buffer_bytes"; inline constexpr llvm::StringLiteral kPipelineHostBufferName = "pim_pipeline_channels"; inline constexpr size_t kPimEventRegisterCount = 32; inline constexpr std::array kRemovedLocalMemoryPlanAttrNames = { "pim.local_memory_slot", "pim.local_memory_slot_size", "pim.local_memory_fallback_count", "pim.local_memory_nested_single_use_count", }; inline constexpr size_t kPimLocalMemoryAddressLimit = static_cast(std::numeric_limits::max()); } // namespace onnx_mlir