Skip to content

Commit 7e835e8

Browse files
committed
Enable fp32 tests for Windows
Signed-off-by: cyy <[email protected]>
1 parent ea4d075 commit 7e835e8

File tree

8 files changed

+7
-50
lines changed

8 files changed

+7
-50
lines changed

CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,6 @@ endif()
175175
################################################################################
176176

177177
get_filelist("get_fbgemm_generic_srcs(with_base=True)" FBGEMM_GENERIC_SRCS)
178-
if(MSVC)
179-
list(FILTER FBGEMM_GENERIC_SRCS EXCLUDE REGEX "src/fp32/.*\\.cc$")
180-
endif()
181178

182179
set(fbgemm_generic_defs "${fbgemm_arm_defs}")
183180
if(FBGEMM_LIBRARY_TYPE STREQUAL STATIC)

bench/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,6 @@ if(FBGEMM_BUILD_BENCHMARKS)
9595
file(GLOB BENCH_LIST "*Benchmark.cc")
9696
endif()
9797

98-
if(MSVC)
99-
# NOTE: Skip FP32 benchmark for MSVC until intrinsic kernels are implemented
100-
list(FILTER BENCH_LIST EXCLUDE REGEX "FP32Benchmark\\.cc$")
101-
endif()
102-
10398
foreach(BENCH_FILE ${BENCH_LIST})
10499
get_filename_component(BENCH_NAME ${BENCH_FILE} NAME_WE)
105100
get_filename_component(BENCH_FILENAME ${BENCH_FILE} NAME)

cmake/modules/CxxCompilerSetup.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ BLOCK_PRINT(
4040
)
4141

4242
# Strip all symbols from the .SO file after building
43-
if(NOT MSVC AND NOT APPLE)
43+
if(NOT WIN32 AND NOT APPLE)
4444
add_link_options($<$<CONFIG:RELEASE>:-s>)
4545
endif()
4646

defs.bzl

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def get_fbgemm_generic_srcs(with_base = False, msvc = False, buck = False):
4747
"src/FbgemmSparseDense.cc",
4848
"src/FbgemmI8Spmdm.cc",
4949
"src/FbgemmPackMatrixB.cc",
50+
"src/fp32/FbgemmFP32.cc",
5051
"src/GenerateKernelDirectConvU8S8S32ACC32.cc",
5152
"src/GenerateKernel.cc",
5253
"src/GenerateKernelU8S8S32ACC16.cc",
@@ -73,17 +74,7 @@ def get_fbgemm_generic_srcs(with_base = False, msvc = False, buck = False):
7374
"src/TransposeUtils.cc",
7475
] + (get_fbgemm_base_srcs() if with_base else [])
7576

76-
fp32sources = [
77-
"src/fp32/FbgemmFP32.cc",
78-
]
79-
80-
if buck:
81-
return select({
82-
"DEFAULT": sources + fp32sources,
83-
"ovr_config//compiler:cl": sources,
84-
})
85-
86-
return sources + fp32sources if not msvc else sources
77+
return sources
8778

8879
def get_fbgemm_public_headers():
8980
return [

include/fbgemm/FbgemmFP16.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
#include <cpuinfo.h>
1515

16+
#include "fbgemm/FbgemmFPCommon.h"
1617
#include "./FbgemmPackMatrixB.h" // @manual
1718
#include "./FloatConversion.h" // @manual
1819
#include "./Types.h" // @manual
@@ -31,17 +32,6 @@ struct TypeConverter<float16> {
3132

3233
using PackedGemmMatrixFP16 = PackedGemmMatrixB<float16>;
3334

34-
template <typename T>
35-
FBGEMM_API void cblas_gemm_compute(
36-
const matrix_op_t transa,
37-
const int m,
38-
const float* A,
39-
const PackedGemmMatrixB<T>& Bp,
40-
const float beta,
41-
float* C,
42-
int thread_id = 0,
43-
int num_threads = 1);
44-
4535
extern template void cblas_gemm_compute<float16>(
4636
const matrix_op_t transa,
4737
const int m,

include/fbgemm/FbgemmFP32.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,6 @@ struct TypeConverter<float> {
2222
using GemmParamsFP32 = GemmParams<float>;
2323
using PackedGemmMatrixFP32 = PackedGemmMatrixB<float>;
2424

25-
template <typename T, int _kernel_ncol_blocks, int _brow>
26-
void cblas_gemm_compute(
27-
const matrix_op_t transa,
28-
const int m,
29-
const float* A,
30-
const PackedGemmMatrixB<T>& Bp,
31-
const float beta,
32-
float* C,
33-
int thread_id = 0,
34-
int num_threads = 1);
35-
3625
extern template void cblas_gemm_compute(
3726
const matrix_op_t transa,
3827
const int m,

src/fp32/FbgemmFP32.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ namespace {
3232
// Here with kernel_ncol_blocks = 2, we can provide up to 6x2 kernels, due to
3333
// the restrictions of ymm register numbers (16).
3434
constexpr kernel_array_t<float> kernel_f32_avx2 = {
35-
#ifndef __aarch64__
35+
#if !defined(__aarch64__) && !defined(_MSC_VER)
3636
nullptr,
3737
gemmkernel_1x2_Avx2_fp32_fA0fB0fC0,
3838
gemmkernel_2x2_Avx2_fp32_fA0fB0fC0,
@@ -45,7 +45,7 @@ constexpr kernel_array_t<float> kernel_f32_avx2 = {
4545
#endif
4646

4747
constexpr kernel_array_t<float> kernel_f32_avx512 = {
48-
#ifndef __aarch64__
48+
#if !defined(__aarch64__) && !defined(_MSC_VER)
4949
nullptr,
5050
gemmkernel_1x2_Avx512_fp32_fA0fB0fC0,
5151
gemmkernel_2x2_Avx512_fp32_fA0fB0fC0,
@@ -67,7 +67,7 @@ constexpr kernel_array_t<float> kernel_f32_avx512 = {
6767

6868
// clang-format on
6969
constexpr kernel_array_t<float> kernel_f32_avx512_256 = {
70-
#ifndef __aarch64__
70+
#if !defined(__aarch64__) && !defined(_MSC_VER)
7171
nullptr,
7272
gemmkernel_1x2_Avx2_fp32_fA0fB0fC0,
7373
gemmkernel_2x2_Avx2_fp32_fA0fB0fC0,

test/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,6 @@ foreach(TEST_FILE ${TEST_LIST})
117117
endif()
118118
endif()
119119

120-
if(MSVC AND TEST_FILE MATCHES "FP32Test.cc$")
121-
# NOTE: Skip FP32 test for MSVC until intrinsic kernels are implemented
122-
continue()
123-
endif()
124-
125120
message(STATUS "Processing: ${TEST_FILE}")
126121

127122
get_filename_component(TEST_NAME "${TEST_FILE}" NAME_WE)

0 commit comments

Comments
 (0)