Advertisement
Guest User

Untitled

a guest
May 22nd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.30 KB | None | 0 0
  1. ** Better current
  2.  
  3.  
  4. #+begin_src plantuml :file better_current.png
  5. class CommunicationOp << (I, #9922DD) abstract >>
  6.  
  7. CommunicationOp <|-- BaseSendOp
  8. CommunicationOp <|-- BaseRecvOp
  9.  
  10. CommunicationOp : __init__([CommunicationOp] paired)
  11. /' CommunicationOp : is_communication_op() '/
  12. CommunicationOp : Dict metadata
  13. /'
  14. ' CommunicationOp : String metadata['device']
  15. ' CommunicationOp : String metadata['device_id']
  16. ' CommunicationOp : String metadata['transformer']
  17. ' CommunicationOp : String metadata['host_transformer']
  18. ' CommunicationOp : String metadata['marker']
  19. ' CommunicationOp : String metadata['parallel']
  20. '/
  21. CommunicationOp : [CommunicationOp] paired
  22. CommunicationOp : [CommunicationOp] PartionFn(Axes axes)
  23. CommunicationOp : [Value] ReductionFn(Values)
  24.  
  25. class AbstractCommunicationOpFactory << abstract >>
  26. AbstractCommunicationOpFactory : CommunicationOpFactory getFactory()
  27. AbstractCommunicationOpFactory <|-- CommunicationOpFactory
  28. AbstractCommunicationOpFactory <|-- CommunicationOpFactoryDecorator
  29.  
  30. class CommunicationOpFactory
  31. CommunicationOpFactory : ([CommunicationOp], [CommunicationOp]) getSendRecvPairs()
  32. CommunicationOpFactory .. "instantiates" SendRecvPairs
  33.  
  34. class CommunicationOpFactoryDecorator
  35. CommunicationOpFactoryDecorator : ([AbstractCommunicationOp], [AbstractCommunicationOp]) getSendRecvPairs()
  36. /'
  37. ' CommunicationOpFactoryDecorator <|-- GPUFactory
  38. ' CommunicationOpFactoryDecorator <|-- CPUFactory
  39. '/
  40. CommunicationOpFactoryDecorator <|-- GatherOpFactory
  41. CommunicationOpFactoryDecorator <|-- ScatterOpFactory
  42. CommunicationOpFactoryDecorator <|-- AllReduceOpFactory
  43. CommunicationOpFactoryDecorator <|-- BroadcastOpFactory
  44. CommunicationOpFactoryDecorator --* AbstractCommunicationOpFactory
  45.  
  46. class GatherOpFactory
  47. GatherOpFactory : ([CommunicationOp], [CommunicationOp]) getSendRecvPairs()
  48. /' GatherNodeFactory : CommNodeFactory getFactory '/
  49.  
  50. class ScatterOpFactory
  51. ScatterOpFactory : ([CommunicationOp], [CommunicationOp]) getSendRecvPairs()
  52. /' ScatterNodeFactory : CommNodeFactory getFactory '/
  53.  
  54. class SendRecvPairs
  55. SendRecvPairs *-- CommunicationOp
  56. /'
  57. ' class SendOp << (I, #9922DD) abstract >>
  58. ' SendOp <|-- BaseSendOp
  59. ' SendOp : RecvOp recv_op
  60. '
  61. ' class RecvOp << (I, #9922DD) abstract >>
  62. ' RecvOp <|-- BaseRecvOp
  63. ' RecvOp : SendOp send_op
  64. '/
  65.  
  66. class BaseSendOp
  67. BaseSendOp : init([CommunicationOp] paired)
  68. BaseSendOp : send()
  69.  
  70. class BaseRecvOp
  71. BaseRecvOp : init([CommunicationOp] paired)
  72. BaseRecvOp : recv()
  73.  
  74. class CommPattern << (I, #9922DD) abstract >>
  75. CommunicationOp *-- CommPattern
  76. CommunicationOp <|-- CommPattern
  77. CommPattern <|-- Reduction
  78. CommPattern <|-- Partition
  79. /'
  80. ' CommPattern <|-- ScatterOp
  81. ' CommPattern <|-- GatherOp
  82. '/
  83.  
  84. /'
  85. ' class ScatterOp
  86. ' ScatterOp : init()
  87. ' /\' ScatterOp : Axes slices '\/
  88. '
  89. ' class GatherOp
  90. ' GatherOp : init(from_id, from_axes)
  91. ' GatherOp : from_slices
  92. ' GatherOp : Int from_id
  93. ' GatherOp : Node send_nodes
  94. '/
  95.  
  96. class Reduction
  97. Reduction : init(reduce_fn)
  98.  
  99. class Partition
  100. Partition : init(partion_fn)
  101. /' Partition : [CommunicationOp] partition_fn(Axes) '/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement