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

Method _is_optimizer_op

python/paddle/base/executor.py:1341–1344  ·  view source on GitHub ↗
(self, op)

Source from the content-addressed store, hash-verified

1339 self.enable_job_schedule_profiler = False
1340
1341 def _is_optimizer_op(self, op):
1342 return self.op_role_key in op.attr_names and int(
1343 op.all_attrs()[self.op_role_key]
1344 ) & int(core.op_proto_and_checker_maker.OpRole.Optimize)
1345
1346 def __del__(self) -> None:
1347 # NOTE(Ruibiao): The manually call of clear is required. Because in Python, executor_cache

Callers 1

Calls 1

all_attrsMethod · 0.80

Tested by

no test coverage detected