Commit 760077b
[rocm-libraries] ROCm/rocm-libraries#7209 (commit c07faaa)
[tensilelite] Fix ISA sentinel type drift in validParameters
(#7209)
## Motivation
Test failure in #7162.
## Technical Details
validParameters["ISA"] is set in two places with two different
representations of the (0,0,0) "any ISA" sentinel:
- ValidParameters.py:66 (import-time default): plain tuple (0,0,0)
- GlobalParameters.py:673 (assignGlobalParameters narrow-down):
IsaVersion(0,0,0) (a SemanticVersion NamedTuple)
Solution.py caches a snapshot of validParameters' allowed-value types at
import time as _expectedParamTypes. Once any code path runs
assignGlobalParameters, the cached snapshot still records {tuple,
SemanticVersion} for "ISA" while the live dict only contains
{SemanticVersion}, so the snapshot goes stale.
Align the import-time sentinel with the runtime one by using
IsaVersion(0,0,0) in both places. Backward compatible because
SemanticVersion is a NamedTuple subclass of tuple, so any isinstance(x,
tuple) checks still hold.
## Test Plan
Run existing tests.
## Test Result
Pass
## Submission Checklist
- [x] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.1 parent 30353c7 commit 760077b
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
66 | | - | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
0 commit comments