Skip to content

Fix PytestUnknownMarkWarning: Unknown pytest.mark.adreno_clml#19602

Merged
tlopex merged 2 commits into
apache:mainfrom
cchung100m:fix_UnknownMarkWarning
May 26, 2026
Merged

Fix PytestUnknownMarkWarning: Unknown pytest.mark.adreno_clml#19602
tlopex merged 2 commits into
apache:mainfrom
cchung100m:fix_UnknownMarkWarning

Conversation

@cchung100m
Copy link
Copy Markdown
Contributor

Hi Commiters,

This PR fixs PytestUnknownMarkWarning: Unknown pytest.mark.adreno_clml - is this a typo?

[2026-05-25T07:10:30.746Z] =============================== warnings summary ===============================
[2026-05-25T07:10:30.746Z] python/tvm/testing/utils.py:651
[2026-05-25T07:10:30.746Z] /workspace/python/tvm/testing/utils.py:651: PytestUnknownMarkWarning: Unknown pytest.mark.adreno_clml - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
[2026-05-25T07:10:30.746Z] yield getattr(pytest.mark, self.name)
[2026-05-25T07:10:30.746Z]
[2026-05-25T07:10:30.746Z] python/tvm/testing/utils.py:651
[2026-05-25T07:10:30.746Z] /workspace/python/tvm/testing/utils.py:651: PytestUnknownMarkWarning: Unknown pytest.mark.adreno_opencl_vulkan - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
[2026-05-25T07:10:30.746Z] yield getattr(pytest.mark, self.name)
[2026-05-25T07:10:30.746Z

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the pyproject.toml file to register new pytest markers for Adreno-specific tests. The reviewer pointed out that the list of markers is incomplete and suggested adding several missing markers, such as adreno_vulkan and adreno_opencl, to prevent PytestUnknownMarkWarning during test execution.

Comment thread pyproject.toml
Comment on lines +185 to +188
markers = [
"adreno_clml: Mark a test as using adreno_clml",
"adreno_opencl_vulkan: Mark a test as using adreno_opencl_vulkan",
]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The registration of markers is incomplete. Based on the features defined in tests/python/relax/backend/adreno/utils.py, there are other Adreno-specific features that will trigger PytestUnknownMarkWarning when used. Specifically, adreno_vulkan, adreno_opencl, and adreno_opencl_real should also be registered to ensure all Adreno test markers are recognized by pytest.

markers = [
  "adreno_clml: Mark a test as using adreno_clml",
  "adreno_opencl_vulkan: Mark a test as using adreno_opencl_vulkan",
  "adreno_vulkan: Mark a test as using adreno_vulkan",
  "adreno_opencl: Mark a test as using adreno_opencl",
  "adreno_opencl_real: Mark a test as using adreno_opencl_real",
]

@cchung100m cchung100m marked this pull request as ready for review May 25, 2026 16:33
Copy link
Copy Markdown
Member

@tlopex tlopex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this. Could you please register all Adreno Feature marks, not only the two that appeared in the warning?

tests/python/relax/backend/adreno/utils.py defines five pytest marks through tvm.testing.Feature:

  • adreno_clml
  • adreno_opencl_vulkan
  • adreno_vulkan
  • adreno_opencl
  • adreno_opencl_real

With the current change, adreno_vulkan, adreno_opencl, and adreno_opencl_real can still trigger PytestUnknownMarkWarning when those tests are collected. Please add those three markers to pyproject.toml as well.

@tlopex tlopex merged commit 4dad956 into apache:main May 26, 2026
10 checks passed
@cchung100m cchung100m deleted the fix_UnknownMarkWarning branch May 26, 2026 12:01
@cchung100m
Copy link
Copy Markdown
Contributor Author

Thanks to @tlopex 😄

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

Successfully merging this pull request may close these issues.

2 participants