mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Fix dll linkage for tensor type ids (#20547)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/20547 - Differential Revision: D15359988 fbshipit-source-id: 680115a6b73f64c9b02f86eccb8feb799adc6c90
This commit is contained in:
committed by
Facebook Github Bot
parent
410c7210db
commit
be1f83c350
@ -87,13 +87,13 @@ inline c10::TensorTypeId TensorTypeIdRegistrar::id() const noexcept {
|
||||
return id_;
|
||||
}
|
||||
|
||||
#define C10_DECLARE_TENSOR_TYPE(TensorName) \
|
||||
#define C10_DECLARE_TENSOR_TYPE(TensorName) \
|
||||
C10_API ::c10::TensorTypeId TensorName()
|
||||
|
||||
#define C10_DEFINE_TENSOR_TYPE(TensorName) \
|
||||
::c10::TensorTypeId TensorName() { \
|
||||
#define C10_DEFINE_TENSOR_TYPE(TensorName) \
|
||||
C10_EXPORT ::c10::TensorTypeId TensorName() { \
|
||||
static ::c10::TensorTypeIdRegistrar registration_raii; \
|
||||
return registration_raii.id(); \
|
||||
return registration_raii.id(); \
|
||||
}
|
||||
|
||||
C10_DECLARE_TENSOR_TYPE(UndefinedTensorId);
|
||||
|
Reference in New Issue
Block a user