Skip to content

Latest commit

 

History

History
728 lines (589 loc) · 13.5 KB

File metadata and controls

728 lines (589 loc) · 13.5 KB
.. currentmodule:: torch.fx.experimental

torch.fx.experimental

:::{warning} These APIs are experimental and subject to change without notice. :::

.. autoclass:: torch.fx.experimental.sym_node.DynamicInt

torch.fx.experimental.sym_node

.. currentmodule:: torch.fx.experimental.sym_node
.. automodule:: torch.fx.experimental.sym_node
.. autosummary::
    :toctree: generated
    :nosignatures:

    is_channels_last_contiguous_2d
    is_channels_last_contiguous_3d
    is_channels_last_strides_2d
    is_channels_last_strides_3d
    is_contiguous
    is_non_overlapping_and_dense_indicator
    method_to_operator
    sympy_is_channels_last_contiguous_2d
    sympy_is_channels_last_contiguous_3d
    sympy_is_channels_last_strides_2d
    sympy_is_channels_last_strides_3d
    sympy_is_channels_last_strides_generic
    sympy_is_contiguous
    sympy_is_contiguous_generic
    to_node

torch.fx.experimental.symbolic_shapes

.. currentmodule:: torch.fx.experimental.symbolic_shapes
.. automodule:: torch.fx.experimental.symbolic_shapes
.. autosummary::
    :toctree: generated
    :nosignatures:

    ShapeEnv
    DimDynamic
    StrictMinMaxConstraint
    RelaxedUnspecConstraint
    EqualityConstraint
    SymbolicContext
    StatelessSymbolicContext
    StatefulSymbolicContext
    SubclassSymbolicContext
    DimConstraints
    ShapeEnvSettings
    ConvertIntKey
    CallMethodKey
    PropagateUnbackedSymInts
    DivideByKey
    InnerTensorKey
    Specialization

    is_concrete_int
    is_concrete_bool
    is_concrete_float
    has_free_symbols
    has_free_unbacked_symbols
    guard_or_true
    guard_or_false
    guard_size_oblivious
    sym_and
    sym_eq
    sym_or
    constrain_range
    constrain_unify
    canonicalize_bool_expr
    statically_known_true
    statically_known_false
    has_static_value
    lru_cache
    check_consistent
    compute_unbacked_bindings
    rebind_unbacked
    resolve_unbacked_bindings
    is_accessor_node
    cast_symbool_to_symint_guardless
    create_contiguous
    error
    eval_guards
    eval_is_non_overlapping_and_dense
    find_symbol_binding_fx_nodes
    free_symbols
    free_unbacked_symbols
    fx_placeholder_targets
    fx_placeholder_vals
    guard_bool
    guard_float
    guard_int
    guard_scalar
    guarding_hint_or_throw
    has_guarding_hint
    has_symbolic_sizes_strides
    is_nested_int
    is_symbol_binding_fx_node
    is_symbolic
    optimization_hint
    expect_true
    log_lru_cache_stats

torch.fx.experimental.proxy_tensor

.. currentmodule:: torch.fx.experimental.proxy_tensor
.. automodule:: torch.fx.experimental.proxy_tensor
.. autosummary::
    :toctree: generated
    :nosignatures:

    make_fx
    handle_sym_dispatch
    get_proxy_mode
    maybe_enable_thunkify
    maybe_disable_thunkify
    thunkify
    track_tensor
    track_tensor_tree
    decompose
    disable_autocast_cache
    disable_proxy_modes_tracing
    dispatch_trace
    extract_val
    fake_signature
    fetch_object_proxy
    fetch_sym_proxy
    has_proxy_slot
    is_sym_node
    maybe_handle_decomp
    proxy_call
    set_meta
    set_original_aten_op
    set_proxy_slot
    snapshot_fake

torch.fx.experimental.optimization

.. currentmodule:: torch.fx.experimental.optimization
.. automodule:: torch.fx.experimental.optimization
.. autosummary::
    :toctree: generated
    :nosignatures:

    extract_subgraph
    matches_module_pattern
    modules_to_mkldnn
    optimize_for_inference
    remove_dropout
    replace_node_module
    reset_modules
    use_mkl_length

torch.fx.experimental.recording

.. currentmodule:: torch.fx.experimental.recording
.. automodule:: torch.fx.experimental.recording
.. autosummary::
    :toctree: generated
    :nosignatures:

    record_shapeenv_event
    replay_shape_env_events
    shape_env_check_state_equal

torch.fx.experimental.unification.core

.. currentmodule:: torch.fx.experimental.unification.core
.. automodule:: torch.fx.experimental.unification.core
.. autosummary::
    :toctree: generated
    :nosignatures:

    reify

torch.fx.experimental.unification.multipledispatch.utils

.. currentmodule:: torch.fx.experimental.unification.multipledispatch.utils
.. automodule:: torch.fx.experimental.unification.multipledispatch.utils
.. autosummary::
    :toctree: generated
    :nosignatures:

    typename
    expand_tuples
    groupby
    raises
    reverse_dict

torch.fx.experimental.unification.unification_tools

.. currentmodule:: torch.fx.experimental.unification.unification_tools
.. automodule:: torch.fx.experimental.unification.unification_tools
.. autosummary::
    :toctree: generated
    :nosignatures:

    assoc
    assoc_in
    dissoc
    first
    groupby
    keyfilter
    keymap
    merge
    merge_with
    update_in
    valfilter
    valmap
    itemfilter
    itemmap

torch.fx.experimental.migrate_gradual_types.transform_to_z3

.. currentmodule:: torch.fx.experimental.migrate_gradual_types.transform_to_z3
.. automodule:: torch.fx.experimental.migrate_gradual_types.transform_to_z3
.. autosummary::
    :toctree: generated
    :nosignatures:

    transform_algebraic_expression
    transform_all_constraints
    transform_all_constraints_trace_time
    transform_dimension
    transform_to_z3
    transform_var
    evaluate_conditional_with_constraints

torch.fx.experimental.migrate_gradual_types.constraint

.. currentmodule:: torch.fx.experimental.migrate_gradual_types.constraint
.. automodule:: torch.fx.experimental.migrate_gradual_types.constraint
.. autosummary::
    :toctree: generated
    :nosignatures:

    is_algebraic_expression
    is_bool_expr
    is_dim

torch.fx.experimental.migrate_gradual_types.constraint_generator

.. currentmodule:: torch.fx.experimental.migrate_gradual_types.constraint_generator
.. automodule:: torch.fx.experimental.migrate_gradual_types.constraint_generator
.. autosummary::
    :toctree: generated
    :nosignatures:

    adaptive_inference_rule
    assert_inference_rule
    batchnorm_inference_rule
    bmm_inference_rule
    embedding_inference_rule
    embedding_inference_rule_functional
    eq_inference_rule
    equality_inference_rule
    expand_inference_rule
    full_inference_rule
    gt_inference_rule
    lt_inference_rule
    masked_fill_inference_rule
    neq_inference_rule
    tensor_inference_rule
    torch_dim_inference_rule
    torch_linear_inference_rule
    type_inference_rule
    view_inference_rule
    register_inference_rule
    transpose_inference_rule

torch.fx.experimental.migrate_gradual_types.constraint_transformation

.. currentmodule:: torch.fx.experimental.migrate_gradual_types.constraint_transformation
.. automodule:: torch.fx.experimental.migrate_gradual_types.constraint_transformation
.. autosummary::
    :toctree: generated
    :nosignatures:

    apply_padding
    calc_last_two_dims
    create_equality_constraints_for_broadcasting
    is_target_div_by_dim
    no_broadcast_dim_with_index
    register_transformation_rule
    transform_constraint
    transform_get_item
    transform_get_item_tensor
    transform_index_select
    transform_transpose
    valid_index
    valid_index_tensor
    is_dim_div_by_target

torch.fx.experimental.graph_gradual_typechecker

.. currentmodule:: torch.fx.experimental.graph_gradual_typechecker
.. automodule:: torch.fx.experimental.graph_gradual_typechecker
.. autosummary::
    :toctree: generated
    :nosignatures:

    adaptiveavgpool2d_check
    adaptiveavgpool2d_inference_rule
    all_eq
    bn2d_inference_rule
    calculate_out_dimension
    conv_refinement_rule
    conv_rule
    element_wise_eq
    expand_to_tensor_dim
    first_two_eq
    register_algebraic_expressions_inference_rule
    register_inference_rule
    register_refinement_rule
    transpose_inference_rule

torch.fx.experimental.meta_tracer

.. currentmodule:: torch.fx.experimental.meta_tracer
.. automodule:: torch.fx.experimental.meta_tracer
.. autosummary::
    :toctree: generated
    :nosignatures:

    embedding_override
    functional_relu_override
    nn_layernorm_override
    proxys_to_metas
    symbolic_trace
    torch_abs_override
    torch_nn_relu_override
    torch_relu_override
    torch_where_override

torch.fx.experimental.accelerator_partitioner

.. automodule:: torch.fx.experimental.accelerator_partitioner
.. currentmodule:: torch.fx.experimental.accelerator_partitioner
.. autosummary::
    :toctree: generated
    :nosignatures:

    check_dependency
    combine_two_partitions
    reorganize_partitions
    reset_partition_device
    set_parents_and_children

torch.fx.experimental.debug

.. automodule:: torch.fx.experimental.debug
.. currentmodule:: torch.fx.experimental.debug
.. autosummary::
    :toctree: generated
    :nosignatures:

    set_trace

torch.fx.experimental.merge_matmul

.. automodule:: torch.fx.experimental.merge_matmul
.. currentmodule:: torch.fx.experimental.merge_matmul
.. autosummary::
    :toctree: generated
    :nosignatures:

    are_nodes_independent
    may_depend_on
    merge_matmul

torch.fx.experimental.unification.match

.. automodule:: torch.fx.experimental.unification.match
.. currentmodule:: torch.fx.experimental.unification.match
.. autosummary::
    :toctree: generated
    :nosignatures:

    edge
    match
    ordering
    supercedes

torch.fx.experimental.unification.more

.. automodule:: torch.fx.experimental.unification.more
.. currentmodule:: torch.fx.experimental.unification.more
.. autosummary::
    :toctree: generated
    :nosignatures:

    reify_object
    unifiable
    unify_object

torch.fx.experimental.unification.multipledispatch.conflict

.. automodule:: torch.fx.experimental.unification.multipledispatch.conflict
.. currentmodule:: torch.fx.experimental.unification.multipledispatch.conflict
.. autosummary::
    :toctree: generated
    :nosignatures:

    ambiguities
    ambiguous
    consistent
    edge
    ordering
    super_signature
    supercedes

torch.fx.experimental.unification.multipledispatch.core

.. automodule:: torch.fx.experimental.unification.multipledispatch.core
.. currentmodule:: torch.fx.experimental.unification.multipledispatch.core
.. autosummary::
    :toctree: generated
    :nosignatures:

    dispatch
    ismethod

torch.fx.experimental.unification.multipledispatch.dispatcher

.. automodule:: torch.fx.experimental.unification.multipledispatch.dispatcher
.. currentmodule:: torch.fx.experimental.unification.multipledispatch.dispatcher
.. autosummary::
    :toctree: generated
    :nosignatures:

    ambiguity_warn
    halt_ordering
    restart_ordering
    source
    str_signature
    variadic_signature_matches
    variadic_signature_matches_iter
    warning_text

torch.fx.experimental.unification.multipledispatch.variadic

.. automodule:: torch.fx.experimental.unification.multipledispatch.variadic
.. currentmodule:: torch.fx.experimental.unification.multipledispatch.variadic
.. autosummary::
    :toctree: generated
    :nosignatures:

    isvariadic

torch.fx.experimental.unification.utils

.. automodule:: torch.fx.experimental.unification.utils
.. currentmodule:: torch.fx.experimental.unification.utils
.. autosummary::
    :toctree: generated
    :nosignatures:

    freeze
    hashable
    raises
    reverse_dict
    transitive_get
    xfail

torch.fx.experimental.unification.variable

.. automodule:: torch.fx.experimental.unification.variable
.. currentmodule:: torch.fx.experimental.unification.variable
.. autosummary::
    :toctree: generated
    :nosignatures:

    var
    variables
    vars

torch.fx.experimental.unify_refinements

.. automodule:: torch.fx.experimental.unify_refinements
.. currentmodule:: torch.fx.experimental.unify_refinements
.. autosummary::
    :toctree: generated
    :nosignatures:

    check_for_type_equality
    infer_symbolic_types
    infer_symbolic_types_single_pass
    substitute_all_types
    substitute_solution_one_type
    unify_eq

torch.fx.experimental.validator

.. automodule:: torch.fx.experimental.validator
.. currentmodule:: torch.fx.experimental.validator
.. autosummary::
    :toctree: generated
    :nosignatures:

    bisect
    translation_validation_enabled
    translation_validation_timeout
    z3op
    z3str