FLAMEGPU2 icon indicating copy to clipboard operation
FLAMEGPU2 copied to clipboard

Agent type for low-population highly parallel workload agents

Open ptheywood opened this issue 1 year ago • 0 comments

FLAME GPU 2 is not currently usable for all types of agent models, primarily targetting models with many (~10k/100k/1000k) realtively light/small agents (low per-agent memory). This is due to the GPU abstraction of 1 agent == 1 thread.

However, somtimes a population of agents will be relativly small, but may need to interact with a larger population of agnets, justifying the use of FLAME GPU.

E.g. an economics model with a small number of financial institutions which need to interact with a large population of individuals / buisnesses.

Currently, this could be implemented by having a "normal" flamegpu agent population for the individuals / buisnesses, and using host-layer or step functions to manually implement the financial institution agent's logic, in serial on the host.

From a modellers perspective, it would be much nicer if this type of agent could be modelled within the FLAME GPU API itself. These agents could:

  • exist soley on the host
  • exist on the host or the device transparently
    • relying on unified memory (#1175) to reduce the cost of moving the whole agents between the host and device when appropraite
  • Exist on the host and device, with a form of agent function which exposes a different level of parallelism
    • One thread per input message?
    • One block (or cluster if hopper+ only) per agent, with some CTA-like collective operations

Some combinations of the above might be required to support all models, or other cases not included here.

This may also require some form of sparse per-agent data structure, similar to #1048 but for agent variables.

Naming options previously mentioned (for search purposes) but none are great included: fat agents (used internally already for another purpose), wide agents, host agents, macro agents

ptheywood avatar Feb 09 '24 14:02 ptheywood