Returns True if this op is not safe to be traced.
(op)
| 273 | |
| 274 | @staticmethod |
| 275 | def unsafe_op(op): |
| 276 | """Returns True if this op is not safe to be traced.""" |
| 277 | |
| 278 | if control_flow_util.IsInCond(op): |
| 279 | return True |
| 280 | # Reasons for not including following op types: |
| 281 | # Assign: cause incorrect result with CPU tracing. |
| 282 | if op.type == 'Assign': |
| 283 | return True |
| 284 | return False |
| 285 | |
| 286 | @staticmethod |
| 287 | def device_mismatch(device_type, op): |