Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 52 for replaceMap (0.22 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/lower_tf.cc

                                                       operands[i], operands[i + 1])
                            : operands[i];
          }
          n = (n + 1) / 2;
        }
    
        rewriter.replaceOp(addn_op, operands[0]);
        return success();
      }
    };
    
    // Lowers DynamicStitch op with constant indices and with static input and
    // output shapes using Reshape, UnPack and Pack op.
    //
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 74.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/optimize_functional_ops.cc

              updated_results.push_back(mapper.lookup(operand));
            break;
          }
    
          // Otherwise, clone the op here.
          rewriter.clone(op_to_inline, mapper);
        }
        rewriter.replaceOp(op, updated_results);
    
        // Here, shapes of the updated_results may not match the original values. If
        // any of the values are operands of the terminator op, then the function
        // return type should be updated.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/decompose_resource_ops.cc

        Value paddings = rewriter.create<ConstOp>(
            loc, DenseIntElementsAttr::get(paddings_ty, paddings_values));
        Value output = rewriter.create<PadOp>(loc, op_type, state, paddings);
    
        rewriter.replaceOp(op, output);
        return success();
      }
    };
    
    #include "tensorflow/compiler/mlir/tensorflow/transforms/generated_decompose_resource_ops.inc"
    }  // namespace
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 8.1K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc

                  conv_output_type, rewriter);
          output = rewriter.create<mhlo::TransposeOp>(
              conv_op.getLoc(), conv_op.getType(), output, permutation);
        }
        rewriter.replaceOp(conv_op, {output});
      }
    };
    
    // Convert a 1-D convolution into a 2-D convolution (which TF supports) so that
    // it can be rewritten by the pattern `Convert2DConvOp`.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 154.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/legalize_tf.cc

          /*weights_format=*/rewriter.getStringAttr("DEFAULT"),
          /*keep_num_dims=*/rewriter.getBoolAttr(true),
          /*asymmetric_quantize_inputs=*/mlir::BoolAttr());
      rewriter.replaceOp(op, {fc_op.getResult(0)});
    
      return true;
    }
    
    LogicalResult ConvertTFBatchMatMulOp::matchAndRewrite(
        Operation* op, PatternRewriter& rewriter) const {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 20 20:06:54 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/lift_tflite_flex_ops.cc

                          << parsed_op_name << " is linked properly";
          return failure();
        }
        op_state.addAttributes(attrs);
    
        Operation* tf_op = rewriter.create(op_state);
        rewriter.replaceOp(op, tf_op->getResults());
    
        // Special type fixes for TF Resource Tensors that are casted to
        // Int32 tensor during MLIR->TFLite flatbuffer conversion.
        // TODO(b/146131919): correct handling of resource type
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/stablehlo/transforms/unfuse_batch_norm_pass.cc

            bn_op.getLoc(), inputs, bn_op.getScale(), bn_op.getOffset(), mean,
            variance, epsilon, rewriter.getI64IntegerAttr(feature_index));
    
        // Return normalized values, mean, variable.
        rewriter.replaceOp(bn_op, ::mlir::ValueRange{batch_norm, mean, variance});
        return success();
      }
    };
    
    class UnfuseBatchNormInferencePattern
        : public OpRewritePattern<mhlo::BatchNormInferenceOp> {
     public:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/einsum.cc

            op, "unary einsum equation does not require transpose");
      } else if (needs_reduce_sum && !needs_transpose) {
        rewriter.replaceOp(op, lhs);
        return success();
      }
    
      lhs = createTransposeOp(lhs, lhs.getLoc(), lhs_transpose, &rewriter);
      rewriter.replaceOp(op, lhs);
      return success();
    }
    
    std::vector<int64_t> inverseTransposeVector(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 33.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_with_tf2xla.cc

          mapper.map(original, updated);
        }
        if (!has_type_change) return failure();
    
        Operation* cloned_op = rewriter.clone(*op, mapper);
        rewriter.replaceOp(op, cloned_op->getResults());
        return success();
      }
    };
    
    }  // end namespace
    
    Tf2XlaTypeConverter::Tf2XlaTypeConverter() {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/lower_static_tensor_list.cc

        if ((ranked_type && ranked_type.getRank() == 0) ||
            !matchPattern(element_shape, m_Constant(&dense_elem_attr))) {
          // If no constant is spotted, just forward the operand.
          rewriter.replaceOp(op, {input});
          return success();
        }
    
        RankedTensorType shape_type =
            tensorflow::GetTypeFromTFTensorShape({-1}, rewriter.getIntegerType(32));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 70.7K bytes
    - Viewed (0)
Back to top