lava.magma.runtime.message_infrastructure

lava.magma.runtime.message_infrastructure.factory

digraph inheritancefcce92b215 { bgcolor=transparent; rankdir=TB; size=""; "MessageInfrastructureFactory" [URL="../lava/lava.magma.runtime.message_infrastructure.html#lava.magma.runtime.message_infrastructure.factory.MessageInfrastructureFactory",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Factory class to create the messaging infrastructure"]; }
class lava.magma.runtime.message_infrastructure.factory.MessageInfrastructureFactory

Bases: object

Factory class to create the messaging infrastructure

static create(factory_type)

Creates the message infrastructure instance based on type of actor framework being chosen.

lava.magma.runtime.message_infrastructure.message_infrastructure_interface

digraph inheritance89166604d2 { bgcolor=transparent; rankdir=TB; size=""; "ABC" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Helper class that provides a standard way to create an ABC using"]; "MessageInfrastructureInterface" [URL="../lava/lava.magma.runtime.message_infrastructure.html#lava.magma.runtime.message_infrastructure.message_infrastructure_interface.MessageInfrastructureInterface",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A Message Infrastructure Interface which can create actors which would"]; "ABC" -> "MessageInfrastructureInterface" [arrowsize=0.5,style="setlinewidth(0.5)"]; }
class lava.magma.runtime.message_infrastructure.message_infrastructure_interface.MessageInfrastructureInterface

Bases: ABC

A Message Infrastructure Interface which can create actors which would participate in message passing/exchange, start and stop them as well as declare the underlying Channel Infrastructure Class to be used for message passing implementation.

abstract property actors: List[Any]

Returns a list of actors

abstract build_actor(target_fn, builder)

Given a target_fn starts a system process

abstract channel_class(channel_type)

Given the Channel Type, Return the Channel Implementation to be used during execution

Return type:

Type[Channel]

abstract start()

Starts the messaging infrastructure

abstract stop()

Stops the messaging infrastructure

lava.magma.runtime.message_infrastructure.multiprocessing

digraph inheritancea7a72a2133 { bgcolor=transparent; rankdir=TB; size=""; "ABC" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Helper class that provides a standard way to create an ABC using"]; "BaseProcess" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Process objects represent activity that is run in a separate process"]; "CPyChannel" [URL="../lava/lava.magma.runtime.message_infrastructure.html#lava.magma.runtime.message_infrastructure.multiprocessing.CPyChannel",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "MessageInfrastructureInterface" [URL="../lava/lava.magma.runtime.message_infrastructure.html#lava.magma.runtime.message_infrastructure.message_infrastructure_interface.MessageInfrastructureInterface",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A Message Infrastructure Interface which can create actors which would"]; "ABC" -> "MessageInfrastructureInterface" [arrowsize=0.5,style="setlinewidth(0.5)"]; "MultiProcessing" [URL="../lava/lava.magma.runtime.message_infrastructure.html#lava.magma.runtime.message_infrastructure.multiprocessing.MultiProcessing",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Implements message passing using shared memory and multiprocessing"]; "MessageInfrastructureInterface" -> "MultiProcessing" [arrowsize=0.5,style="setlinewidth(0.5)"]; "NcPyChannel" [URL="../lava/lava.magma.runtime.message_infrastructure.html#lava.magma.runtime.message_infrastructure.multiprocessing.NcPyChannel",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "Process" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; "BaseProcess" -> "Process" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PyCChannel" [URL="../lava/lava.magma.runtime.message_infrastructure.html#lava.magma.runtime.message_infrastructure.multiprocessing.PyCChannel",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "PyNcChannel" [URL="../lava/lava.magma.runtime.message_infrastructure.html#lava.magma.runtime.message_infrastructure.multiprocessing.PyNcChannel",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "SystemProcess" [URL="../lava/lava.magma.runtime.message_infrastructure.html#lava.magma.runtime.message_infrastructure.multiprocessing.SystemProcess",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Wraps a process so that the exceptions can be collected if present"]; "Process" -> "SystemProcess" [arrowsize=0.5,style="setlinewidth(0.5)"]; }
class lava.magma.runtime.message_infrastructure.multiprocessing.CPyChannel

Bases: object

class lava.magma.runtime.message_infrastructure.multiprocessing.MultiProcessing

Bases: MessageInfrastructureInterface

Implements message passing using shared memory and multiprocessing

property actors

Returns a list of actors

build_actor(target_fn, builder)

Given a target_fn starts a system (os) process

Return type:

Any

channel_class(channel_type)

Given a channel type, returns the shared memory based class implementation for the same

Return type:

Type[Channel]

property smm

Returns the underlying shared memory manager

start()

Starts the shared memory manager

stop()

Stops the shared memory manager

class lava.magma.runtime.message_infrastructure.multiprocessing.NcPyChannel

Bases: object

class lava.magma.runtime.message_infrastructure.multiprocessing.PyCChannel

Bases: object

class lava.magma.runtime.message_infrastructure.multiprocessing.PyNcChannel

Bases: object

class lava.magma.runtime.message_infrastructure.multiprocessing.SystemProcess(*args, **kwargs)

Bases: Process

Wraps a process so that the exceptions can be collected if present

property exception

Exception property.

join()

Wait until child process terminates

run()

Method to be run in sub-process; can be overridden in sub-class

lava.magma.runtime.message_infrastructure.nx

digraph inheritance6d35336616 { bgcolor=transparent; rankdir=TB; size=""; "ABC" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Helper class that provides a standard way to create an ABC using"]; "MessageInfrastructureInterface" [URL="../lava/lava.magma.runtime.message_infrastructure.html#lava.magma.runtime.message_infrastructure.message_infrastructure_interface.MessageInfrastructureInterface",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A Message Infrastructure Interface which can create actors which would"]; "ABC" -> "MessageInfrastructureInterface" [arrowsize=0.5,style="setlinewidth(0.5)"]; "NxBoardMsgInterface" [URL="../lava/lava.magma.runtime.message_infrastructure.html#lava.magma.runtime.message_infrastructure.nx.NxBoardMsgInterface",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Implements message passing using nx board"]; "MessageInfrastructureInterface" -> "NxBoardMsgInterface" [arrowsize=0.5,style="setlinewidth(0.5)"]; }
class lava.magma.runtime.message_infrastructure.nx.NxBoardMsgInterface

Bases: MessageInfrastructureInterface

Implements message passing using nx board

property actors

Returns a list of actors

build_actor(target_fn, builder)

Given a target_fn starts a system (os) process

Return type:

Any

channel_class(channel_type)

Given a channel type, returns the shared memory based class implementation for the same.

Return type:

Type[ChannelType]

start()

Starts the shared memory manager

stop()

Stops the shared memory manager