Description
There is no local repo for this, but here is the problem:
during inductor codegen we do not do apply replacements on inputs to guarantee that symbols in runtime assertions
are defined. see this PR #153661
Doing so results in some new undefined symbols, they all happen in backward see the two examples internal refs bellow.
Internal ref issues:
https://fb.workplace.com/groups/1075192433118967/permalink/1685049562133248/
https://fb.workplace.com/groups/1075192433118967/permalink/1683723998932471/
A temporary mitigation is by not doing replacements for inputs on backward graph, but this is not correct and can still
lead to errors of sort(runtime assertions symbols not defined)D76096355.
as in the title the proper solution is to handle in partitioner in the phase that determine what symbols need to be passed to backward we shall look at expressions of inputs with out doing replacements.