| 110 | |
| 111 | private: |
| 112 | void Output(XlaOpKernelContext* ctx, int idx, const BCast::Vec& v) { |
| 113 | const int64 len = v.size(); |
| 114 | Tensor constant(DT_INT32, TensorShape({len})); |
| 115 | for (int64 i = 0; i < len; ++i) { |
| 116 | constant.flat<int32>()(i) = static_cast<int32>(v[i]); |
| 117 | } |
| 118 | ctx->SetConstantOutput(idx, constant); |
| 119 | } |
| 120 | |
| 121 | TF_DISALLOW_COPY_AND_ASSIGN(BCastGradArgsOp); |
| 122 | }; |
no test coverage detected