tensorflow/compiler/mlir/xla/transforms/unfuse_batch_norm.cc
// Broadcasts the 1D value tensor to rank.
Broadcasts the 1D value tensor to rank.
Broadcasts the 1D value tensor to rank .
Value broadcastToFeatureDim(Location loc, Type result_type, Value value_1d,
                            int64_t feature_dim,
                            ConversionPatternRewriter& rewriter) {
  Builder b(rewriter.getContext());
  auto dims_type = RankedTensorType::get({1}, b.getIntegerType(64));
  auto dims = DenseIntElementsAttr::get(dims_type, {feature_dim});
  return rewriter.create<xla_hlo::BroadcastInDimOp>(loc, result_type, value_1d,
                                                    dims);
}
Value broadcastToFeatureDim ( Location loc , Type result_type , Value value_1d , int64_t feature_dim , ConversionPatternRewriter & rewriter ) { Builder b ( rewriter . getContext ( ) ) ; auto dims_type = RankedTensorType :: get ( { 1 } , b . getIntegerType ( 64 ) ) ; auto dims = DenseIntElementsAttr :: get ( dims_type , { feature_dim } ) ; return rewriter . create < xla_hlo :: BroadcastInDimOp > ( loc , result_type , value_1d , dims ) ; }
Broadcasts the 1D value tensor to rank.
Broadcasts the 1D value tensor to rank .