We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48f9e5f commit f38ea25Copy full SHA for f38ea25
torch/csrc/jit/passes/utils/memory_dag.cpp
@@ -55,9 +55,10 @@ void collectAllContainedMemoryLocations(
55
MemoryLocations& cont) {
56
// we have already recursed on this element
57
unsigned compIdx = Element::toIndex(elem);
58
- if (cont.test_and_set(compIdx)) {
+ if (cont.test(compIdx)) {
59
return;
60
}
61
+ cont.set(compIdx);
62
63
for (const auto& mem_loc : elem->getMemoryLocations()) {
64
collectAllContainedMemoryLocations(Element::toElement(mem_loc), cont);
0 commit comments