diff --git a/CMakeLists.txt b/CMakeLists.txt index cda86b1cd5..5d889cdbba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,12 +29,11 @@ set(FBGEMM_GENERIC_SRCS src/ExecuteKernel.cc src/ExecuteKernelU8S8.cc src/Fbgemm.cc src/FbgemmFP16.cc - src/FbgemmFP16UKernels.cc src/FbgemmI8Spmdm.cc src/GenerateKernelU8S8S32ACC16.cc - src/GenerateKernelU8S8S32ACC16_avx512.cc + src/GenerateKernelU8S8S32ACC16Avx512.cc src/GenerateKernelU8S8S32ACC32.cc - src/GenerateKernelU8S8S32ACC32_avx512.cc + src/GenerateKernelU8S8S32ACC32Avx512.cc src/PackAMatrix.cc src/PackAWithIm2Col.cc src/PackBMatrix.cc @@ -64,13 +63,14 @@ endif() #All the source files that either use avx2 instructions statically set(FBGEMM_AVX2_SRCS + src/FbgemmFP16UKernelsAvx2.cc src/FbgemmI8DepthwiseAvx2.cc src/OptimizedKernelsAvx2.cc src/QuantUtilsAvx2.cc - src/Utils_avx2.cc) + src/UtilsAvx2.cc) #All the source files that use avx512 instructions statically -set(FBGEMM_AVX512_SRCS src/Utils_avx512.cc) +set(FBGEMM_AVX512_SRCS src/UtilsAvx512.cc) set(FBGEMM_PUBLIC_HEADERS include/fbgemm/Fbgemm.h include/fbgemm/OutputProcessing-inl.h @@ -93,8 +93,6 @@ set_target_properties(fbgemm_generic fbgemm_avx2 fbgemm_avx512 PROPERTIES CXX_EXTENSIONS NO CXX_VISIBILITY_PRESET hidden) -target_compile_options(fbgemm_generic PRIVATE - "-m64" "-mavx2" "-mfma" "-masm=intel") target_compile_options(fbgemm_avx2 PRIVATE "-m64" "-mavx2" "-mfma" "-masm=intel") target_compile_options(fbgemm_avx512 PRIVATE diff --git a/include/fbgemm/Fbgemm.h b/include/fbgemm/Fbgemm.h index c54bf24545..5fedd285b1 100644 --- a/include/fbgemm/Fbgemm.h +++ b/include/fbgemm/Fbgemm.h @@ -9,7 +9,6 @@ /** * Top level include file for FBGEMM. */ -#include #include #include #include diff --git a/src/FbgemmFP16.cc b/src/FbgemmFP16.cc index 6d44c7443e..2af1f891f5 100644 --- a/src/FbgemmFP16.cc +++ b/src/FbgemmFP16.cc @@ -10,7 +10,7 @@ #include #include -#include "FbgemmFP16UKernels.h" +#include "FbgemmFP16UKernelsAvx2.h" using namespace std; diff --git a/src/FbgemmFP16UKernels.cc b/src/FbgemmFP16UKernelsAvx2.cc similarity index 99% rename from src/FbgemmFP16UKernels.cc rename to src/FbgemmFP16UKernelsAvx2.cc index d915765460..8a0cb0da3f 100644 --- a/src/FbgemmFP16UKernels.cc +++ b/src/FbgemmFP16UKernelsAvx2.cc @@ -4,7 +4,7 @@ * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ -#include "FbgemmFP16UKernels.h" +#include "FbgemmFP16UKernelsAvx2.h" namespace fbgemm { diff --git a/src/FbgemmFP16UKernels.h b/src/FbgemmFP16UKernelsAvx2.h similarity index 98% rename from src/FbgemmFP16UKernels.h rename to src/FbgemmFP16UKernelsAvx2.h index d35d431307..405333200d 100644 --- a/src/FbgemmFP16UKernels.h +++ b/src/FbgemmFP16UKernelsAvx2.h @@ -7,8 +7,6 @@ #ifndef FBGEMM_UKERNELS #define FBGEMM_UKERNELS #include -#include -#include #include "fbgemm/Types.h" namespace fbgemm { diff --git a/src/GenerateKernelU8S8S32ACC16_avx512.cc b/src/GenerateKernelU8S8S32ACC16Avx512.cc similarity index 100% rename from src/GenerateKernelU8S8S32ACC16_avx512.cc rename to src/GenerateKernelU8S8S32ACC16Avx512.cc diff --git a/src/GenerateKernelU8S8S32ACC32_avx512.cc b/src/GenerateKernelU8S8S32ACC32Avx512.cc similarity index 100% rename from src/GenerateKernelU8S8S32ACC32_avx512.cc rename to src/GenerateKernelU8S8S32ACC32Avx512.cc diff --git a/src/Utils_avx2.cc b/src/UtilsAvx2.cc similarity index 100% rename from src/Utils_avx2.cc rename to src/UtilsAvx2.cc diff --git a/src/Utils_avx512.cc b/src/UtilsAvx512.cc similarity index 100% rename from src/Utils_avx512.cc rename to src/UtilsAvx512.cc diff --git a/src/codegen_fp16fp32.cc b/src/codegen_fp16fp32.cc index 8dd3166105..17bb1130fc 100644 --- a/src/codegen_fp16fp32.cc +++ b/src/codegen_fp16fp32.cc @@ -65,7 +65,7 @@ int main() { // open all files ofstream srcfile; - srcfile.open("FbgemmFP16UKernels.cc"); + srcfile.open("FbgemmFP16UKernelsAvx2.cc"); srcfile << "/*\n" " * Copyright (c) Facebook, Inc. and its affiliates.\n" @@ -73,14 +73,14 @@ int main() { " * This source code is licensed under the BSD-style license found in the\n" " * LICENSE file in the root directory of this source tree.\n" " */\n"; - srcfile << "#include \"FbgemmFP16UKernels.h\"\n\n"; + srcfile << "#include \"FbgemmFP16UKernelsAvx2.h\"\n\n"; srcfile << "namespace fbgemm {\n\n"; if (iaca) { srcfile << "#include \"iacaMarks.h\"\n"; } ofstream hdrfile; - hdrfile.open("FbgemmFP16UKernels.h"); + hdrfile.open("FbgemmFP16UKernelsAvx2.h"); hdrfile << "/*\n" " * Copyright (c) Facebook, Inc. and its affiliates.\n" @@ -92,8 +92,6 @@ int main() { hdrfile << "#ifndef FBGEMM_UKERNELS\n"; hdrfile << "#define FBGEMM_UKERNELS\n"; hdrfile << "#include \n"; - hdrfile << "#include \n"; - hdrfile << "#include \n"; hdrfile << "#include \"fbgemm/Types.h\"\n\n"; hdrfile << "namespace fbgemm {\n\n"; hdrfile << "using fp16 = float16;\n";