Rate this Page

Define TORCH_LIBRARY_FRAGMENT#

Define Documentation#

TORCH_LIBRARY_FRAGMENT(ns, m)#

This macro is a version of TORCH_LIBRARY() that doesn’t enforce that there is only one library (it is a “fragment”).

This is used inside the PerOpRegistration.cpp file, as well as in places where all op registrations within the same namespace cannot be easily put into one macro block (this is mostly the case for custom ops in fbcode that were ported from the old API)