@@ -61,7 +61,7 @@ std::vector<std::tuple<torch::Tensor, torch::Tensor, torch::Tensor>>
61
61
UniqueAndCompactBatchedSortBased (
62
62
const std::vector<torch::Tensor>& src_ids,
63
63
const std::vector<torch::Tensor>& dst_ids,
64
- const std::vector<torch::Tensor>& unique_dst_ids, int num_bits) {
64
+ const std::vector<torch::Tensor>& unique_dst_ids, int num_bits = 0 ) {
65
65
auto allocator = cuda::GetAllocator ();
66
66
auto stream = cuda::GetCurrentStream ();
67
67
auto scalar_type = src_ids.at (0 ).scalar_type ();
@@ -276,7 +276,7 @@ std::vector<std::tuple<torch::Tensor, torch::Tensor, torch::Tensor>>
276
276
UniqueAndCompactBatched (
277
277
const std::vector<torch::Tensor>& src_ids,
278
278
const std::vector<torch::Tensor>& dst_ids,
279
- const std::vector<torch::Tensor>& unique_dst_ids, int num_bits ) {
279
+ const std::vector<torch::Tensor>& unique_dst_ids) {
280
280
if (cuda::compute_capability () >= 70 ) {
281
281
// Utilizes a hash table based implementation, the mapped id of a vertex
282
282
// will be monotonically increasing as the first occurrence index of it in
@@ -287,15 +287,13 @@ UniqueAndCompactBatched(
287
287
// Utilizes a sort based algorithm, the mapped id of a vertex part of the
288
288
// src_ids but not part of the unique_dst_ids will be monotonically increasing
289
289
// as the actual vertex id increases. Thus, it is deterministic.
290
- return UniqueAndCompactBatchedSortBased (
291
- src_ids, dst_ids, unique_dst_ids, num_bits);
290
+ return UniqueAndCompactBatchedSortBased (src_ids, dst_ids, unique_dst_ids);
292
291
}
293
292
294
293
std::tuple<torch::Tensor, torch::Tensor, torch::Tensor> UniqueAndCompact (
295
294
const torch::Tensor src_ids, const torch::Tensor dst_ids,
296
- const torch::Tensor unique_dst_ids, int num_bits) {
297
- return UniqueAndCompactBatched (
298
- {src_ids}, {dst_ids}, {unique_dst_ids}, num_bits)[0 ];
295
+ const torch::Tensor unique_dst_ids) {
296
+ return UniqueAndCompactBatched ({src_ids}, {dst_ids}, {unique_dst_ids})[0 ];
299
297
}
300
298
301
299
} // namespace ops
0 commit comments