Skip to content

Commit da91065

Browse files
ThyreCrivella
andauthored
Make amdgcn regex more restrictive
Do not allow patterns like `gfx10--generic` Co-authored-by: Davide Grassano <[email protected]>
1 parent afa6558 commit da91065

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

easybuild/tools/options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@ def validate(self):
10071007
amdgcn_cc_regex = re.compile(r'gfx[0-9]+[a-z]?$')
10081008
# Generic convention.
10091009
# Regex is not perfect, as it doesn't catch gfx[...]--generic
1010-
amdgcn_generic_regex = re.compile(r'gfx[0-9]+[-]?[0-9]?-generic$')
1010+
amdgcn_generic_regex = re.compile(r'gfx[0-9]+(\-[0-9])?-generic$')
10111011
faulty_amdgcn_ccs = [x for x in self.options.amdgcn_capabilities
10121012
if not amdgcn_cc_regex.match(x) and not amdgcn_generic_regex.match(x)]
10131013
if faulty_amdgcn_ccs:

0 commit comments

Comments
 (0)