Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
rusty1s committed Apr 4, 2024
1 parent e7f5dd4 commit fb770cb
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions pyg_lib/csrc/partition/cpu/metis_kernel.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <ATen/ATen.h>
#include <torch/library.h>

#include <metis.h>
/* #include <metis.h> */

namespace pyg {
namespace partition {
Expand Down Expand Up @@ -31,14 +31,16 @@ at::Tensor metis_kernel(const at::Tensor& rowptr,
auto part = at::empty({nvtxs}, rowptr.options());
auto part_data = part.data_ptr<int64_t>();

if (recursive) {
METIS_PartGraphRecursive(&nvtxs, &ncon, xadj, adjncy, vwgt, NULL, adjwgt,
&num_partitions, NULL, NULL, NULL, &objval,
part_data);
} else {
METIS_PartGraphKway(&nvtxs, &ncon, xadj, adjncy, vwgt, NULL, adjwgt,
&num_partitions, NULL, NULL, NULL, &objval, part_data);
}
/* if (recursive) { */
/* METIS_PartGraphRecursive(&nvtxs, &ncon, xadj, adjncy, vwgt, NULL, adjwgt,
*/
/* &num_partitions, NULL, NULL, NULL, &objval, */
/* part_data); */
/* } else { */
/* METIS_PartGraphKway(&nvtxs, &ncon, xadj, adjncy, vwgt, NULL, adjwgt, */
/* &num_partitions, NULL, NULL, NULL, &objval,
* part_data); */
/* } */

return part;
}
Expand Down

0 comments on commit fb770cb

Please sign in to comment.