| 37 | } |
| 38 | |
| 39 | FrameAndIter GetFrameAndIter(OpKernelContext* ctx, bool hostmem_sendrecv) { |
| 40 | if (hostmem_sendrecv && ctx->call_frame() != nullptr) { |
| 41 | // Host memory send/recv pairs are added by |
| 42 | // common_runtime/memory_types.cc. When the pair of nodes are |
| 43 | // added inside a function, we need to use the function call frame |
| 44 | // to formulate the unique rendezvous key. |
| 45 | return FrameAndIter(reinterpret_cast<uint64>(ctx->call_frame()), 0); |
| 46 | } else { |
| 47 | return ctx->frame_iter(); |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | }; // End of namespace slice_sendrecv |
| 52 |
nothing calls this directly
no test coverage detected