Skip to content

Commit

Permalink
move change to the other PR.
Browse files Browse the repository at this point in the history
  • Loading branch information
mfbalin committed Jul 18, 2024
1 parent ea6f23c commit 35f0f27
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions graphbolt/src/cache_policy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ torch::Tensor BaseCachePolicy::ReplaceImpl(
const auto pos = pos_optional ? *pos_optional : policy.Insert(key);
positions_ptr[i] = pos;
TORCH_CHECK(
// If there are duplicate values and the key was just inserted,
// we do not have to check for the uniqueness of the positions.
pos_optional.has_value() || std::get<1>(position_set.insert(pos)),
std::get<1>(position_set.insert(pos)),
"Can't insert all, larger cache capacity is needed.");
}
}));
Expand Down

0 comments on commit 35f0f27

Please sign in to comment.