[Error-reporting] Set upper boundary on border element (#59311)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/59311
The diff sets the upper boundary on border element when presenting the error message. This is required in order to avoid unnecessary log contamination
Test Plan: Example of log contamination: https://www.internalfb.com/fblearner/details/276849996/operator/2942475685?tab=try_27021599785797968
Reviewed By: d4l3k
Differential Revision: D28812745
fbshipit-source-id: 4f491b9acc8cc9831d763f185022879bbbfb4c8a