Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue]: rocm_agent_enumerator outputs "SyntaxWarning: invalid escape sequence" with python3.12 #69

Closed
AngryLoki opened this issue Mar 22, 2024 · 1 comment

Comments

@AngryLoki
Copy link

Problem Description

When rocm_agent_enumerator from rocm-6.0.2 release is launched with Python 3.12, it still works, but outputs a wall of warnings:

/usr/sbin/rocm_agent_enumerator
/usr/sbin/rocm_agent_enumerator:95: SyntaxWarning: invalid escape sequence '\w'
  @staticVars(search_name=re.compile("gfx[0-9a-fA-F]+(:[-+:\w]+)?"))
/usr/sbin/rocm_agent_enumerator:152: SyntaxWarning: invalid escape sequence '\A'
  line_search_term = re.compile("\A\s+Name:\s+(amdgcn-amd-amdhsa--gfx\d+)")
/usr/sbin/rocm_agent_enumerator:154: SyntaxWarning: invalid escape sequence '\A'
  line_search_term = re.compile("\A\s+Name:\s+(gfx\d+)")
/usr/sbin/rocm_agent_enumerator:175: SyntaxWarning: invalid escape sequence '\w'
  target_search_term = re.compile("1002:\w+")
gfx000
gfx1030

This change is described here: https://docs.python.org/3/whatsnew/3.12.html#other-language-changes

Could you update all re.compile("...\d...and other escaped chars") to re.compile(r"...") in https://github.com/ROCm/rocminfo/blob/master/rocm_agent_enumerator in next release?

The change is trivial, so no pull request. Thanks!

Operating System

Gentoo

CPU

GPU

Other

Other

No response

ROCm Version

ROCm 6.0.0

ROCm Component

rocminfo

Steps to Reproduce

No response

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

No response

AngryLoki added a commit to AngryLoki/gentoo that referenced this issue Mar 24, 2024
…python 3.12+

Upstream bug: ROCm/rocminfo#69

Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
AngryLoki added a commit to AngryLoki/gentoo that referenced this issue Mar 26, 2024
…python 3.12+

Upstream bug: ROCm/rocminfo#69

Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
AngryLoki added a commit to AngryLoki/gentoo that referenced this issue Mar 26, 2024
…python 3.12+

Upstream bug: ROCm/rocminfo#69

Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
AngryLoki added a commit to AngryLoki/gentoo that referenced this issue Mar 30, 2024
…python 3.12+

Upstream bug: ROCm/rocminfo#69

Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
@AngryLoki
Copy link
Author

It looks like all the necessary changes are already applied in 6.1.0 in 429baf0, so I close this issue

AngryLoki added a commit to AngryLoki/gentoo that referenced this issue May 19, 2024
…python 3.12+

Upstream bug: ROCm/rocminfo#69

Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant