#pragma once #include "llvm/Support/CommandLine.h" #define INSTRUMENTSTAGE_ENUM_PIM #define INSTRUMENTSTAGE_CL_ENUM_PIM #define PROFILEIR_CL_ENUM_PIM #define OPTREPORT_ENUM_PIM #define OPTREPORT_CL_ENUM_PIM namespace onnx_mlir { typedef enum { EmitSpatial = 0, EmitPim = 1, EmitPimBufferized = 2, EmitPimCodegen = 3 } PimEmissionTargetType; typedef enum { MergeSchedulerPeft = 0, } PimMergeSchedulerType; typedef enum { PimMemoryReportNone = 0, PimMemoryReportSummary = 1, PimMemoryReportFull = 2, } PimMemoryReportLevel; typedef enum { PimConvLoweringAuto = 0, PimConvLoweringLegacy = 1, PimConvLoweringDepthwise = 2, PimConvLoweringPackedIm2Col = 3, PimConvLoweringStreamedPatch = 4, PimConvLoweringStreamedPacked = 5, PimConvLoweringOutputChannelTiled = 6, PimConvLoweringInputKTiled = 7, PimConvLoweringTiled2D = 8, } PimConvLoweringType; typedef enum { SpatialDataflowExportNone = 0, SpatialDataflowExportPre = 1, SpatialDataflowExportPost = 2, SpatialDataflowExportBoth = 3, } PimSpatialDataflowExportType; extern llvm::cl::OptionCategory OnnxMlirOptions; extern llvm::cl::opt pimEmissionTarget; extern llvm::cl::opt pimMergeScheduler; extern llvm::cl::opt pimMemoryReport; extern llvm::cl::opt pimConvLowering; extern llvm::cl::opt pimExportSpatialDataflow; extern llvm::cl::opt pimOnlyCodegen; extern llvm::cl::opt pimDisableMemoryCoalescing; extern llvm::cl::opt useExperimentalConvImpl; extern llvm::cl::opt pimEmitJson; extern llvm::cl::opt pimReportConvLowering; extern llvm::cl::opt pimDetectCommunicationDeadlock; extern llvm::cl::opt pimMaterializeScalarFanoutGlobalOrder; extern llvm::cl::opt pimTraceCommunicationMaterialization; extern llvm::cl::opt crossbarSize; extern llvm::cl::opt crossbarCountInCore; extern llvm::cl::opt coresCount; extern llvm::cl::opt pimConvIm2colMaxElements; extern llvm::cl::opt pimConvStreamChunkPositions; bool hasExplicitPimCoreCount(); void verifyExplicitPimCoreCount(); // This option, by default set to false, will ignore an error when resolving a // specific tiles of the operands of a concat. This specific case is when the // wanted tile is generated by two separate operands of the concat. If this is // set to false, this corner case will assert an error. If this is set to true, // a simplification is performed and only the tile from the first operand is // taken. extern llvm::cl::opt ignoreConcatError; } // namespace onnx_mlir