From a684a79addb847820b1a37b48e47110c74a0eb43 Mon Sep 17 00:00:00 2001 From: cyy Date: Thu, 5 Oct 2023 22:39:02 -0700 Subject: [PATCH] Fix more MSVC inconsistent DLL linkage (#2064) Summary: Pull Request resolved: https://github.com/pytorch/FBGEMM/pull/2064 Reviewed By: spcyppt Differential Revision: D49978436 Pulled By: q10 fbshipit-source-id: 74ec5bcc121b79774e20e14480a624e35f28f1e7 --- src/EmbeddingSpMDMAvx2.cc | 2 +- src/FbgemmBfloat16ConvertAvx2.cc | 1 + src/FbgemmBfloat16ConvertAvx512.cc | 1 + src/FbgemmFloat16ConvertAvx2.cc | 1 + src/FbgemmFloat16ConvertAvx512.cc | 1 + 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/EmbeddingSpMDMAvx2.cc b/src/EmbeddingSpMDMAvx2.cc index d616bfda8a..e6d3ed4a7b 100644 --- a/src/EmbeddingSpMDMAvx2.cc +++ b/src/EmbeddingSpMDMAvx2.cc @@ -6,7 +6,7 @@ * LICENSE file in the root directory of this source tree. */ -#include +#define FBGEMM_EXPORTS #include #include "RefImplementations.h" #include "fbgemm/FbgemmEmbedding.h" diff --git a/src/FbgemmBfloat16ConvertAvx2.cc b/src/FbgemmBfloat16ConvertAvx2.cc index f1cc785ee2..b044dd4460 100644 --- a/src/FbgemmBfloat16ConvertAvx2.cc +++ b/src/FbgemmBfloat16ConvertAvx2.cc @@ -10,6 +10,7 @@ (defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86))) #include #endif +#define FBGEMM_EXPORTS #include "fbgemm/FbgemmConvert.h" namespace fbgemm { diff --git a/src/FbgemmBfloat16ConvertAvx512.cc b/src/FbgemmBfloat16ConvertAvx512.cc index 0111bc6e7d..b74d9466f3 100644 --- a/src/FbgemmBfloat16ConvertAvx512.cc +++ b/src/FbgemmBfloat16ConvertAvx512.cc @@ -10,6 +10,7 @@ (defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86))) #include #endif +#define FBGEMM_EXPORTS #include "fbgemm/FbgemmConvert.h" namespace fbgemm { diff --git a/src/FbgemmFloat16ConvertAvx2.cc b/src/FbgemmFloat16ConvertAvx2.cc index 5778428fc8..3cc1ad6e28 100644 --- a/src/FbgemmFloat16ConvertAvx2.cc +++ b/src/FbgemmFloat16ConvertAvx2.cc @@ -10,6 +10,7 @@ (defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86))) #include #endif +#define FBGEMM_EXPORTS #include "fbgemm/FbgemmConvert.h" namespace fbgemm { diff --git a/src/FbgemmFloat16ConvertAvx512.cc b/src/FbgemmFloat16ConvertAvx512.cc index 380eaa2713..5039f88240 100644 --- a/src/FbgemmFloat16ConvertAvx512.cc +++ b/src/FbgemmFloat16ConvertAvx512.cc @@ -10,6 +10,7 @@ (defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86))) #include #endif +#define FBGEMM_EXPORTS #include "fbgemm/FbgemmConvert.h" namespace fbgemm {