MCPcopy Create free account
hub / github.com/pytorch/executorch / main

Function main

examples/vulkan/export.py:146–379  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

144
145
146def main() -> None: # noqa: C901
147 logger = logging.getLogger("")
148 logger.setLevel(logging.INFO)
149
150 parser = argparse.ArgumentParser()
151 parser.add_argument(
152 "-m",
153 "--model_name",
154 required=True,
155 help=f"provide a model name. Valid ones: {list(MODEL_NAME_TO_MODEL.keys())}",
156 )
157
158 parser.add_argument(
159 "-fp16",
160 "--force_fp16",
161 action=argparse.BooleanOptionalAction,
162 default=False,
163 help="Force fp32 tensors to be converted to fp16 internally. Input/s outputs "
164 "will be converted to/from fp32 when entering/exiting the delegate. Default is "
165 "False",
166 )
167
168 parser.add_argument(
169 "--small_texture_limits",
170 action=argparse.BooleanOptionalAction,
171 default=False,
172 help="sets the default texture limit to be (2048, 2048, 2048) which is "
173 "compatible with more devices (i.e. desktop/laptop GPUs) compared to the "
174 "default (16384, 16384, 2048) which is more targeted for mobile GPUs. Default "
175 "is False.",
176 )
177
178 parser.add_argument(
179 "--skip_memory_planning",
180 action=argparse.BooleanOptionalAction,
181 default=False,
182 help="Skips memory planning pass while lowering, which can be used for "
183 "debugging. Default is False.",
184 )
185
186 parser.add_argument(
187 "-s",
188 "--strict",
189 action=argparse.BooleanOptionalAction,
190 default=True,
191 help="whether to export with strict mode. Default is True",
192 )
193
194 parser.add_argument(
195 "-d",
196 "--dynamic",
197 action=argparse.BooleanOptionalAction,
198 default=False,
199 help="Enable dynamic shape support. Default is False",
200 )
201
202 parser.add_argument(
203 "-r",

Callers 1

export.pyFile · 0.70

Calls 15

exportFunction · 0.90
VulkanPartitionerClass · 0.90
save_pte_programFunction · 0.90
MethodTestSuiteClass · 0.90
MethodTestCaseClass · 0.90
BundledProgramClass · 0.90
init_modelFunction · 0.85
get_sample_inputsFunction · 0.85
get_dynamic_shapesFunction · 0.85
keysMethod · 0.80

Tested by

no test coverage detected