pytorch
cc4db352 - [TensorExpr] Break circular dependency of shared pointers in MemDependencyChecker. (#65600)

Commit
4 years ago
[TensorExpr] Break circular dependency of shared pointers in MemDependencyChecker. (#65600) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/65600 Previously AccessInfo owned two maps: dependencies_ and dependents_, which represented an edge in dependency graph. These two maps were holding shared pointers and thus each edge immediately became a cycle, which resulted in memory leaks. This PR makes one of the ends of these edges weak pointer thus breaking the loop. Test Plan: buck test mode/dbgo-asan-ubsan //search/lib/query_expansion/candidate_generator/test:transliteration_expander_test -- --exact 'search/lib/query_expansion/candidate_generator/test:transliteration_expander_test - TransliterationExpander.romanizationByLocaleTest' Reviewed By: bertmaher Differential Revision: D31163441 Pulled By: ZolotukhinM fbshipit-source-id: 9cef921f5c9293f1237144d1ee92e31f3e44c00a
Author
Mikhail Zolotukhin
Parents
Loading