Skip to content

Remove broken backends and document a stable set of backend choices #93733

@jansel

Description

@jansel

This is a more general "cleanup the backends" task.

As of writing this, TorchDynamo has 27 backends:

>>> torchdynamo.list_backends()
['ansor', 'aot_autograd', 'autotune', 'cudagraphs', 'cudagraphs_ts',
 'cudagraphs_ts_ofi', 'eager', 'fx2trt', 'ipex', 'nnc', 'nnc_ofi',
 'nvfuser', 'nvfuser_ofi', 'ofi', 'onnx2tensorrt', 'onnx2tensorrt_alt',
 'onnx2tf', 'onnxrt', 'onnxrt_cpu', 'onnxrt_cpu_numpy', 'onnxrt_cuda',
 'static_runtime', 'taso', 'tensorrt', 'torch2trt', 'ts', 'tvm']

This is too many.

Many of these backends may not be working. For example, fx2trt and static_runtime both recently moved out of tree -- which likely broke those backends. We should either fix or remove them.

Many more of these backends may not be useful, in that they don't provide a performance advantage compared to the other choices or are alternate versions of another backend. We should do some benchmarking to find these cases and do pruning.

Additionally, many backends require multiple external dependencies to work properly. We should document what those are and provide instructions on how to set each one up.

I'd propose splitting our set of backends into an external/stable set and an internal/experimental set. torchdynamo.list_backends() would only include the stable set, while torchdynamo.list_backends(experimental=True) would include the larger set of backends.

All backends in the stable set should have documentation explaining what they are, and instructions on how to install the needed dependencies to get them working.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions