Define _TORCH_LIBRARY_IMPL#
Defined in File library.h
Define Documentation#
-
_TORCH_LIBRARY_IMPL(ns, k, m, uid)
static void C10_CONCATENATE( \
TORCH_LIBRARY_IMPL_init_##ns##_##k##_, uid)(
torch::Library&); \
static const
torch::detail::TorchLibraryInitC10_CONCATENATE( \
TORCH_LIBRARY_IMPL_static_init_##ns##_##k##_, uid)( \
torch::Library::IMPL, \
&C10_CONCATENATE(TORCH_LIBRARY_IMPL_init_##ns##_##k##_, uid), \
#ns, \
std::make_optional(c10::DispatchKey::k), \
__FILE__, \
__LINE__); \
void C10_CONCATENATE( \
TORCH_LIBRARY_IMPL_init_##ns##_##k##_, uid)(
torch::Library & m)# The above macro requires an extra unique identifier (uid) to prevent variable name collisions.
This can happen if TORCH_LIBRARY_IMPL is called multiple times with the same namespace and dispatch key in the same translation unit.