in libraries/common/src/MapCompilerArguments.cpp [20:208]
void ParsedMapCompilerArguments::AddArgs(utilities::CommandLineParser& parser)
{
parser.AddDocumentationString("Compiler options");
parser.AddOption(
compiledModuleName,
"compiledModuleName",
"cmn",
"Name for compiled module",
"ELL");
parser.AddOption(
compiledFunctionName,
"compiledFunctionName",
"cfn",
"Name for compiled function (if none specified, use <moduleName>_Predict",
"");
parser.AddOption(
profile,
"profile",
"p",
"Emit profiling code",
false);
parser.AddOption(
optimize,
"optimize",
"opt",
"Optimize output code",
true);
parser.AddOption(
useBlas,
"blas",
"",
"Emit code that calls BLAS",
true);
parser.AddOption(
fuseLinearOperations,
"fuseLinearOps",
"",
"Fuse sequences of linear operations with constant coefficients into a single operation",
true);
parser.AddOption(
optimizeReorderDataNodes,
"optimizeReorderDataNodes",
"",
"Optimize sequences of reordering nodes",
true);
parser.AddOption(
convolutionMethod,
"convolutionMethod",
"",
"Set the preferred convolution method",
{ { "unrolled", PreferredConvolutionMethod::unrolled },
{ "simple", PreferredConvolutionMethod::simple },
{ "diagonal", PreferredConvolutionMethod::diagonal },
{ "winograd", PreferredConvolutionMethod::winograd },
{ "auto", PreferredConvolutionMethod::automatic } },
"auto");
parser.AddOption(
modelOptions,
"modelOption",
"",
"Add a model-specific option",
std::vector<std::string>{});
parser.AddOption(
nodeOptions,
"nodeOption",
"",
"Add a node-specific option",
std::vector<std::string>{});
parser.AddOption(
enableVectorization,
"vectorize",
"vec",
"Enable ELL's vectorization",
false);
parser.AddOption(
vectorWidth,
"vectorWidth",
"vw",
"Size of vector units",
4);
parser.AddOption(
parallelize,
"parallelize",
"par",
"Enable ELL's parallelization",
false);
parser.AddOption(
useThreadPool,
"threadPool",
"tp",
"Use thread pool for parallelization (if parallelization enabled)",
true);
parser.AddOption(
maxThreads,
"threads",
"th",
"Maximum num of parallel threads",
4);
parser.AddOption(
debug,
"debug",
"dbg",
"Emit debug code",
false);
parser.AddDocumentationString("");
parser.AddDocumentationString("Target device options");
parser.AddOption(
target,
"target",
"t",
"Target name",
{ { "host" }, { "pi0" }, { "pi3" }, { "orangepi0" }, { "pi3_64" }, { "mac" }, { "linux" }, { "windows" }, { "ios" }, { "aarch64" }, { "custom" } },
"host");
parser.AddOption(
numBits,
"numBits",
"b",
"Number of bits for target [0 == auto]",
0);
parser.AddOption(
cpu,
"cpu",
"cpu",
"The CPU target for generating code",
"");
parser.AddOption(
targetTriple,
"triple",
"",
"The triple describing the target architecture",
"");
parser.AddOption(
targetDataLayout,
"datalayout",
"",
"The string describing the target data layout",
"");
parser.AddOption(
targetFeatures,
"features",
"",
"A string describing target-specific features to enable or disable (these are LLVM attributes, in the format the llc -mattr option uses)",
"");
parser.AddOption(
positionIndependentCode,
"positionIndependentCode",
"pic",
"Generate position independent code (equivalent to -fPIC)",
{ { "auto", utilities::Optional<bool>() },
{ "true", utilities::Optional<bool>(true) },
{ "false", utilities::Optional<bool>(false) } },
"auto");
parser.AddOption(
globalValueAlignment,
"globalValueAlignment",
"gva",
"The number of bytes to align global buffers to",
32);
parser.AddOption(
skip_ellcode,
"skip_ellcode",
"skip_ellcode",
"To skip ELLCode",
false);
}