Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 89 for getOperands (0.17 sec)

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

    bool IsOpReplicateInvariant(Region* replicate_region, Operation* op) {
      auto ancestor_of_replicate = [&](Region* region) {
        return region && region->isProperAncestor(replicate_region);
      };
    
      for (Value operand : op->getOperands())
        if (!ancestor_of_replicate(operand.getParentRegion())) return false;
    
      // _TPUDeviceOrdinalPlaceholder implicitly depends on the replica.
      if (llvm::isa<TF::_TPUDeviceOrdinalPlaceholderOp>(op)) return false;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tfrt/analysis/cost_analysis.cc

        cost_map_[op] = kDefaultCheapCost;
        return;
      }
    
      // For other ops, use the sum of input sizes as its cost.
      int64_t cost = kDefaultCheapCost;
      for (auto operand : op->getOperands()) {
        auto type = mlir::cast<mlir::TensorType>(operand.getType());
        if (type.hasRank()) {
          cost += GetRankedTensorSize(type);
        } else {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/cluster_outlining.cc

                                        OpBuilder* builder) {
      builder->create<func::ReturnOp>(cluster_return_op.getLoc(),
                                      cluster_return_op.getOperands());
      cluster_return_op.erase();
    }
    
    // Builds a function that outlines region attached to cluster_op or launch_op,
    // and inserts built function into given module.
    template <typename ClusterOrLaunchOp>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 21:25:12 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/remove_unused_arguments.cc

        }
      }
      OpBuilder builder(op);
      builder.setInsertionPointAfter(op);
      OperationState state(op->getLoc(), op->getName().getStringRef(),
                           op->getOperands(), result_types, op->getAttrs());
      for (int i = 0; i < op->getNumRegions(); ++i) {
        state.addRegion();
      }
      Operation* new_op = builder.create(state);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/experimental/common/outline_operations.cc

      llvm::SetVector<Value> been_defined;
      llvm::SetVector<Value> results;
      auto update_from_op = [&](Operation* op) {
        been_defined.insert(op->getResults().begin(), op->getResults().end());
        for (Value input : op->getOperands()) {
          if (been_defined.contains(input)) {
            continue;
          }
          results.insert(input);
        }
      };
      for (Operation* op : partition_ops) {
        update_from_op(op);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/pin_ops_with_side_effects.cc

      // then, they are represented as mlir::TF::IfOp. We add them here, anyway, to
      // be future-proof.
      if (llvm::isa<TF::IfOp, TFL::IfOp, TFL::CallOnceOp, TFL::WhileOp>(op))
        return true;
      for (auto operand : op->getOperands()) {
        if (IsResourceTensor(operand)) return true;
      }
      for (auto result : op->getResults()) {
        if (IsResourceTensor(result)) return true;
      }
      return false;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/utils/cluster_util.cc

      // dependency from the oprands of the op to the current cluster.
      llvm::SetVector<Operation*> ops_depend_on_cluster =
          GetAllOpsDependOnCluster(c, op_to_cluster_map);
      return llvm::none_of(to_merge->getOperands(), [&](Value value) {
        Operation* defining_op = value.getDefiningOp();
        return defining_op && ops_depend_on_cluster.contains(defining_op);
      });
    }
    }  // namespace
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jul 28 00:32:55 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/reduce.cc

          value_select.getOperand(0).getDefiningOp());
      if (!value_gt ||
          value_gt.getComparisonDirection() != compare_direction_included ||
          value_gt.getLhs() != body.getArgument(0) ||
          value_gt.getRhs() != body.getArgument(2))
        return failure();
    
      mhlo::SelectOp index_select = llvm::dyn_cast_or_null<mhlo::SelectOp>(
          return_op.getOperand(1).getDefiningOp());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 20:53:17 UTC 2024
    - 8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/stablehlo/passes/convert_func_to_bfloat16.cc

    bool IsConvertOpLegal(ConvertOp convert_op, BFloat16TypeConverter& converter) {
      if (!converter.isLegal(convert_op.getOperand().getType())) {
        auto other_convert_op = dyn_cast_or_null<OtherConvertOp>(
            convert_op.getOperand().getDefiningOp());
        return other_convert_op &&
               converter.isLegal(other_convert_op.getOperand().getType());
      } else if (!converter.isLegal(convert_op.getResult().getType())) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.cc

    bool IsHybridQuantizedOp(Operation* op) {
      if ((op->getNumOperands() != 2 && op->getNumOperands() != 3) ||
          op->getResultTypes().size() != 1) {
        return false;
      }
      Type lhs_type = op->getOperand(0).getType();
      Type rhs_type = op->getOperand(1).getType();
      Type result_type = op->getResult(0).getType();
      return !IsQuantizedTensorType(lhs_type) && IsQuantizedTensorType(rhs_type) &&
             !IsQuantizedTensorType(result_type);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.8K bytes
    - Viewed (0)
Back to top