GeniusVentures / GeniusVentures/SGProcessingManager

Fix pass/input indexing and remove model-only execution assumptions

Open
#8 0 comments 0 reactions 1 assignee View on GitHub

@itsafuu is already working on this.

Since Jul 28, 2026.

Dominant language
C++
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Problem

SGProcessingManager currently mixes input indexes with pass indexes and assumes every pass has a model.

Confirmed examples:

  • GetCidForProc() resolves an input index with GetInputIndex() and then uses that index to access processing_.get_passes()[index].
  • ParseBlockSize() calls pass.get_model().value() for every pass, even though COMPUTE, DATA_TRANSFORM, and RENDER passes are allowed without a model.
  • Several optional fields are accessed through .value() without pass-specific validation.

These assumptions can select the wrong pass, access an out-of-range pass, or fail on valid non-inference jobs.

Scope

  • Give passes stable indexes or IDs independent of global input indexes.
  • Resolve inputs through each pass's declared bindings.
  • Remove unconditional model access from generic processing paths.
  • Make block-size and subdivision logic depend on the active pass and its bound resources.
  • Add bounds checks and useful errors for missing pass, input, output, model, shader, dimensions, and source fields.
  • Preserve current MNN inference behavior while making non-model pass types safe.

Acceptance criteria

  • Jobs with different numbers of passes and global inputs resolve the correct pass and resources.
  • COMPUTE, DATA_TRANSFORM, and RENDER definitions do not fail merely because they lack a model.
  • Invalid references return typed errors rather than throwing or reading the wrong array element.
  • Tests cover one-to-many and many-to-one input/pass layouts, missing optionals, and out-of-range references.

Base implementation and review work on the branch consumed by SuperGenius/develop.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.