MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / XlaWhileOp

Method XlaWhileOp

tensorflow/compiler/tf2xla/kernels/while_op.cc:277–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275} // anonymous namespace
276
277XlaWhileOp::XlaWhileOp(OpKernelConstruction* ctx) : XlaOpKernel(ctx) {
278 const NameAttrList* name_attr;
279 OP_REQUIRES_OK(ctx, ctx->GetAttr("cond", &name_attr));
280 cond_name_attr_ = *name_attr;
281 OP_REQUIRES_OK(ctx, ctx->GetAttr("body", &name_attr));
282 body_name_attr_ = *name_attr;
283 if (!ctx->GetAttr(kXlaTokenInputNodesAttrName, &token_input_nodes_).ok()) {
284 has_token_input_output_ = false;
285 } else {
286 has_token_input_output_ = !token_input_nodes_.empty();
287 }
288 if (ctx->HasAttr(kPropagateCompileTimeConsts)) {
289 OP_REQUIRES_OK(ctx, ctx->GetAttr(kPropagateCompileTimeConsts,
290 &propagate_compile_time_consts_));
291 }
292}
293
294void XlaWhileOp::Compile(XlaOpKernelContext* ctx) {
295 VLOG(1) << "WhileOp::Compile";

Callers

nothing calls this directly

Calls 4

GetAttrMethod · 0.45
okMethod · 0.45
emptyMethod · 0.45
HasAttrMethod · 0.45

Tested by

no test coverage detected