-
Notifications
You must be signed in to change notification settings - Fork 117
Description
The fallback paths in OperationValidationAndFallback.cpp (tryFallbacks and tryConfigFallbacks) currently only pass configs[0] — the first output's OpConfig. This means when a multi-output operation (e.g., ttnn.sort) fails validation and enters the fallback path, only the first output's layout revert is handled by applyFallbackTransformations.
This was acceptable for the initial multi-output support in #7027, which focused on the success path where validation passes but output layouts mismatch. However, if a multi-output op outright fails validation and needs input layout fallbacks, secondary outputs won't get their revert ToLayoutOp inserted.
What needs to change:
- tryFallbacks should accept all configs (not just configs[0]) and pass them through to applyFallbackTransformations
- tryConfigFallbacks should similarly forward all configs
- testFallbackCombination may need to be aware of multiple output configs
Impact:
Low — currently no multi-output TTNN ops are known to hit the fallback (validation failure) path. The sort op's ui16 indices mismatch for gpt oss is handled on the success path. This becomes relevant if future ops produce multiple outputs and fail validation.