Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add chain optimizations for Conditional nodes #2895

Merged
merged 1 commit into from
May 21, 2024

Conversation

RunDevelopment
Copy link
Member

The new optimization removes a Conditional node if:

  1. its condition is a statically known constant, or
  2. both the If True and If False inputs are connected to the same node.

Constant conditions aren't used right now, but they will be once the Condition inputs gets an input element in the UI.


I also changed the switch optimization to remove the Switch node instead of trimming other inputs. I did this, because it's a prerequisite for other optimizations.

@joeyballentine joeyballentine merged commit d5cfda0 into chaiNNer-org:main May 21, 2024
14 checks passed
@RunDevelopment RunDevelopment deleted the optimize-cond branch May 21, 2024 21:33
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.

2 participants