Shortcuts

torch_version_ge

torchtune.utils.torch_version_ge(version: str) bool[source]

Check if torch version is greater than or equal to the given version.

Parameters:

version (str) – The torch version to compare against

Returns:

True if torch version is greater than or equal to the given version.

Return type:

bool

Example

>>> print(torch.__version__)
2.4.0
>>> torch_version_ge("2.0")
True

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources