Closed getianao closed 10 months ago
This will become a general problem in the next release on Fedora because rawhide has moved to python 3.12 These warning pollute the use of tools that use rocm_agent_enumerator
$ hipcc --version /usr/bin/rocm_agent_enumerator:95: SyntaxWarning: invalid escape sequence '\w' @staticVars(search_name=re.compile("gfx[0-9a-fA-F]+(:[-+:\w]+)?")) /usr/bin/rocm_agent_enumerator:152: SyntaxWarning: invalid escape sequence '\A' line_search_term = re.compile("\A\s+Name:\s+(amdgcn-amd-amdhsa--gfx\d+)") /usr/bin/rocm_agent_enumerator:154: SyntaxWarning: invalid escape sequence '\A' line_search_term = re.compile("\A\s+Name:\s+(gfx\d+)") /usr/bin/rocm_agent_enumerator:175: SyntaxWarning: invalid escape sequence '\w' target_search_term = re.compile("1002:\w+") HIP version: 5.7.31921- clang version 17.0.4 (Fedora 17.0.4-1.fc40) Target: x86_64-redhat-linux-gnu Thread model: posix InstalledDir: /usr/bin
Thank you @getianao patch will be submitted internally and will be part of ROCm 6.1
Now rocm_agent_enumerator will raise warnings when meeting unrecognized escape sequences in some versions of Python3.
This fix uses raw strings to ensure Python not to escape the backslash.