Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 89 for getOperands (0.4 sec)

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

      llvm::SmallSetVector<Value, 4> new_launch_op_results;
    
      new_launch_op_results.insert(
          old_launch_op->GetBody().getTerminator()->getOperands().begin(),
          old_launch_op->GetBody().getTerminator()->getOperands().end());
    
      for (Value operand : tpu_copy_with_dynamic_shape_op->getOperands()) {
        if (GetOpOfValue(operand)->getParentRegion() ==
            tpu_copy_with_dynamic_shape_op->getParentRegion()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/tpu_annotate_dynamic_shape_inputs.cc

             llvm::enumerate(cluster_func_op.getOperands())) {
          auto device_launch_op = llvm::dyn_cast<tf_device::LaunchOp>(
              GetOpOfValue(cluster_func_operand.value()));
          if (!device_launch_op) continue;
          for (auto result : llvm::zip(
                   device_launch_op.getResults(),
                   device_launch_op.GetBody().getTerminator()->getOperands())) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/tensor_device_copy_conversion.cc

        if (should_fold_op_func(op.getOperand(), op_device)) {
          op.replaceAllUsesWith(op.getOperand());
          op.erase();
        }
        return WalkResult::advance();
      });
    
      func_op.walk([&should_fold_op_func](TF::IdentityNOp op) {
        StringAttr op_device = op->getAttrOfType<StringAttr>(kDeviceAttr);
        bool should_fold = llvm::all_of(
            op.getOperands(), [&op_device, &should_fold_op_func](const Value &arg) {
    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/quantization/tensorflow/cc/constant_fold.cc

    LogicalResult FoldOperation(OpBuilder& builder, Operation* op,
                                SmallVector<Value>& results) {
      SmallVector<ElementsAttr> inputs;
      for (auto operand : op->getOperands()) {
        auto preceding_const_op = operand.getDefiningOp<TF::ConstOp>();
        if (preceding_const_op) {
          inputs.push_back(preceding_const_op.getValue());
          continue;
        }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/hoist_replicate_invariant_resource_writes.cc

              type.cast<TensorType>().getElementType().isa<TF::ResourceType>());
    }
    
    SmallVector<Value> GetAccessedResources(Operation& op) {
      SmallVector<Value, 4> accessed_resources;
      for (auto operand : op.getOperands()) {
        if (!IsResourceType(operand.getType())) continue;
        accessed_resources.push_back(operand);
      }
      return std::move(accessed_resources);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 5.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/utils/shape_inference_utils.cc

      assert(op->getName().getDialectNamespace() ==
             TensorFlowDialect::getDialectNamespace());
      return tfg::InferReturnTypeComponentsForTFOp(
          location, op, op->getOperands(), graph_version, operand_as_constant_fn,
          op_result_as_shape_fn, result_element_type_fn,
          tensorflow::GetAttrValuesFromOperation, inferred_return_shapes);
    }
    
    }  // namespace TF
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Dec 22 13:13:44 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/passes/unwrap_xla_call_module_op.cc

               call_op.getOperands())) {
        arg_mapper.map(func_arg, operand);
      }
    
      Region& function_body = func_op.getBody();
      IRMapping new_op_mapper;
      for (Operation& op : function_body.getOps()) {
        if (llvm::isa<func::ReturnOp>(op)) {
          for (auto [call_result, return_value] :
               llvm::zip_equal(call_op.getResults(), op.getOperands())) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 07:39:40 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/materialize_mlir_passthrough_op.cc

                             "single block\n";
          return;
        }
        Block &block = body.front();
        for (const auto &arg_mapping :
             llvm::zip(block.getArguments(), op->getOperands())) {
          std::get<0>(arg_mapping).replaceAllUsesWith(std::get<1>(arg_mapping));
        }
        op->getBlock()->getOperations().splice(op->getIterator(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 4.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/stablehlo/odml_converter/folders.cc

        };
        if (!llvm::all_of(operation->getOperands(), foldable_opr)) {
          return std::nullopt;
        }
        return FoldAdaptor(operation);
      }
    
      // Gets a list of ElementsAttr behind each constant operand.
      llvm::SmallVector<ElementsAttr> OperandData() {
        llvm::SmallVector<ElementsAttr> res;
        res.reserve(operation_->getNumOperands());
        for (auto opr : operation_->getOperands()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 06:11:55 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/decompose_hybrid_quantization.cc

                                    PatternRewriter &rewriter) const final {
        Operation *op = srcop.getOperation();
        bool allTypesFp = true;
        bool allTypesQuantizedOrInt = true;
        for (auto operand : op->getOperands()) {
          ShapedType type = mlir::dyn_cast<ShapedType>(operand.getType());
          if (!type) continue;
          allTypesFp &= !mlir::isa<quant::QuantizedType>(type.getElementType());
          allTypesQuantizedOrInt &=
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.8K bytes
    - Viewed (0)
Back to top