[inductor] track provenance of masks from indices (#100816)
Fixes #100530
When indices for indirect read are computed rather than read from another tensor, they should be masked according to the index used in computation. Currently though we don't associate masks with index variables, so the computed indices don't have associated masks also. This PR associates masks with index variables when they are created.
On this PR, both the device assert and masked load are generated, and hopefully device assert should be removed later once your value analysis PR lands.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/100816
Approved by: https://github.com/Chillee, https://github.com/lezcano
Author
Natalia Gimelshein