diff --git a/README.md b/README.md index f10c14d..1a518b5 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ Edit `config.yaml` (autosave goes to `config.autosave.yaml`). - `wideband-aggressive`: min_span_hz=6000, max_span_hz=250000 - `resources.max_refinement_jobs` — processing budget hint - `resources.max_recording_streams` — recording/streaming budget hint +- `resources.max_decode_jobs` — decode budget hint - `profiles[]` — named operating profiles/intent metadata In phase 1, the engine stays backward compatible, but the config model now reflects the intended separation between: diff --git a/cmd/sdrd/pipeline_runtime.go b/cmd/sdrd/pipeline_runtime.go index a2364ca..de85d79 100644 --- a/cmd/sdrd/pipeline_runtime.go +++ b/cmd/sdrd/pipeline_runtime.go @@ -361,7 +361,7 @@ func (rt *dspRuntime) refineSignals(art *spectrumArtifacts, input pipeline.Refin } } maxRecord := rt.cfg.Resources.MaxRecordingStreams - maxDecode := rt.cfg.Resources.MaxRecordingStreams + maxDecode := rt.cfg.Resources.MaxDecodeJobs enforceDecisionBudgets(decisions, maxRecord, maxDecode) rt.det.UpdateClasses(signals) return pipeline.RefinementResult{Signals: signals, Decisions: decisions, Candidates: selectedCandidates} diff --git a/config.yaml b/config.yaml index 08c89df..8edec08 100644 --- a/config.yaml +++ b/config.yaml @@ -69,6 +69,7 @@ resources: prefer_gpu: true max_refinement_jobs: 8 max_recording_streams: 16 + max_decode_jobs: 16 profiles: - name: legacy description: Current single-band legacy behavior diff --git a/internal/config/config.go b/internal/config/config.go index a18886e..d8cfa34 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -106,6 +106,7 @@ type ResourceConfig struct { PreferGPU bool `yaml:"prefer_gpu" json:"prefer_gpu"` MaxRefinementJobs int `yaml:"max_refinement_jobs" json:"max_refinement_jobs"` MaxRecordingStreams int `yaml:"max_recording_streams" json:"max_recording_streams"` + MaxDecodeJobs int `yaml:"max_decode_jobs" json:"max_decode_jobs"` } type ProfileConfig struct { @@ -184,6 +185,7 @@ func Default() Config { PreferGPU: true, MaxRefinementJobs: 8, MaxRecordingStreams: 16, + MaxDecodeJobs: 16, }, Profiles: []ProfileConfig{ {Name: "legacy", Description: "Current single-band pipeline behavior", Pipeline: &PipelineConfig{Mode: "legacy", Goals: PipelineGoalConfig{Intent: "general-monitoring"}}}, diff --git a/internal/pipeline/policy.go b/internal/pipeline/policy.go index ffc12b9..e4cec05 100644 --- a/internal/pipeline/policy.go +++ b/internal/pipeline/policy.go @@ -23,6 +23,7 @@ type Policy struct { RefinementMaxSpanHz float64 `json:"refinement_max_span_hz"` RefinementAutoSpan bool `json:"refinement_auto_span"` PreferGPU bool `json:"prefer_gpu"` + MaxDecodeJobs int `json:"max_decode_jobs"` } func PolicyFromConfig(cfg config.Config) Policy { @@ -47,6 +48,7 @@ func PolicyFromConfig(cfg config.Config) Policy { RefinementMaxSpanHz: cfg.Refinement.MaxSpanHz, RefinementAutoSpan: config.BoolValue(cfg.Refinement.AutoSpan, true), PreferGPU: cfg.Resources.PreferGPU, + MaxDecodeJobs: cfg.Resources.MaxDecodeJobs, } }