Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for IfRegionOp (0.19 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. tensorflow/compiler/mlir/tensorflow/transforms/tensor_list_ops_decomposition.cc

      }
      while_op.replaceAllUsesWith(
          new_while.getResults().take_front(while_op.getNumResults()));
      while_op.erase();
      return success();
    }
    
    LogicalResult HandleIfRegionOp(
        TF::IfRegionOp if_op, ModuleOp module,
        llvm::SmallDenseMap<Value, SizeInfo>* buffer_to_size,
        llvm::StringMap<PartitionedCallDecompositionInfo>*
            decomposed_partitioned_call_callees) {
      // Rewrite the branches.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 39.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/prepare_tpu_computation_for_tf_export.cc

          op);
    }
    
    // Returns true if the given op is one of ops supported to have communication
    // subcomputation in the TF/XLA bridge.
    bool SupportsCommunicationComputation(Operation* op) {
      return isa<TF::IfRegionOp, TF::WhileRegionOp, TF::CaseRegionOp,
                 TF::XlaCallModuleOp, TF::StatefulPartitionedCallOp,
                 TF::PartitionedCallOp, TF::LegacyCallOp>(op);
    }
    
    #define GEN_PASS_DEF_PREPARETPUCOMPUTATIONFORTFEXPORTPASS
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.8K bytes
    - Viewed (0)
Back to top