Summary
The profiling adapter collapses distinct failure modes into unsupported_counter and can misclassify truly unsupported metrics as profile_failed when ncu exits non-zero. It also omits important metadata such as profiler version and evidence-tier semantics from persisted profile records.
Evidence
src/kernel_tuner/profiling/adapter.py:96
src/kernel_tuner/profiling/adapter.py:204
src/kernel_tuner/profiling/adapter.py:225
docs/research/04_signal_and_profiling_plan.md:102
docs/specs/profiling_adapter.md:68
docs/specs/profiling_adapter.md:91
Why This Matters
The research plan requires a clear distinction between unsupported counters and counters missing for other reasons. Missing metadata also makes later auditability weaker.
Expected Fix
- Separate parser failure, regex miss, unsupported metric, and general profiler invocation failure.
- Persist profiler version and relevant counter-set semantics in the measurement metadata.
- Add targeted tests for failure classification.
Acceptance Criteria
- Unsupported counters are distinguishable from missing/uncollected counters.
- Persisted records include enough metadata to audit reportable vs diagnostic evidence.
- Tests cover non-zero
ncu exits and missing-row cases.
Summary
The profiling adapter collapses distinct failure modes into
unsupported_counterand can misclassify truly unsupported metrics asprofile_failedwhenncuexits non-zero. It also omits important metadata such as profiler version and evidence-tier semantics from persisted profile records.Evidence
src/kernel_tuner/profiling/adapter.py:96src/kernel_tuner/profiling/adapter.py:204src/kernel_tuner/profiling/adapter.py:225docs/research/04_signal_and_profiling_plan.md:102docs/specs/profiling_adapter.md:68docs/specs/profiling_adapter.md:91Why This Matters
The research plan requires a clear distinction between unsupported counters and counters missing for other reasons. Missing metadata also makes later auditability weaker.
Expected Fix
Acceptance Criteria
ncuexits and missing-row cases.