Open ardasener opened 2 years ago
An important point brought up by @Atahanak: a useful utility would be to take a single Format and a list of contexts (say, a list of GPUs), and be able to directly partition the format into smaller formats in these contexts (split a format across GPUs according to partitioning).
The simplest way to implement this would be to pass a context containing all the different GPUs you wish to partition between as the "contexts" parameter in the FunctionMatcherMixin::Execute
function:
MultiCUDAContext gpus{0,1,2};
ApplyPartitioning app(part);
app.ApplyPartition(cpu_csr, {}, {&gpus},true); // this calls `Execute`
However, this will not do what we want; rather it will first convert the original format to the multi-GPU context, then partition it. Therefore, we need to have a special preprocessing that does these two things in a single, HPC-friendly go.
Check METIS docs for such a function
Current partitioning classes (that inherit from
PartitionPreprocessType
) return arrays that represent the partitioning. However currently the library has no method to apply this partitioning to a Format. So we should introduce a class taking the partition array and a Format as input; and returning a vector of Format's as output.