Caffe2 - C++ API
A deep learning, cross platform ML framework
benchmark_args.h
1 
16 #pragma once
17 
18 #include "c10/util/Flags.h"
19 
20 C10_DEFINE_string(
21  backend,
22  "builtin",
23  "The backend to use when running the model. The allowed "
24  "backend choices are: builtin, default, nnpack, eigen, mkl, cuda");
25 
26 C10_DEFINE_string(init_net, "", "The given net to initialize any parameters.");
27 C10_DEFINE_string(
28  input,
29  "",
30  "Input that is needed for running the network. If "
31  "multiple input needed, use comma separated string.");
32 C10_DEFINE_string(
33  input_dims,
34  "",
35  "Alternate to input_files, if all inputs are simple "
36  "float TensorCPUs, specify the dimension using comma "
37  "separated numbers. If multiple input needed, use "
38  "semicolon to separate the dimension of different "
39  "tensors.");
40 C10_DEFINE_string(
41  input_file,
42  "",
43  "Input file that contain the serialized protobuf for "
44  "the input blobs. If multiple input needed, use comma "
45  "separated string. Must have the same number of items "
46  "as input does.");
47 C10_DEFINE_string(
48  input_type,
49  "float",
50  "Input type when specifying the input dimension."
51  "The supported types are float, uint8_t.");
52 C10_DEFINE_int(iter, 10, "The number of iterations to run.");
53 C10_DEFINE_string(net, "", "The given net to benchmark.");
54 C10_DEFINE_string(
55  output,
56  "",
57  "Output that should be dumped after the execution "
58  "finishes. If multiple outputs are needed, use comma "
59  "separated string. If you want to dump everything, pass "
60  "'*' as the output value.");
61 C10_DEFINE_string(
62  output_folder,
63  "",
64  "The folder that the output should be written to. This "
65  "folder must already exist in the file system.");
66 C10_DEFINE_bool(
67  run_individual,
68  false,
69  "Whether to benchmark individual operators.");
70 C10_DEFINE_int(
71  sleep_before_run,
72  0,
73  "The seconds to sleep before starting the benchmarking.");
74 C10_DEFINE_int(
75  sleep_between_iteration,
76  0,
77  "The seconds to sleep between the individual iterations.");
78 C10_DEFINE_int(
79  sleep_between_net_and_operator,
80  0,
81  "The seconds to sleep between net and operator runs.");
82 C10_DEFINE_bool(
83  text_output,
84  false,
85  "Whether to write out output in text format for regression purpose.");
86 C10_DEFINE_int(warmup, 0, "The number of iterations to warm up.");
87 C10_DEFINE_bool(
88  wipe_cache,
89  false,
90  "Whether to evict the cache before running network.");