Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for use_empty (0.29 sec)

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

    // results of the operation will be eliminated.
    void EliminateUnusedResults(
        Operation *op, const llvm::BitVector *results_to_eliminate = nullptr) {
      auto can_eliminate = [&](OpResult &result) -> bool {
        if (!result.use_empty()) return false;
        if (results_to_eliminate)
          return results_to_eliminate->test(result.getResultNumber());
        else
          return true;
      };
      SmallVector<Type, 4> new_result_types;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/reduce_while_operands.cc

      // i is consumed element if result(i) is used outside whileOp or
      // argument(i) is used in whileOp.getCond().
      for (auto i = 0; i < n; ++i) {
        if (!while_op.getResult(i).use_empty() ||
            !cond.getArgument(i).use_empty()) {
          explicitly_consumed_ids.push_back(i);
        }
      }
      // Empty consumed_element_ids implies none of results is used.
      if (explicitly_consumed_ids.empty()) {
        while_op.erase();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/parallel_execute_to_islands.cc

      // Add sink island to pin all islands as a control dependency if there is a
      // control dependency leading from the parallel_execute originally.
      if (!island_op.getControl().use_empty()) {
        llvm::SmallVector<Value, 8> island_operands;
        for (auto& execute : executes)
          island_operands.push_back(execute.getControl());
    
        builder.setInsertionPoint(island_op);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jan 19 19:47:16 UTC 2023
    - 11.1K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/replicate_to_island.cc

      // Add sink island to pin all replicas as a control dependency if there is a
      // control dependency leading from the replicate originally.
      if (!island_op.getControl().use_empty()) {
        llvm::SmallVector<Value, 8> island_operands;
        for (auto& replica : replicas)
          island_operands.push_back(replica.getControl());
    
        builder.setInsertionPoint(island_op);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jul 24 21:01:40 UTC 2023
    - 16.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/tests/canonicalize.mlir

      // CHECK: return %0#1 : tensor<f32>
      func.return %0#1 : tensor<f32>
    }
    
    // -----
    
    // Test case to test bug due to checking
    // `while_op.getResult(arg_index).use_empty()` instead of
    // `while_op.getResult(while_index).use_empty()` in the tfl.while
    // canonicalization.
    // arg0 is a pass through. After first iteration, arg_index = 0
    // and while_index = 1. Make arg1 use empty in block and condition, but not in
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 20.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantize_weight.cc

        for (Operation* connected_op : op.getResult().getUsers()) {
          ConvertOp convert_op = dyn_cast_or_null<ConvertOp>(connected_op);
          // Skip if no convert op exists.
          if (!convert_op || convert_op.getResult().use_empty()) continue;
    
          // Get types.
          const Type old_result_type = op.getResult().getType();
          const ShapedType new_result_type =
              mlir::dyn_cast<ShapedType>(convert_op.getType());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/tpu_resource_partitioning.cc

        if (failed(UpdateReadUses(read_var, partitioned_input, partitioned_read,
                                  partitioned_reads, is_packed)))
          return failure();
        read_var->erase();
        if (partitioned_input->use_empty()) partitioned_input->erase();
      }
      return mlir::TF::RemoveSingletonParallelExecuteOp(parallel_execute, &builder);
    }
    
    void TPUResourceReadsWritesPartitioningPass::runOnOperation() {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 11.8K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/transforms/prepare_composite_functions_tf.cc

      for (int i = 0; i < expected_num_outputs; ++i) {
        auto it = expected_consumer_indices.find(i);
        if (it == expected_consumer_indices.end()) {
          // Unexpected consumer.
          if (!call_op->getResult(i).use_empty()) return failure();
        }
      }
      return success();
    }
    
    LogicalResult CheckFusableKerasLstm(func::FuncOp lstm_func, ModuleOp module) {
      for (auto func : module.getOps<func::FuncOp>()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/post_quantize.cc

        if (op.getOperation()->template hasTrait<OpTrait::IsTerminator>()) {
          return failure();
        }
        for (auto result : op.getOperation()->getOpResults()) {
          if (!result.use_empty()) {
            return failure();
          }
        }
        // Remove if the custom op is in the provided map and is NoSideEffect.
        auto custom_op = llvm::isa<CustomOp>(op);
        if (custom_op) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_dynamic_range.cc

                                    arith::ConstantOp op) const {
        for (auto connected_op : op.getResult().getUsers()) {
          auto cast_op = dyn_cast_or_null<CastOp>(connected_op);
          if (!cast_op || cast_op.getResult().use_empty()) continue;
    
          // Get types
          Type old_result_type = op.getResult().getType();
          ShapedType new_result_type =
              mlir::dyn_cast<ShapedType>(cast_op.getType());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 20.8K bytes
    - Viewed (0)
Back to top