| 39 | } |
| 40 | |
| 41 | static FrameAndIter GetFrameAndIter(OpKernelContext* ctx, |
| 42 | bool hostmem_sendrecv) { |
| 43 | if (hostmem_sendrecv && ctx->call_frame() != nullptr) { |
| 44 | // Host memory send/recv pairs are added by |
| 45 | // common_runtime/memory_types.cc. When the pair of nodes are |
| 46 | // added inside a function, we need to use the function call frame |
| 47 | // to formulate the unique rendezvous key. |
| 48 | return FrameAndIter(reinterpret_cast<uint64>(ctx->call_frame()), 0); |
| 49 | } else { |
| 50 | return ctx->frame_iter(); |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | FuseRecvOp::FuseRecvOp(OpKernelConstruction* ctx) : AsyncOpKernel(ctx), fuse_count_(0) { |
| 55 | // send devices are not single |
no test coverage detected