MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / main

Function main

tensorflow/compiler/xla/tools/run_hlo_module_main.cc:71–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69} // namespace
70
71int main(int argc, char** argv) {
72 xla::RunHloModuleOptions opts;
73 std::vector<tensorflow::Flag> flag_list = {
74 tensorflow::Flag(
75 "platform", &opts.platform,
76 "The test platform that the HLO module will be executed on "
77 "(gpu, cpu, etc)."),
78 tensorflow::Flag(
79 "reference_platform", &opts.reference_platform,
80 "The reference platform that HLO module will be "
81 "executed on. The result produced on the reference platform will "
82 "be compared against the result produced on the test platform. A "
83 "value of 'default' will use the TPU_Interpreter as a reference if "
84 "the test platform is a TPU, and 'interpreter' otherwise. If the "
85 "flag value is the empty string, then the module will not be run "
86 "on a reference platform at all."),
87 tensorflow::Flag("print_literals", &opts.print_literals,
88 "Print the input and result literals to stdout."),
89 tensorflow::Flag(
90 "run_test_hlo_passes", &opts.run_test_hlo_passes,
91 "Run HLO pass pipeline for the test platform on the HLO module "
92 "before running the module on the test platform. This should be "
93 "set to true if the HLO module is unoptimized and set to false if "
94 "the HLO module already has been optimized."),
95 tensorflow::Flag(
96 "run_reference_hlo_passes", &opts.run_reference_hlo_passes,
97 "Run HLO pass pipeline for the reference platform on the HLO module "
98 "before running the module on the reference platform. "
99 "In general, if the given HLO module was optimized for a platform "
100 "other "
101 "than the reference this is necessary because some HLO passes are "
102 "legalization passes which must be run prior to code generation."),
103
104 tensorflow::Flag(
105 "use_large_float_range", &opts.use_large_float_range,
106 "Generate floating point values using a large uniform-log "
107 "distribution as opposed to a small uniform distribution."),
108 tensorflow::Flag(
109 "abs_error_bound", &opts.abs_error_bound,
110 "The absolute error bound used when comparing the test and "
111 "reference results."),
112 tensorflow::Flag(
113 "rel_error_bound", &opts.rel_error_bound,
114 "The relative error bound used when comparing the test and "
115 "reference results."),
116 tensorflow::Flag("input_format", &opts.input_format,
117 "The format of the input file. Valid values:\n"
118 " hlo : HLO textual format\n"
119 " pb : xla::HloProto in binary proto format\n"
120 " pbtxt : xla::HloProto in text proto format"),
121 tensorflow::Flag(
122 "input_module", &opts.input_module,
123 "A path to a file containing the HLO module. Can also pass "
124 "a this as argv[1], but this flag is more explicit."),
125 tensorflow::Flag(
126 "iterations", &opts.iterations,
127 "The number of times to run the module. Each iteration will be run "
128 "with different input data.")};

Callers

nothing calls this directly

Calls 12

AppendDebugOptionsFlagsFunction · 0.85
UsageFunction · 0.85
ParseFunction · 0.85
GetTestPlatformNameFunction · 0.85
GetReferencePlatformNameFunction · 0.85
RunAndCompareFunction · 0.85
c_strMethod · 0.80
FlagClass · 0.50
StrCatFunction · 0.50
InitMainFunction · 0.50
emptyMethod · 0.45
messageMethod · 0.45

Tested by

no test coverage detected