summaryrefslogtreecommitdiff
path: root/c10
diff options
context:
space:
mode:
authorSebastian Messmer <messmer@fb.com>2019-01-08 20:22:41 -0800
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2019-01-08 20:31:45 -0800
commit905df3943acde2ea74f4bb31348b0f1269c613fc (patch)
tree38d9aabb0a5114491d1d9c2860070885afe2da3b /c10
parentd562840910b8743b6ea476a47c4df53a8531fd14 (diff)
downloadpytorch-905df3943acde2ea74f4bb31348b0f1269c613fc.tar.gz
pytorch-905df3943acde2ea74f4bb31348b0f1269c613fc.tar.bz2
pytorch-905df3943acde2ea74f4bb31348b0f1269c613fc.zip
Fix C10_API/C10_EXPORT for op schema registration (#15324)
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
Diffstat (limited to 'c10')
-rw-r--r--c10/core/dispatch/DispatchTable.h2
-rw-r--r--c10/core/dispatch/OpSchemaRegistration.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/c10/core/dispatch/DispatchTable.h b/c10/core/dispatch/DispatchTable.h
index 13e904e838..936d780b25 100644
--- a/c10/core/dispatch/DispatchTable.h
+++ b/c10/core/dispatch/DispatchTable.h
@@ -151,4 +151,4 @@ class DispatchTable final {
* 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();
diff --git a/c10/core/dispatch/OpSchemaRegistration.h b/c10/core/dispatch/OpSchemaRegistration.h
index 28f3b6987c..dc81c05d31 100644
--- a/c10/core/dispatch/OpSchemaRegistration.h
+++ b/c10/core/dispatch/OpSchemaRegistration.h
@@ -11,7 +11,7 @@
*/
#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; \
}