[nnc] Fixed checking for loop carried dependence while fusing 2D reduction loops (#60609)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/60609
Fixes #60310
Test Plan: Imported from OSS
Reviewed By: bertmaher
Differential Revision: D29386144
Pulled By: navahgar
fbshipit-source-id: 230df4f59d6196a250ea57ff649b117d096fcdbc