Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 178 for getDefiningOp (0.35 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_quantize_op_test.cc

      quant_spec.set_tensor_type(QuantizationComponentSpec::TENSORTYPE_INT_8);
    
      std::optional<TF::PartitionedCallOp> dequantize_op = ApplyUniformQuantization(
          pattern_rewriter, cast<TF::ConstOp>(value.getDefiningOp()), quant_spec);
      EXPECT_TRUE(dequantize_op.has_value());
      EXPECT_EQ(dequantize_op.value().func().getName().str(),
                "composite_dequantize_uniform");
    }
    
    }  // namespace
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Dec 10 05:52:02 UTC 2023
    - 3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_quantize_op.cc

                                         ShapedType result_type,
                                         StringRef func_name,
                                         Value& func_input_arg) {
      Operation* input_op = input_val.getDefiningOp();
    
      Operation* insertion_point = input_op->getParentOfType<func::FuncOp>();
      if (!insertion_point) insertion_point = input_op->getParentOfType<ModuleOp>();
      rewriter.setInsertionPointAfter(insertion_point);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/utils/cluster_util.cc

        getUsedValuesDefinedAbove(op.getRegions(), live_ins);
        // Inserts if any of the `live_ins` depends on the ops in the cluster.
        if (llvm::any_of(live_ins, [&](Value value) {
              Operation* defining_op = value.getDefiningOp();
              if (!defining_op) {
                return false;
              }
              return c.ops.contains(defining_op) ||
                     ops_depend_on_cluster.contains(defining_op);
            })) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jul 28 00:32:55 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/stablehlo/transforms/uniform_quantized_stablehlo_to_tfl_pass.cc

            add_op != nullptr &&
            !isa<stablehlo::ConstantOp>(add_op->getOperand(1).getDefiningOp())) {
          LLVM_DEBUG(llvm::dbgs() << "Expected a `stablehlo.constant` as the "
                                  << "rhs of `stablehlo.add`.\n");
        }
    
        // Make sure the filter is a constant or a constant transpose.
        Operation* filter_op = filter.getDefiningOp();
        const bool is_constant = isa_and_nonnull<stablehlo::ConstantOp>(filter_op);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 09:00:19 UTC 2024
    - 99.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.h

          // The input of the quantize op has already been quantized, i.e.
          // rescale.
          return failure();
        }
    
        Operation* operand_op = operand.getDefiningOp();
        if (operand_op == nullptr) {
          // When `QuantizeOpT`'s operand does not have a defining op, it means it
          // is a `BlockArgument`. The pattern does not match if there is no op to
          // quantize.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_stablehlo_to_vhlo.cc

      auto new_value = converter.materializeArgumentConversion(
          rewriter, result.getLoc(), type, {result});
      rewriter.replaceAllUsesExcept(result, new_value, new_value.getDefiningOp());
    }
    
    // Wrap operands in an an unrealized cast to create a cast to buffer any type
    // changes to the operand, and apply type converter to operands:
    //   V0 = op(operand)
    //   ==>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 19:48:51 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/transforms/default_quant_params.cc

      // This value isn't an expressed type (float), skip.
      if (!new_type) return;
    
      Block &block = value.getParentRegion()->front();
      Operation *op = value.getDefiningOp();
      if (op) {
        builder.setInsertionPoint(&block, ++Block::iterator(op));
      } else {
        builder.setInsertionPointToStart(&block);
      }
      TypeAttr type_attr = TypeAttr::get(new_type);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/remove_vars_in_session_initializer.cc

        }
      }
    
      erase_list.push_back(op);
    
      for (auto& use : op->getOpOperands()) {
        if (auto op_result = mlir::dyn_cast<mlir::OpResult>(use.get())) {
          Operation* def = op_result.getDefiningOp();
          if (!dead_ops.insert(def).second) continue;
          RecursiveRemove(def, erase_list, dead_ops);
        }
      }
    }
    
    void RemoveVariables(llvm::ArrayRef<VarHandleOp> vars) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/utils/xla_rewrite_util.cc

              assert(user->use_empty());
              user->erase();
            }
          }
        }
    
        for (auto operand : cluster.getOperands()) {
          mlir::Operation* def = operand.getDefiningOp();
          if (operand.hasOneUse() &&
              llvm::isa_and_nonnull<mlir::TF::TPUPartitionedInputV2Op>(def)) {
            operand.dropAllUses();
            def->erase();
          }
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 13 03:57:18 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/prepare_quantize.cc

          return;
        }
    
        // Invariant:
        // isa<quantfork::QuantizeCastOp>(dq_arg.getDefiningOp()) -->
        // getdq_arg.getType() != q_op.getResult().getType()
        //
        // as otherwise qdq pair would have been optimized away.
        auto qd_arg_def_q_op =
            dyn_cast_or_null<quantfork::QuantizeCastOp>(dq_arg.getDefiningOp());
        if (!qd_arg_def_q_op) {
          return;
        }
    
        qd_arg_def_q_op.emitWarning()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.6K bytes
    - Viewed (0)
Back to top