Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 121 for GetOperands (0.21 sec)

  1. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_stablehlo_custom_call_to_composite.cc

        auto decomposition = mlir::cast<FlatSymbolRefAttr>(calledComputations[0]);
    
        auto composite = rewriter.create<mlir::stablehlo::CompositeOp>(
            op.getLoc(), op.getResultTypes(), op.getOperands(), name.str(), attrs,
            decomposition.getValue());
        rewriter.replaceOp(op, composite.getResults());
        return success();
      }
    };
    
    struct LegalizeStablehloCustomCallToCompositePass
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_with_tf2xla.cc

        // while creating the ops so make sure there aren't any type changes between
        // the original op operands and the operands during the conversion.
        for (auto&& [old_val, new_val] : llvm::zip(op->getOperands(), operands)) {
          if (old_val.getType() != new_val.getType()) return failure();
        }
    
        auto abstractOp = op->getRegisteredInfo();
        if (!abstractOp) return failure();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/analyze_variables.cc

        // and mark the module as not valid for TFLite legalization.
        // Note: this might disable native variables in more than needed cases.
        // TODO(b/189370197): Enhance variable analysis.
        for (auto operand : op->getOperands()) {
          if (mlir::isa<TF::ResourceType>(
                  getElementTypeOrSelf(operand.getType()))) {
            legalize_to_tfl = false;
            return WalkResult::interrupt();
          }
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/tpu_host_computation_expansion.cc

        if (IsTrivialUnaryOperation(&cluster_op) ||
            HasOutsideCompilationAttribute(&cluster_op)) {
          auto walk_result = cluster_op.walk([&](Operation* op) {
            for (Value operand : op->getOperands()) {
              Operation* operand_op = GetOpOfValue(operand);
              if (head_outside_compiled_ops.count(operand_op)) continue;
    
              if (operand_op->getParentRegion() == cluster_region)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/cast_bf16_ops_to_f32.cc

      LogicalResult match(Operation* op) const override {
        if (isa<TF::CastOp, TF::ConstOp>(op) ||
            op->getName().hasTrait<OpTrait::ZeroOperands>()) {
          return failure();
        }
        for (Value input : op->getOperands()) {
          if (getElementTypeOrSelf(input).isBF16()) {
            return success();
          }
        }
        for (Value value : op->getResults()) {
          if (getElementTypeOrSelf(value).isBF16()) {
            return success();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Dec 10 05:52:02 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.cc

          // inputs.
          SmallVector<Value, 4> inputs;
          inputs.reserve(op_with_region->getNumOperands());
          for (Value operand : op_with_region->getOperands()) {
            const Type operand_type = operand.getType();
            if (mlir::isa<NoneType>(operand_type)) {
              inputs.push_back(operand);
              continue;
            }
    
            const Type element_type =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 06:04:36 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/resource_op_lifting.cc

        Block& front = region->front();
        auto old_return = front.getTerminator();
        assert(old_return->getNumOperands() == op_->getNumResults());
        auto new_return_operands = llvm::to_vector<4>(old_return->getOperands());
        new_return_operands.resize(num_new_results_);
    
        // initialize return values for written resources to be the hoisted reads.
        for (Value resource : written_resources_) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 55.1K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/resource_op_lifting_cleanup.cc

    void RemovePassthroughOp(Block &block) {
      for (auto &op : llvm::make_early_inc_range(block)) {
        if (isa<TF::IdentityOp, TF::IdentityNOp>(op) || IsCastOfResource(op)) {
          op.replaceAllUsesWith(op.getOperands());
          op.erase();
        }
      }
    }
    
    using LocalVarOp = std::variant<TF::VarHandleOp, TF::MlirLocalVarOp>;
    
    Value LocalVarOp_resource(LocalVarOp &op) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_tpu_model_to_cpu.cc

        // which should be removed. So the replaced PartitionedCall op should keep
        // its original arguments except for the last element.
        SmallVector<Value> args = call_op.getOperands().drop_back();
    
        rewriter.replaceOpWithNewOp<TF::PartitionedCallOp>(
            call_op, float_func.getResultTypes(), args, f_attr);
        return success();
      }
    };
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/rewrite_tpu_embedding_ops.cc

    template <typename OpT>
    OpT AddOperandAndRewriteAs(Operation* op, Value operand, NamedAttrList attr,
                               OpBuilder* builder) {
      builder->setInsertionPoint(op);
      auto operands = llvm::to_vector<4>(op->getOperands());
      operands.push_back(operand);
      auto new_op = builder->create<OpT>(op->getLoc(), op->getResultTypes(),
                                         operands, attr.getAttrs());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 22:55:42 UTC 2024
    - 4.5K bytes
    - Viewed (0)
Back to top