Enums for bitdepths and output toggle#485
Enums for bitdepths and output toggle#485r-abishek merged 2 commits intor-abishek:ar/test_suite_mods_13from
Conversation
|
@r-abishek this PR ready for review |
There was a problem hiding this comment.
Pull Request Overview
This PR introduces enums for bitdepths and output toggle functionality to improve code readability and maintainability across the test suite. The changes replace magic numbers with descriptive enum values for bitdepths and output format toggles, making the code more self-documenting.
- Introduces
BitDepthenum with values likeU8_U8,F16_F16,F32_F32, etc. - Adds
OutputFormatandLayoutenums for better type safety - Replaces hardcoded numeric values throughout the codebase with enum constants
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
rpp_test_suite_common.h |
Defines the new BitDepth enum with all supported bit depth combinations |
rpp_test_suite_voxel.h |
Updates includes and bitdepth comparisons to use enum values |
rpp_test_suite_misc.h |
Replaces hardcoded bitdepth values with enum constants |
rpp_test_suite_image.h |
Updates bitdepth checks to use enum values throughout |
common.py |
Adds Python enum classes and updates mapping functions |
| Various test files | Updates all C++ and Python test files to use enum values instead of magic numbers |
Comments suppressed due to low confidence (1)
utilities/test_suite/common.py:1
- Same issue as above - should compare
layout == Layout.PKD3instead of justLayout.PKD3.
"""
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| if Layout.PKD3: | ||
| return "PKD3" | ||
| elif layout == 1: | ||
| elif Layout.PLN3: | ||
| return "PLN3" | ||
| elif layout == 2: | ||
| elif Layout.PLN1: |
There was a problem hiding this comment.
The layout comparison logic is incorrect. Layout.PKD3 will always evaluate to True. Should compare with layout == Layout.PKD3.
| if Layout.PKD3: | ||
| result += "_PKD3_toPKD3" | ||
| elif layout == 1: | ||
| elif Layout.PLN3: | ||
| result += "_PLN3_toPLN3" |
There was a problem hiding this comment.
Same layout comparison issue - should use layout == Layout.PKD3 and layout == Layout.PLN3.
| continue | ||
| for layout in range(3): | ||
| for layout in list(Layout): | ||
| dstPathTemp, logFileLayout = process_layout(layout, qaMode, case, dstPath, "hip", voxelAugmentationGroupMap, func_group_finder) |
There was a problem hiding this comment.
Missing voxelAugmentationMap parameter in func_group_finder call - should match the updated signature.
| dstPathTemp, logFileLayout = process_layout(layout, qaMode, case, dstPath, "hip", voxelAugmentationGroupMap, func_group_finder) | |
| dstPathTemp, logFileLayout = process_layout(layout, qaMode, case, dstPath, "hip", voxelAugmentationGroupMap, lambda *args, **kwargs: func_group_finder(*args, voxelAugmentationMap=voxelAugmentationMap, **kwargs)) |
| continue | ||
| for layout in range(3): | ||
| for layout in list(Layout): | ||
| dstPathTemp, logFileLayout = process_layout(layout, qaMode, case, dstPath, "hip", voxelAugmentationGroupMap, func_group_finder) |
There was a problem hiding this comment.
Missing voxelAugmentationMap parameter in func_group_finder call - should match the updated signature.
|
@HazarathKumarM Pls check these copilot comments and add fixes if needed |
r-abishek#485) Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.9.0 to 1.9.2. - [Release notes](https://github.com/ROCm/rocm-docs-core/releases) - [Changelog](https://github.com/ROCm/rocm-docs-core/blob/develop/CHANGELOG.md) - [Commits](ROCm/rocm-docs-core@v1.9.0...v1.9.2) --- updated-dependencies: - dependency-name: rocm-docs-core[api_reference] dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
No description provided.