StanfordLegion / legion

The Legion Parallel Programming System
https://legion.stanford.edu
Apache License 2.0
675 stars 145 forks source link

Realm: API to estimate multi-hop copy bandwidth #1704

Open manopapad opened 3 months ago

manopapad commented 3 months ago

A static estimate would be sufficient, probably just the minimum mem_mem_affinity across the best path between the source and target memories, with accompanying caveats that this is a best-case scenario (large transfer, no congestion etc.)

This would allow Legion mappers to make a better judgement when selecting source instances.

Arguably this is simple enough that an application could do the same calculation, but I don't think we want the applications to be in the business of guessing what the path planner is going to do.

lightsighter commented 3 months ago

I actually think Runtime::mem_mem_affinity call should probably stay just the base graph of actual connections, both to keep it simple and also because it is old and we encourage users to use the new MemoryQuery interface which is more scalable. I do think that MemoryQuery should support a mode where you can query about multi-hop copy affinities to support cases like this, but I also think it should be opt-in since it's going to be more expensive to compute that and you'll need to think more about how to interpret the results.

apryakhin commented 1 week ago

@eddy16112 just assigning tentatively