Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15324
This was missing but needs to be here, otherwise we can't register schemas without linker errors.
Reviewed By: ezyang
Differential Revision:
D13500679
fbshipit-source-id:
ba06351cb8ae09ec456cb93e527d388ace578fbb
* we can't rely on the one-definition-rule.
*/
template <class OpSchemaDef>
-c10::DispatchTable<OpSchemaDef>& c10_dispatch_table();
+C10_API c10::DispatchTable<OpSchemaDef>& c10_dispatch_table();
*/
#define C10_DEFINE_OP_SCHEMA(OpSchemaDef) \
template<> \
- c10::DispatchTable<OpSchemaDef>& c10_dispatch_table<OpSchemaDef>() { \
+ C10_EXPORT c10::DispatchTable<OpSchemaDef>& c10_dispatch_table<OpSchemaDef>() { \
static c10::DispatchTable<OpSchemaDef> singleton; \
return singleton; \
}