[nnc] Use BufHandle in loopnest.cache_accesses python API (#59006)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/59006
Related github issue: https://github.com/pytorch/pytorch/issues/59002
Test Plan:
Imported from OSS
Tested in the github issue: https://github.com/pytorch/pytorch/issues/59002
Reviewed By: bertmaher
Differential Revision: D28714829
Pulled By: huiguoo
fbshipit-source-id: 5fd7d5426c5cdb5af30731f662b083d2bd611bc4