Rate this Page

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.