Skip to content

Fixed key and mask rules #624

Description

@Christian-B

This only affects Vertex where get_fixed_key_and_mask returns something other than Non

There is a clash between completely flexible fixed keys and masks and how keys and masks are used.

The suggestion is to limit and check what are allowed fix keys and masks.

For ease of reading

  • AppVertex is use when it is actually the pair of an AppliactionVertex and a ParttionID
  • MachineVertex is used when it is actually the result of splitter.get_out_going_vertices
    • Unless specified as graph wide all Machine is just for a single AppVertex
  • AppMask is the result of get_fixed_key_and_mask(partition_id)
  • MachineMask is the result of get_machine_fixed_key_and_mask
  • MachineIndex is the result of MachineVertex.index

The rules include

  • If an AppVertex has 1 MachineVertex
    • machineMask may be None
      • Then the MachineIndex must be zero
  • If AppVertex has more than one MachineVertex
    • Each must have the same MachineMask
  • All masks must have one bits at the top followed by zero bits below
  • The MachineMasks must not have less 1 bits than the corresponding AppMask
  • All MachineMasks must have at least the 8 bottom bits as zero
  • Ideally All Fixed MachineMasks will be the same script wide
  • The ApplicationKey should only have one bits near the top
    • ideally only using the top 8 bits or fewer
    • There may be zero bits between the one bits
    • If there is only 1 fixed AppVertex a key of 0 is ideal
  • The bits zero in the AppMask but not the MachineMask should be the MachineIndex
    • Ideally MachineKey - ApplicationKey == MachineVertex.index
    • If the AppVertex has only one Machine Vertex and MachineKey and MachineIdnex of 0 are ideal

Examples

  • Only fixed One to One

    • ApplicationKey 0
    • MachineKey 0
    • AppMask 0xFFFFF000
      • example if 12 bits needed for atoms
    • MachineMask not specified or the same
  • fixed One to One

    • ApplicationKey 0x800000000
    • MachineKey 0x800000000
    • AppMask 0xFFFFFF00
      • Example if 8 or less bits needed for atoms
    • MachineMask not specified or the same
  • Only Fixed with 3 machine

    • ApplicationKey 0x000000000
    • Example for 16 bits needed for atoms
    • MachineKey 0x00000000, 0x00010000, 0x00020000
    • MachineMask 0xFFFF0000
    • AppMask 0xFFF00000
  • Fixed with 3 machine

    • ApplicationKey 0x110000000
    • Example for 16 bits needed for atoms
    • MachineKey 0x11000000, 0x11010000, 0x11020000
    • MachineMask 0xFFFF0000
    • AppMask 0xFF000000

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions