Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 127 for getDefiningOp (0.23 sec)

  1. tensorflow/compiler/mlir/lite/transforms/optimize_batch_matmul.cc

    bool NotFromDequant(mlir::Value value) {
      auto dequant_op = value.getDefiningOp<DequantizeOp>();
      if (dequant_op) {
        return false;
      }
      auto split_op = value.getDefiningOp<SplitOp>();
      if (!split_op) {
        return true;
      }
      return !split_op.getValue().getDefiningOp<DequantizeOp>();
    }
    
    // Optimize TFLite operations in functions.
    class OptimizeBatchMatmulPass
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/stablehlo/transforms/hlo_matchers.cc

      auto iota_broadcast =
          dyn_cast_or_null<mhlo::BroadcastInDimOp>(iota.getDefiningOp());
      if (!iota_broadcast || iota_broadcast.getBroadcastDimensions() != dimensions)
        return false;
      if (!isa_and_nonnull<mhlo::IotaOp>(
              iota_broadcast.getOperand().getDefiningOp()))
        return false;
      return true;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/stablehlo/transforms/optimize.cc

                                                PatternRewriter &rewriter) {
      auto dot = dyn_cast_or_null<mhlo::DotGeneralOp>(
          reshape_after.getOperand().getDefiningOp());
      if (!dot) return failure();
    
      auto reshape_before =
          dyn_cast_or_null<mhlo::ReshapeOp>(dot.getLhs().getDefiningOp());
      if (!reshape_before) return failure();
    
      if (!dot.getLhs().getType().hasStaticShape() ||
          !dot.getRhs().getType().hasStaticShape() ||
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 26.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/replace_cast_hacks_with_tf_xla_ops.cc

      Operation *op_input = args[0].getDefiningOp();
      Operation *op_weight = args[1].getDefiningOp();
      if (isa<TF::SubOp>(op_input)) {
        op_input = op_input->getOperand(0).getDefiningOp();
      }
      if (isa<TF::SubOp>(op_weight)) {
        op_weight = op_weight->getOperand(0).getDefiningOp();
      }
      if (isa<TF::CastOp>(op_input)) {
        op_input = op_input->getOperand(0).getDefiningOp();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 47.1K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/legalize_hashtables.cc

      LogicalResult matchAndRewrite(TF::LookupTableFindV2Op find_op,
                                    PatternRewriter& rewriter) const override {
        auto handle_op = find_op.getTableHandle().getDefiningOp();
        if (handle_op == nullptr) return failure();
        auto hashtable_op = llvm::dyn_cast<TFL::HashtableOp>(handle_op);
        if (hashtable_op == nullptr) return failure();
        rewriter.replaceOpWithNewOp<TFL::HashtableFindOp>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_types.cc

    bool IsQintValueDefinedByIntToQintCast(Value v) {
      if (!IsIllegalType(v.getType())) {
        return true;
      }
      if (!v.getDefiningOp() || !llvm::isa<TF::CastOp>(v.getDefiningOp())) {
        return false;
      }
      return IsIntToQintCast(v.getDefiningOp());
    }
    
    bool IsTFUniformQuantizedOpLegal(Operation *op) {
      // UniformQuantized Ops are considered legal if its qint operands and
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/sparsecore/embedding_sequencing.cc

          if (IsTPUOp(input_value.get().getDefiningOp()) &&
              !backward_pass_ops.contains(input_value.get().getDefiningOp()))
            values_to_add_nodes.insert(input_value.get());
      }
    
      for (Value value : values_to_add_nodes) {
        builder.setInsertionPointAfter(value.getDefiningOp());
        std::vector<Type> types(num_replicas, value.getType());
        Location loc = value.getDefiningOp()->getLoc();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 39.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/tpu_dynamic_layout_pass.cc

          resource_alias_analysis.GetResourceAliases(resource_iterator);
    
      auto is_generator = [](Value val) {
        if (mlir::isa<BlockArgument>(val)) return true;
        Operation* definition = val.getDefiningOp();
        return definition->getNumOperands() == 0 &&
               definition->getNumResults() == 1;
      };
    
      // Check all generator aliases (ops or function argument) are on CPU.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/tensor_device_copy_conversion.cc

        // * the arg to the identity op is produced by a TPUExecuteOp.
        if (op_device && op_device.getValue().contains("TPU")) {
          return true;
        }
    
        Operation *def_op = arg.getDefiningOp();
        // If the arg to this identity op is the arg of a function, there's no
        // defining op.
        if (def_op != nullptr &&
            (isa<TF::TPUExecuteOp, TF::TPUExecuteAndUpdateVariablesOp>(def_op))) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/post_quantize.cc

      output_types.reserve(num_return_operands);
      for (int i = 0; i != num_return_operands; ++i) {
        auto returned_value = terminator->getOperand(i);
        Operation* returned_op = returned_value.getDefiningOp();
        if (returned_op && returned_op->hasOneUse() &&
            llvm::isa<DequantizeOp>(returned_op)) {
          auto dequantize_op = llvm::cast<DequantizeOp>(returned_op);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.1K bytes
    - Viewed (0)
Back to top