Skip to content

fix(validation): accept empty kernel-fusion fallback findings - #941

Open
bong-water-water-bong wants to merge 1 commit into
AMD-AGI:mainfrom
bong-water-water-bong:fix/validate-empty-fusion-fallback
Open

fix(validation): accept empty kernel-fusion fallback findings#941
bong-water-water-bong wants to merge 1 commit into
AMD-AGI:mainfrom
bong-water-water-bong:fix/validate-empty-fusion-fallback

Conversation

@bong-water-water-bong

Copy link
Copy Markdown

Summary

The kernel-fusion analyzer emits an honest "No kernel fusion opportunities detected." fallback findings file when no fusion candidates exist, but validate_findings_file rejected it with three errors:

  • Missing required section: ## Recommendations
  • Missing required section: ## Detailed Analysis
  • kernel_fusion_findings.md: missing required kind=p_item

This made the empty-fusion case unvalidatable in the agentic analysis-orchestrator workflow: any trace with no fusion candidates failed Step 8 (validate_subagent_outputs), even though the analyzer's fallback output is correct by design.

Changes

TraceLens/Agent/Analysis/utils/validation_utils.py:

  1. New _fusion_no_data(filepath) helper — returns True when kernel_fusion_metrics.json reports status == "NO_DATA" or has an empty impact_estimates list (the analyzer's empty-fallback signals).
  2. Extend the existing relaxed_empty path to the fusion tiervalidate_findings_file now skips the required-section check for fusion findings files that are genuine empty fallbacks, mirroring the existing compute-tier empty-category handling (_category_findings_empty).
  3. MarkerValidator.check_findings_file — the system_findings kind=p_item requirement now honors skip_p_item_required (previously hard-required). This is load-bearing because kernel_fusion is a system-tier category, so its fallback findings file lives in system_findings/ and legitimately carries no P-item markers.

Verification

Before/after on a real trace with no fusion candidates (system_findings/kernel_fusion_findings.md):

Without fix With fix
Missing required section: ## Recommendations
Missing required section: ## Detailed Analysis
missing required kind=p_item

validate_findings_file returns (True, []) with the fix; the empty-fusion fallback now validates end-to-end in the orchestrator pipeline.

Impact

Unblocks the analysis-orchestrator Step 8 validation for workloads where the kernel-fusion analysis legitimately finds no candidates (e.g. fully-fused training traces, traces where <75% of kernels have perf models). No behavior change for non-empty findings files.

The kernel-fusion analyzer emits an honest 'No kernel fusion
opportunities detected.' fallback file when no candidates exist, but
validate_findings_file rejected it: the required Recommendations /
Detailed Analysis sections were missing, and the system-tier p_item
marker was hard-required for its file (system_findings/, since
kernel_fusion is a system-tier category).

Extend the existing relaxed-empty path (compute tier) to the fusion
tier via a new _fusion_no_data() check on kernel_fusion_metrics.json
(status NO_DATA or empty impact_estimates), and honor
skip_p_item_required for system_findings files.

Verified: without this change the fallback fails with
'Missing required section: ## Detailed Analysis' and
'missing required kind=p_item'; with it, validation passes.
@bong-water-water-bong
bong-water-water-bong force-pushed the fix/validate-empty-fusion-fallback branch from c836f57 to 6722f77 Compare August 14, 2026 08:43
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.

1 participant