Lines Matching refs:ctx
28 explicit ConstOp(OpKernelConstruction* ctx) : XlaOpKernel(ctx) {
30 OP_REQUIRES_OK(ctx, ctx->GetAttr("value", &proto));
33 ctx, ctx->output_type(0) == proto_.dtype(),
36 DataTypeString(ctx->output_type(0)), ")"));
37 OP_REQUIRES_OK(ctx, TensorShape::IsValidShape(proto_.tensor_shape()));
40 void Compile(XlaOpKernelContext* ctx) override {
45 ctx->SetInvalidOutput(0);
48 xla::ComputationBuilder* b = ctx->builder();
56 ctx->SetOutput(0,
64 ctx->SetOutput(
72 ctx->SetOutput(
80 ctx->SetOutput(0,
88 ctx->SetOutput(
101 OP_REQUIRES(ctx, tensor.FromProto(cpu_allocator(), proto_),
104 ctx->SetConstantOutput(0, tensor);