op_op_with_kern_class_diagram.dot 1.1 KB
Newer Older
W
weixing02 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
digraph sample { 
  graph [rankdir=TD]; node [shape=record];
  op [label="{Operator| InferShape()=0\lRun()=0\l | map<string, string[]> inputs_\lmap<string, string[]> outputs_ \l AttributeMap attrs_\l}"]; 
  op_with_kern [label="{OpWithKernel | InferShape()=0\lRun()\l | map<OpKernelKey,OpKernel>kernels_ }"]
  op_kernel [label="{OpKernel | Compute()=0}"]
  op_kernel_key [label="{OpKernelKey| Place place\n...}"]

  op -> op_with_kern [dir=back, arrowtail=onormal]
  op_with_kern -> op_kernel [arrowhead=vee, label="contains many"]

  {
    rank=same;
    op_with_kern
    op_kernel
  }

  op_kernel -> op_kernel_key [style=invis]

  {
    rank=same;
    op_kernel
    op_kernel_key
  }

  op_with_kern -> op_kernel_key [arrowhead=vee, label ="\nas map key"]

  mul_op [label="MulOp"]
  op_with_kern -> mul_op [dir=back, arrowtail=onormal]
  mul_kernel [label="template <typename Place>\lclass MulOpKernel\l"]
  op_kernel -> mul_kernel [dir=back, arrowtail=onormal]
  mul_op -> mul_kernel [arrowhead=vee, label="register many"]
  
  {
    rank=same;
    mul_op;
    mul_kernel;
  }
}