MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / _insert_op_without_sync

Method _insert_op_without_sync

python/paddle/base/framework.py:4852–4866  ·  view source on GitHub ↗

Insert an Operator according to the giving arguments, without sync_with_cpp to make the compilation faster. Args: index(int): the place that the operator to insert. Returns: Operator: the insert Operator.

(self, index, *args, **kwargs)

Source from the content-addressed store, hash-verified

4850 return self._insert_op_without_sync(index, *args, **kwargs)
4851
4852 def _insert_op_without_sync(self, index, *args, **kwargs):
4853 """
4854 Insert an Operator according to the giving arguments,
4855 without sync_with_cpp to make the compilation faster.
4856
4857 Args:
4858 index(int): the place that the operator to insert.
4859
4860 Returns:
4861 Operator: the insert Operator.
4862 """
4863 op_desc = self.desc._insert_op(index)
4864 op = Operator(block=self, desc=op_desc, *args, **kwargs)
4865 self.ops.insert(index, op)
4866 return op
4867
4868 def _remove_op(self, index, sync=True):
4869 """

Callers 15

_insert_opMethod · 0.95
_insert_cast_opFunction · 0.80
_insert_send_recvMethod · 0.80
insert_sync_opFunction · 0.80
insert_sync_calc_opFunction · 0.80
insert_sync_comm_opFunction · 0.80
insert_sync_comm_opsFunction · 0.80

Calls 3

_insert_opMethod · 0.80
OperatorClass · 0.70
insertMethod · 0.45

Tested by

no test coverage detected