# torch.utils
```{eval-rst}
.. automodule:: torch.utils
```

```{eval-rst}
.. currentmodule:: torch.utils
```

```{eval-rst}
.. autosummary::
    :toctree: generated
    :nosignatures:

    rename_privateuse1_backend
    generate_methods_for_privateuse1_backend
    get_cpp_backtrace
    set_module
    swap_tensors
```

# torch.utils.collect_env
```{eval-rst}
.. automodule:: torch.utils.collect_env
```

```{eval-rst}
.. currentmodule:: torch.utils.collect_env
```

```{eval-rst}
.. autosummary::
    :toctree: generated
    :nosignatures:

    check_release_file
    is_xnnpack_available
    main
    pretty_str
    run
    run_and_parse_first_match
    run_and_read_all
    run_and_return_first_line
```

# torch.utils.flop_counter
```{eval-rst}
.. automodule:: torch.utils.flop_counter
```

```{eval-rst}
.. currentmodule:: torch.utils.flop_counter
```

```{eval-rst}
.. autosummary::
    :toctree: generated
    :nosignatures:

    baddbmm_flop
    bmm_flop
    conv_backward_flop
    conv_flop
    conv_flop_count
    register_flop_formula
    sdpa_backward_flop
    sdpa_backward_flop_count
    sdpa_flop
    sdpa_flop_count
    shape_wrapper
```

# torch.utils.hipify.hipify_python
```{eval-rst}
.. automodule:: torch.utils.hipify.hipify_python
```

```{eval-rst}
.. currentmodule:: torch.utils.hipify.hipify_python
```

```{eval-rst}
.. autosummary::
    :toctree: generated
    :nosignatures:

    compute_stats
    extract_arguments
    file_add_header
    file_specific_replacement
    find_bracket_group
    find_closure_group
    find_parentheses_group
    fix_static_global_kernels
    hip_header_magic
    hipify
    is_caffe2_gpu_file
    is_cusparse_file
    is_out_of_place
    is_pytorch_file
    is_special_file
    openf
    preprocess_file_and_save_result
    preprocessor
    processKernelLaunches
    replace_extern_shared
    replace_math_functions
    str2bool
```


<!-- This module needs to be documented. Adding here in the meantime
for tracking purposes -->
```{eval-rst}
.. py:module:: torch.utils.backend_registration
.. py:module:: torch.utils.benchmark.examples.compare
.. py:module:: torch.utils.benchmark.examples.fuzzer
.. py:module:: torch.utils.benchmark.examples.op_benchmark
.. py:module:: torch.utils.benchmark.examples.simple_timeit
.. py:module:: torch.utils.benchmark.op_fuzzers.binary
.. py:module:: torch.utils.benchmark.op_fuzzers.sparse_binary
.. py:module:: torch.utils.benchmark.op_fuzzers.sparse_unary
.. py:module:: torch.utils.benchmark.op_fuzzers.spectral
.. py:module:: torch.utils.benchmark.op_fuzzers.unary
.. py:module:: torch.utils.benchmark.utils.common
.. py:module:: torch.utils.benchmark.utils.compare
.. py:module:: torch.utils.benchmark.utils.compile
.. py:module:: torch.utils.benchmark.utils.cpp_jit
.. py:module:: torch.utils.benchmark.utils.fuzzer
.. py:module:: torch.utils.benchmark.utils.sparse_fuzzer
.. py:module:: torch.utils.benchmark.utils.timer
.. py:module:: torch.utils.benchmark.utils.valgrind_wrapper.timer_interface
.. py:module:: torch.utils.bundled_inputs
.. py:module:: torch.utils.checkpoint
.. py:module:: torch.utils.cpp_backtrace
.. py:module:: torch.utils.cpp_extension
.. py:module:: torch.utils.data.backward_compatibility
.. py:module:: torch.utils.data.dataloader
.. py:module:: torch.utils.data.datapipes.dataframe.dataframe_wrapper
.. py:module:: torch.utils.data.datapipes.dataframe.dataframes
.. py:module:: torch.utils.data.datapipes.dataframe.datapipes
.. py:module:: torch.utils.data.datapipes.dataframe.structures
.. py:module:: torch.utils.data.datapipes.datapipe
.. py:module:: torch.utils.data.datapipes.gen_pyi
.. py:module:: torch.utils.data.datapipes.iter.callable
.. py:module:: torch.utils.data.datapipes.iter.combinatorics
.. py:module:: torch.utils.data.datapipes.iter.combining
.. py:module:: torch.utils.data.datapipes.iter.filelister
.. py:module:: torch.utils.data.datapipes.iter.fileopener
.. py:module:: torch.utils.data.datapipes.iter.grouping
.. py:module:: torch.utils.data.datapipes.iter.routeddecoder
.. py:module:: torch.utils.data.datapipes.iter.selecting
.. py:module:: torch.utils.data.datapipes.iter.sharding
.. py:module:: torch.utils.data.datapipes.iter.streamreader
.. py:module:: torch.utils.data.datapipes.iter.utils
.. py:module:: torch.utils.data.datapipes.map.callable
.. py:module:: torch.utils.data.datapipes.map.combinatorics
.. py:module:: torch.utils.data.datapipes.map.combining
.. py:module:: torch.utils.data.datapipes.map.grouping
.. py:module:: torch.utils.data.datapipes.map.utils
.. py:module:: torch.utils.data.datapipes.utils.common
.. py:module:: torch.utils.data.datapipes.utils.decoder
.. py:module:: torch.utils.data.datapipes.utils.snapshot
.. py:module:: torch.utils.data.dataset
.. py:module:: torch.utils.data.distributed
.. py:module:: torch.utils.data.graph
.. py:module:: torch.utils.data.graph_settings
.. py:module:: torch.utils.data.sampler
.. py:module:: torch.utils.dlpack
.. py:module:: torch.utils.file_baton
.. py:module:: torch.utils.hipify.constants
.. py:module:: torch.utils.hipify.cuda_to_hip_mappings
.. py:module:: torch.utils.hipify.version
.. py:module:: torch.utils.hooks
.. py:module:: torch.utils.mkldnn
.. py:module:: torch.utils.mobile_optimizer
.. py:module:: torch.utils.show_pickle
.. py:module:: torch.utils.tensorboard.summary
.. py:module:: torch.utils.tensorboard.writer
.. py:module:: torch.utils.throughput_benchmark
.. py:module:: torch.utils.weak
```
