a
    h8                     @   s:  d dl mZmZ g dZg dZedddg edd ed	d
ge eddg edddg edd edddg edd ede edd ede edddg edddg ed d!g ed"d#d$g ed%d&d'g ed(d) ed*d
d+d,ged-d.d/d0 ed1d2d3d4 ed5d6d3d7 ed8d9d3d7 ed:d; ed<d= ed>d? ed@dA edBdC edDdE edFdG edHdId3d4 edJdK edLdMd3d4 edNdO edPdQ edRdSd3d7 edTdUd3d7 edVdWd3d4 edXdYd3d7 edZd[ ed\d]d3d4 ed^d_d3d3d` edadbd3d4 edcdd ededfd3d3dg edhdid3d3dg edjdkd3d7 edld6d3d7 edmd6d3d7 edndod3d7 edpdqd3d7 edrdqd3d7 edsdtd3d7 edudvd3d7 edwdxd3d7 edydzd3d7 ed{d|d3d7 ed}d~d3d7 eddd3d7 eddd3d7 eddd3d7 eddd6d dS )   )register_artifactregister_log)z%torch.fx.experimental.symbolic_shapesztorch.fx.experimental.sym_nodeztorch.fx.experimental.recording)ztorch.distributed"torch._dynamo.backends.distributedtorch.nn.parallel.distributedZasync_compileztorch._inductor.async_compilez3torch._inductor.compile_worker.tracked_process_poolcache)ztorch._inductor.remote_cacheztorch._inductor.fb.remote_cacheZdynamoztorch._dynamoZfake_tensorztorch._subclasses.fake_tensorZaotztorch._functorch.aot_autogradztorch._functorch._aot_autogradZautogradztorch.autogradZinductorztorch._inductorztorch._inductor.cudagraph_treesZ
cudagraphszGLogs information from wrapping inductor generated code with cudagraphs.ZdynamicZtorchZdistributedZc10dz"torch.distributed.distributed_c10dztorch.distributed.rendezvousZddpr   r   ppztorch.distributed.pipeliningZfsdpztorch.distributed.fsdpz"torch.distributed._composable.fsdpZdtensorztorch.distributed._tensorztorch.distributed.tensorZonnxz
torch.onnxexportztorch.exportztorch.export.dynamic_shapesztorch._export.converterztorch._export.non_strict_utilsztorch._export.serde.serializez"torch.fx.experimental.proxy_tensorZguardszhThis prints the guards for every compiled Dynamo frame. It does not tell you where the guards come from.T)visibleZverbose_guards )off_by_defaultbytecodez{Prints the original and modified bytecode from Dynamo. Mostly useful if you're debugging our bytecode generation in Dynamo.graphzvPrints the dynamo traced graph (prior to AOTDispatch) in a table. If you prefer python code use `graph_code` instead. Z
graph_codez4Like `graph`, but gives you the Python code instead.Zgraph_code_verbosezLVerbose FX pass logs, e.g. from tensorify_python_scalars and runtime_assert.Zgraph_sizesz5Prints the sizes of all FX nodes in the dynamo graph.Ztrace_sourcezAs we execute bytecode, prints the file name / line number we are processing and the actual source code. Useful with `bytecode`Z
trace_callzhLike trace_source, but it will give you the per-expression blow-by-blow if your Python is recent enough.Ztrace_bytecodezCAs we trace bytecode, prints the instruction and the current stack.Z
aot_graphszPrints the FX forward and backward graph generated by AOTDispatch, after partitioning. Useful to understand what's being given to InductorZaot_joint_graphz_Print FX joint graph from AOTAutograd, prior to partitioning. Useful for debugging partitioningZaot_graphs_effectszkPrints the FX forward and backward graph generated by AOTDispatch, useful for debugging effects processing.Zpre_grad_graphsz{Prints the FX graph before inductor pre grad passes. Useful to understand what's being given to Inductor before grad passesZpost_grad_graphsz}Prints the FX graph generated by post grad passes. Useful to understand what's being given to Inductor after post grad passesZir_pre_fusionz,Prints the IR before inductor fusion passes.Zir_post_fusionz+Prints the IR after inductor fusion passes.Zcompiled_autogradzzPrints various logs in compiled_autograd, including but not limited to the graphs. Useful for debugging compiled_autograd.Zcompiled_autograd_verbosezjWill affect performance. Prints compiled_autograd logs with C++ info e.g. autograd node -> fx node mappingZ
ddp_graphszOnly relevant for compiling DDP. DDP splits into multiple graphs to trigger comms early. This will print each individual graph here.Z
recompilesz?Prints the reason why we recompiled a graph. Very, very useful.Zrecompiles_verbosezPrints all guard checks that fail during a recompilation. At runtime, Dynamo will stop at the first failed check for each failing guard. So not all logged failing checks are actually ran by Dynamo.)r	   r   Zgraph_breakszPrints whenever Dynamo decides that it needs to graph break (i.e. create a new graph). Useful for debugging why torch.compile has poor performancenot_implementedzPrints log messages whenever we return NotImplemented in a multi-dispatch, letting you trace through each object we attempted to dispatch toZoutput_codez>Prints the code that Inductor generates (either Triton or C++))r   r	   Zkernel_codez?Prints the code that Inductor generates (on a per-kernel basis)ZschedulezIInductor scheduler information. Useful if working on Inductor fusion algoZ
perf_hintsZonnx_diagnosticsZfusionzADetailed Inductor fusion decisions. More detailed than 'schedule'Zloop_orderingzLogs related to loop orderingZloop_tilingoverlapz0Detailed Inductor compute/comm overlap decisionsZsym_nodez.Logs extra info for various SymNode operationsZtrace_shape_eventszBLogs traces for every ShapeEnv operation that we record for replayZcudagraph_static_inputsz:Logs static inputs handling in dynamo, AOT, and cudagraphsZbenchmarkingz+Detailed Inductor benchmarking information.Z
autotuningzKAutotuning choice logs, such as kernel source, perf, and tuning parameters.Zgraph_region_expansionzMLogs detailed steps of the duplicate graph region tracker expansion algorithmZinductor_metricszGLogs Inductor metrics, such as num_bytes, nodes_num_elem, node_runtimesZhierarchical_compilez,Logs debug info for hierarchical compilationZcustom_format_test_artifactzTesting only)Z
log_formatN)	_internalr   r   ZDYNAMICZDISTRIBUTED r   r   K/var/www/auris/lib/python3.9/site-packages/torch/_logging/_registrations.py<module>   s  





