Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 78 for getDefiningOp (0.27 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_lifting.td

    def FuseAffineOpAndMul : Pat<
      (TF_MulOp
        (SupportedAffineOpMatcher $conv_out, $input, $weight),
        (TF_ConstOp:$mul_rhs IsFloatElementsAttr:$mul_rhs_value)),
      (CloneOpWithReplacedOperands
            (GetDefiningOp $conv_out),
            $input,
            (MultiplyFakeQuantValue $weight,
              (MakeOneDimValueBroadcastable $mul_rhs, $weight))),
      [(HasOneUse $conv_out),
       (HasRankOf<1> $mul_rhs_value),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 14 03:24:59 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_save_op.cc

        auto var_handle_op =
            dyn_cast<TF::VarHandleOp>(resource_operand.getDefiningOp());
        if (!var_handle_op) continue;
    
        Value assigned_value_operand = assign_variable_op.getOperand(1);
        auto const_op =
            dyn_cast<TF::ConstOp>(assigned_value_operand.getDefiningOp());
        if (!const_op) continue;
    
        var_handle_ops.emplace_back(var_handle_op);
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 05:52:39 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. tensorflow/compiler/mlir/tensorflow/transforms/annotate_parameter_replication.cc

    };
    
    // Returns the first value in the chain of operands, which is not defined by a
    // tf.IdentityOp or a tf.ReadVariableOp.
    Value SkipIdentityAndReadVariable(Value v) {
      while (auto op = v.getDefiningOp()) {
        if (!isa<TF::IdentityOp, TF::ReadVariableOp>(op)) break;
        v = op->getOperand(0);
      }
      return v;
    }
    
    void AnnotateParameterReplicationPass::runOnOperation() {
      ModuleOp m = getOperation();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/reduce_type_precision.cc

            !result_type || !result_type.getElementType().isSignlessInteger(8)) {
          return failure();
        }
    
        auto input_op =
            dyn_cast<arith::ConstantOp>(op.getOperand(0).getDefiningOp());
        if (!input_op) {
          return failure();
        }
    
        Builder builder(op.getContext());
        auto new_gather_op = rewriter.create<TFL::GatherOp>(
            op.getLoc(),
            /*result=*/
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/remove_unused_while_results.cc

      Value cond_block_argument = cond_block.getArgument(idx);
      // Consider the op that defines the unused result as a candidate for pruning.
      Operation* candidate_op = body_yield_operand.getDefiningOp();
      if (candidate_op == nullptr) return false;
    
      // Don't prune if candidate op might have side effects.
      if (isa_and_nonnull<TF::TensorFlowDialect>(candidate_op->getDialect())) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Nov 16 01:49:07 UTC 2022
    - 5K bytes
    - Viewed (0)
Back to top