From ebcfdb3b40c25299bd3ade67b6f149f85abadaeb Mon Sep 17 00:00:00 2001 From: Po Yen Chen Date: Wed, 1 Nov 2023 03:28:36 +0800 Subject: [PATCH] Disable the SLP vectorizer to prevent unnecessary wait (#1008) * Disable the SLP vectorizer to prevent unnecessary wait * Add comment to the reason of adding flag * Fix wording --- .../src/tensor_operation_instance/gpu/gemm/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/library/src/tensor_operation_instance/gpu/gemm/CMakeLists.txt b/library/src/tensor_operation_instance/gpu/gemm/CMakeLists.txt index 5edd6c85f4..86dfe4d190 100644 --- a/library/src/tensor_operation_instance/gpu/gemm/CMakeLists.txt +++ b/library/src/tensor_operation_instance/gpu/gemm/CMakeLists.txt @@ -108,13 +108,15 @@ if (ENABLE_PIPELINE_V2_OPT) CK_EXPERIMENTAL_PIPELINE_V2_IGLP_OPT=1 ) + # TODO: The "-vectorize-slp=false" LLVM option is a workaround to prevent inefficient instruction scheduling + # caused by the SLP Vectorizer. Remove this option after fix the SLP Vectorizer issue. # layout=NT set_source_files_properties(device_gemm_xdl_f16_f16_f16/km_kn_mn_default_pipeline_v2_opt_instance.cpp PROPERTIES - COMPILE_OPTIONS ";;" + COMPILE_OPTIONS ";-mllvm;-vectorize-slp=false" COMPILE_DEFINITIONS "${WAVES_PER_EU_DEFS};${IGLP_OPT_DEFS}") # layout=NN set_source_files_properties(device_gemm_xdl_f16_f16_f16/km_nk_mn_default_pipeline_v2_opt_instance.cpp PROPERTIES - COMPILE_OPTIONS ";;" + COMPILE_OPTIONS ";-mllvm;-vectorize-slp=false" COMPILE_DEFINITIONS "${WAVES_PER_EU_DEFS};${IGLP_OPT_DEFS}") # layout=TT set_source_files_properties(device_gemm_xdl_f16_f16_f16/mk_kn_mn_default_pipeline_v2_opt_instance.cpp PROPERTIES