mirror of
https://github.com/amd/blis.git
synced 2026-05-13 02:25:39 +00:00
Fixed substitution bug in configure.
Details: - Fixed a bug in configure related to the building of the so-called config list. When processing the contents of config_registry, configure creates a series of structures and list that allow for various mappings related to configuration families, subconfigs, and kernel sets. Two of those lists are built via subsitituion of umbrella families with their subconfig members, and one of those lists was improperly performing the subtitution in a way that would erroneously match on partial umbrella family names. That code was changed to match the code that was already doing the subtitution properly, via substitute_words(). - Added comments noting the importance of using substitute_words() in both instances.
This commit is contained in:
19
configure
vendored
19
configure
vendored
@@ -692,13 +692,21 @@ read_registry_file()
|
||||
if [ "${mem}" != "${mems_mem}" ]; then
|
||||
|
||||
#clist="${config_registry[$config]}"
|
||||
clist=$(query_array "config_registry" ${config})
|
||||
clisttmp=$(query_array "config_registry" ${config})
|
||||
|
||||
# Replace the current config with its constituent config set,
|
||||
# canonicalize whitespace, and then remove duplicate config
|
||||
# set names, if they exist. Finally, update the config registry
|
||||
# with the new config list.
|
||||
newclist=$(echo -e "${clist}" | sed -e "s/${mem}/${mems_mem}/g")
|
||||
# NOTE: WE must use substitute_words() rather than a simple sed
|
||||
# expression because we need to avoid matching partial strings.
|
||||
# For example, if clist above contains "foo bar barsk" and we use
|
||||
# sed to substitute "bee boo" as the members of "bar", the
|
||||
# result would (incorrectly) be "foo bee boo bee boosk",
|
||||
# which would then get reduced, via rm_duplicate_words(), to
|
||||
# "foo bee boo boosk".
|
||||
#newclist=$(echo -e "${clist}" | sed -e "s/${mem}/${mems_mem}/g")
|
||||
newclist=$(substitute_words "${mem}" "${mems_mem}" "${clisttmp}")
|
||||
newclist=$(canonicalize_ws "${newclist}")
|
||||
newclist=$(rm_duplicate_words "${newclist}")
|
||||
|
||||
@@ -781,6 +789,13 @@ read_registry_file()
|
||||
# canonicalize whitespace, and then remove duplicate kernel
|
||||
# set names, if they exist. Finally, update the kernel registry
|
||||
# with the new kernel list.
|
||||
# NOTE: WE must use substitute_words() rather than a simple sed
|
||||
# expression because we need to avoid matching partial strings.
|
||||
# For example, if klist above contains "foo bar barsk" and we use
|
||||
# sed to substitute "bee boo" as the members of "bar", the
|
||||
# result would (incorrectly) be "foo bee boo bee boosk",
|
||||
# which would then get reduced, via rm_duplicate_words(), to
|
||||
# "foo bee boo boosk".
|
||||
#newklist=$(echo -e "${klisttmp}" | sed -e "s/${ker}/${kers_ker}/g")
|
||||
newklist=$(substitute_words "${ker}" "${kers_ker}" "${klisttmp}")
|
||||
newklist=$(canonicalize_ws "${newklist}")
|
||||
|
||||
Reference in New Issue
Block a user