Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 42 for getRegions (0.19 sec)

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

      // _TPUDeviceOrdinalPlaceholder implicitly depends on the replica.
      if (llvm::isa<TF::_TPUDeviceOrdinalPlaceholderOp>(op)) return false;
    
      bool has_replicate_operands = false;
      visitUsedValuesDefinedAbove(op->getRegions(), [&](OpOperand* operand) {
        if (!ancestor_of_replicate(operand->get().getParentRegion()))
          has_replicate_operands = true;
      });
    
      return !has_replicate_operands;
    }
    
    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/tensorflow/analysis/resource_alias_analysis.cc

      // but we also need to analyze regions attached to other ops.
      module->walk([this](Operation* op) {
        if (op->hasTrait<OpTrait::NoTerminator>()) return;
        for (Region& region : op->getRegions()) GetOrCreateAnalysis(region);
      });
    }
    
    // Backtracks the definition of `value` looking through passthrough ops.
    // Returns a non-null value and can return `value` if backtracking is not
    // possible.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 09:04:13 UTC 2024
    - 28.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/remove_unused_arguments.cc

      for (int i = 0; i < op->getNumRegions(); ++i) {
        state.addRegion();
      }
      Operation* new_op = builder.create(state);
      for (const auto& indexed_regions : llvm::enumerate(op->getRegions())) {
        Region& region = op->getRegion(indexed_regions.index());
        IRMapping mapping;
        indexed_regions.value().cloneInto(&region, mapping);
      }
      int new_position = 0;
      for (auto result : op->getResults()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.h

          if (candidate_op->getNumRegions() != 0) {
            for (const auto& indexed_regions :
                 llvm::enumerate(candidate_op->getRegions())) {
              Region& target_region =
                  quantized_op->getRegion(indexed_regions.index());
              IRMapping mapping;
              indexed_regions.value().cloneInto(&target_region, mapping);
            }
          }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.cc

            new_state.addRegion();
          }
          Operation* quantized_op = rewriter.create(new_state);
          for (const auto& [index, region] :
               llvm::enumerate(op_with_region->getRegions())) {
            Region& target_region = quantized_op->getRegion(index);
            IRMapping mapping;
            region.cloneInto(&target_region, mapping);
          }
    
          const Type operand_type = quantized_op->getOperandTypes()[0];
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 06:04:36 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/tensor_list_ops_decomposition.cc

        (*buffer_to_size)[new_op.getResult(std::get<0>(entry))] = {
            new_op.getResult(std::get<1>(entry)), std::get<2>(entry)};
      }
    
      for (auto pair : llvm::zip(new_op.getRegions(), case_op.getRegions())) {
        std::get<0>(pair)->takeBody(*std::get<1>(pair));
      }
      case_op.replaceAllUsesWith(
          new_op.getResults().take_front(case_op.getNumResults()));
      case_op.erase();
      return success();
    }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 39.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/passes/convert_func_to_bfloat16.cc

        OperationState state(op->getLoc(), op->getName().getStringRef(), operands,
                             new_results, op->getAttrs(), op->getSuccessors());
        for (Region& region : op->getRegions()) {
          Region& new_region = *state.addRegion();
          rewriter.inlineRegionBefore(region, new_region, new_region.begin());
          if (failed(rewriter.convertRegionTypes(&new_region, *getTypeConverter())))
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_stablehlo_to_vhlo.cc

            rewriter.setInsertionPointAfter(value.getDefiningOp());
            ConvertAndWrapUsesInUnrealizedCast(value, converter, rewriter);
          }
    
          // Convert block arguments
          for (auto &region : op->getRegions()) {
            for (auto &block : region.getBlocks()) {
              rewriter.setInsertionPointToStart(&block);
              for (auto arg : block.getArguments()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 19:48:51 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_with_tf2xla.cc

            TF::TensorFlowDialect::getDialectNamespace())
          return failure();
    
        // Refining types may have implications to the attached regions or symbol
        // references so do not update such ops.
        if (!op->getRegions().empty() || HasSymbolRefAttr(op)) return failure();
    
        IRMapping mapper;
        bool has_type_change = false;
        for (auto [original, updated] : llvm::zip(op->getOperands(), operands)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_types.cc

        OperationState state(op->getLoc(), op->getName().getStringRef(), operands,
                             new_results, op->getAttrs(), op->getSuccessors());
        for (Region &region : op->getRegions()) {
          Region &new_region = *state.addRegion();
          rewriter.inlineRegionBefore(region, new_region, new_region.begin());
          if (failed(rewriter.convertRegionTypes(&new_region, *getTypeConverter())))
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.6K bytes
    - Viewed (0)
Back to top