Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for IfRegionOp (0.17 sec)

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

    void MergeIfPerSegment(
        llvm::SmallVector<TF::IfRegionOp, 8>& if_op_segment,
        llvm::SmallVector<Operation*, 8>& moved_ops_list,
        llvm::SmallSetVector<TF::IfRegionOp, 8>& regions_to_remove,
        llvm::SmallDenseMap<Operation*, TF::IfRegionOp>& old_to_new_IfRegion_map) {
      TF::IfRegionOp first_if = if_op_segment[0];
      llvm::SmallVector<Type, 4> merged_return_types;
      llvm::SmallVector<TF::IfRegionOp, 8> sources_if_ops(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 17 07:31:01 UTC 2023
    - 25.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/decompose_reduce_dataset.cc

      builder.create<YieldOp>(loc, cond_block->getArgument(0));
    }
    
    // Create an IfRegionOp with a predicate from `optional_has_value`.  If true, it
    // uses `get_next` to get the next value and calls `reduce_func`.  `body_args`
    // is used as pass through of state values for else branch.  `dataset_types` is
    // used for constructing the CallOp for `reduce_func`.
    IfRegionOp CreateOptionalDatasetIf(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/convert_tf_control_flow_to_scf.cc

                           destination_block->getArguments());
    }
    
    /// Convert the `tf.IfRegion` op to the `scf.if` op.
    class ConvertIfRegionOp : public OpRewritePattern<IfRegionOp> {
     public:
      using OpRewritePattern<IfRegionOp>::OpRewritePattern;
    
      LogicalResult matchAndRewrite(IfRegionOp op,
                                    PatternRewriter& rewriter) const override {
        // Creates the `then` or `else` region of the `scf.if` op. Note that
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 9.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/mlprogram.cc

      pm.addNestedPass<mlir::func::FuncOp>(
          mlir::TFDevice::CreateDecomposeResourceOpsPass());
      pm.addPass(mlir::TF::CreateNameAnonymousIteratorsPass());
    
      // This will add regions to IfOp/WhileOp (turning them into IfRegionOp
      // and WhileRegionOp), but be aware that those regions will still contain
      // calls.
      pm.addPass(mlir::TF::CreateTFFunctionalControlFlowToRegions());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jan 09 22:39:15 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/functional_control_flow_to_regions.cc

      return to_bool;
    }
    
    // Transform a functional IfOp to a region based IfRegionOp.
    LogicalResult ConvertIfOp(IfOp if_op) {
      Value cond = ConvertConditionToBoolean(if_op, if_op.getCond());
      OpBuilder builder(if_op);
      auto if_region = builder.create<TF::IfRegionOp>(
          if_op.getLoc(), if_op.getResultTypes(), cond, if_op.getIsStateless(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.cc

    class FoldConstantIfRegionOp : public OpRewritePattern<TF::IfRegionOp> {
     public:
      explicit FoldConstantIfRegionOp(MLIRContext* context)
          : OpRewritePattern<TF::IfRegionOp>(context) {}
      LogicalResult matchAndRewrite(TF::IfRegionOp op,
                                    PatternRewriter& rewriter) const override;
    };
    
    LogicalResult FoldConstantIfRegionOp::matchAndRewrite(
        TF::IfRegionOp op, PatternRewriter& rewriter) const {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 146.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/region_control_flow_to_functional.cc

        callee_names = {first_call.value().getCallee(),
                        second_call.value().getCallee()};
      }
    };
    
    // Transform IfRegionOp to IfOp.
    LogicalResult RegionControlFlowToFunctional::ConvertIfOp(
        SymbolTableCollection& symbol_table, IfRegionOp if_region) {
      llvm::SmallVector<Value, 4> extern_values;
    
      // For IfOp, arguments of calls in the then and else regions match if they
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tf2xla/internal/passes/extract_outside_compilation.cc

              /*device_ordinal=*/builder.getI64IntegerAttr(0), device_type_attr),
          builder);
    }
    
    // Clones an IfRegionOp 'if_region' and attributes and creates then/else regions
    // with yield op and an empty block.
    mlir::TF::IfRegionOp CloneEmptyIfWithPredicate(mlir::TF::IfRegionOp if_region,
                                                   OpBuilder& builder) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 21:25:12 UTC 2024
    - 68.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/stablehlo/passes/insert_calibration_statistics_saver.cc

      return success();
    }
    
    // Returns true if the op contains a `CalibrationStatisticsSaverOp`.
    bool ContainCalibrationStatisticsSaverOp(Operation* op) {
      // Check the region for CaseRegionOp, IfRegionOp and WhileRegionOp.
      for (Region& region : op->getRegions()) {
        if (!region.getOps<TF::CalibrationStatisticsSaverOp>().empty()) {
          return true;
        }
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 06:31:57 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/analysis/resource_value_typed_analyzer.cc

    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 09:04:13 UTC 2024
    - 8K bytes
    - Viewed (0)
Back to top