Skip to content

Commit d8392c1

Browse files
committed
Fixe cmake config bugs.
1 parent aca7d7e commit d8392c1

3 files changed

Lines changed: 125 additions & 45 deletions

File tree

driver/level2/CMakeLists.txt

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,26 @@ foreach (float_type ${FLOAT_TYPES})
172172
endif ()
173173

174174
else ()
175-
# N.B. BLAS wants to put the U/L from the filename in the *MIDDLE*
176-
GenerateCombinationObjects("${U_SOURCES};${L_SOURCES}" "TRANSA;UNIT" "N;N" "" 3 "" false ${float_type})
175+
# For real number functions
176+
foreach (u_source ${U_SOURCES})
177+
string(REGEX MATCH "[a-z]+" op_name ${u_source})
178+
GenerateCombinationObjects("${u_source}" "UNIT" "N" "" 0 "${op_name}_NU" false ${float_type})
179+
GenerateCombinationObjects("${u_source}" "UNIT" "N" "TRANSA" 0 "${op_name}_TL" false ${float_type})
180+
endforeach ()
181+
182+
foreach (l_source ${L_SOURCES})
183+
string(REGEX MATCH "[a-z]+" op_name ${l_source})
184+
GenerateCombinationObjects("${l_source}" "UNIT" "N" "" 0 "${op_name}_NL" false ${float_type})
185+
GenerateCombinationObjects("${l_source}" "UNIT" "N" "TRANSA" 0 "${op_name}_TU" false ${float_type})
186+
endforeach ()
187+
177188
if (SMP)
178189
GenerateNamedObjects("ger_thread.c" "" "" false "" "" false ${float_type})
179-
GenerateCombinationObjects("${NU_SMP_SOURCES}" "TRANSA;LOWER;UNIT" "N;U;N" "" 2 "" false ${float_type})
190+
foreach(nu_smp_source ${NU_SMP_SOURCES})
191+
string(REGEX MATCH "[a-z]+_[a-z]+" op_name ${nu_smp_source})
192+
GenerateCombinationObjects("${nu_smp_source}" "LOWER;UNIT" "U;N" "" 0 "${op_name}_N" false ${float_type})
193+
GenerateCombinationObjects("${nu_smp_source}" "LOWER;UNIT" "U;N" "TRANSA" 0 "${op_name}_T" false ${float_type})
194+
endforeach()
180195
endif ()
181196
endif ()
182197
endforeach ()

driver/level3/CMakeLists.txt

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,24 @@ foreach (GEMM_DEFINE ${GEMM_DEFINES})
1313
endif ()
1414
endforeach ()
1515

16-
GenerateCombinationObjects("trmm_L.c;trmm_R.c;trsm_L.c;trsm_R.c" "TRANS;UPPER;UNIT" "N;L;N" "" 0)
17-
GenerateCombinationObjects("symm_k.c" "RSIDE;LOWER" "L;U" "NN" 1)
18-
GenerateCombinationObjects("syrk_k.c;syr2k_k.c" "LOWER;TRANS" "U;N" "" 1)
19-
GenerateCombinationObjects("syrk_kernel.c;syr2k_kernel.c" "LOWER" "U" "" 2)
2016

17+
set(TRMM_TRSM_SOURCES
18+
trmm_L.c
19+
trmm_R.c
20+
trsm_L.c
21+
trsm_R.c)
22+
23+
foreach(trmm_trsm_source ${TRMM_TRSM_SOURCES})
24+
string(REGEX MATCH "[a-z]+_[A-Z]+" op_name ${trmm_trsm_source})
25+
GenerateCombinationObjects("${trmm_trsm_source}" "UPPER;UNIT" "L;N" "" 0 "${op_name}N")
26+
GenerateCombinationObjects("${trmm_trsm_source}" "UPPER;UNIT" "L;N" "TRANSA" 0 "${op_name}T")
27+
endforeach()
28+
29+
GenerateCombinationObjects("symm_k.c" "RSIDE;LOWER" "L;U" "NN" 1)
30+
GenerateCombinationObjects("syrk_k.c" "LOWER;TRANS" "U;N" "" 1)
31+
GenerateCombinationObjects("syr2k_k.c" "LOWER;TRANS" "U;N" "" 1)
32+
GenerateCombinationObjects("syrk_kernel.c" "LOWER" "U" "" 2)
33+
GenerateCombinationObjects("syr2k_kernel.c" "LOWER" "U" "" 2)
2134
if (SMP)
2235

2336
# N.B. these do NOT have a float type (e.g. DOUBLE) defined!
@@ -39,13 +52,13 @@ foreach (float_type ${FLOAT_TYPES})
3952
GenerateCombinationObjects("zherk_k.c" "LOWER" "U" "HERK;THREADED_LEVEL3;TRANS;CONJ" 3 "herk_thread_C" false ${float_type})
4053
# Need to set CONJ for trmm and trsm
4154
GenerateCombinationObjects("trmm_L.c" "UPPER;UNIT" "L;N" "CONJ" 0 "trmm_LR" false ${float_type})
42-
GenerateCombinationObjects("trmm_L.c" "UPPER;UNIT" "L;N" "TRANS;CONJ" 0 "trmm_LC" false ${float_type})
55+
GenerateCombinationObjects("trmm_L.c" "UPPER;UNIT" "L;N" "TRANSA;CONJ" 0 "trmm_LC" false ${float_type})
4356
GenerateCombinationObjects("trmm_R.c" "UPPER;UNIT" "L;N" "CONJ" 0 "trmm_RR" false ${float_type})
44-
GenerateCombinationObjects("trmm_R.c" "UPPER;UNIT" "L;N" "TRANS;CONJ" 0 "trmm_RC" false ${float_type})
57+
GenerateCombinationObjects("trmm_R.c" "UPPER;UNIT" "L;N" "TRANSA;CONJ" 0 "trmm_RC" false ${float_type})
4558
GenerateCombinationObjects("trsm_L.c" "UPPER;UNIT" "L;N" "CONJ" 0 "trsm_LR" false ${float_type})
46-
GenerateCombinationObjects("trsm_L.c" "UPPER;UNIT" "L;N" "TRANS;CONJ" 0 "trsm_LC" false ${float_type})
59+
GenerateCombinationObjects("trsm_L.c" "UPPER;UNIT" "L;N" "TRANSA;CONJ" 0 "trsm_LC" false ${float_type})
4760
GenerateCombinationObjects("trsm_R.c" "UPPER;UNIT" "L;N" "CONJ" 0 "trsm_RR" false ${float_type})
48-
GenerateCombinationObjects("trsm_R.c" "UPPER;UNIT" "L;N" "TRANS;CONJ" 0 "trsm_RC" false ${float_type})
61+
GenerateCombinationObjects("trsm_R.c" "UPPER;UNIT" "L;N" "TRANSA;CONJ" 0 "trsm_RC" false ${float_type})
4962

5063
#hemm
5164
GenerateCombinationObjects("zhemm_k.c" "LOWER" "U" "NN" 0 "hemm_L" false ${float_type})

0 commit comments

Comments
 (0)