Shortcuts

Define _TORCH_LIBRARY_FRAGMENT

Define Documentation

_TORCH_LIBRARY_FRAGMENT(ns, m, uid)

The above macro requires an extra unique identifier (uid) to prevent variable name collisions This can happen if TORCH_LIBRARY_FRAGMENT is called multiple times with the same namespace in the same translation unit.

Note that the TORCH_LIBRARY variant doesn’t run into this problem, because it enforces that it can only be called once for a given namespace.

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