Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 51 for use_empty (0.4 sec)

  1. tensorflow/compiler/mlir/lite/transforms/optimize.cc

        int32_t k_indices = k_indices_or.value();
        // We don't match two SliceOp with different sizes.
        if (k_values != k_indices && !values.use_empty() && !indices.use_empty())
          return failure();
    
        // Start replacing.
        auto k = !values.use_empty() ? k_values : k_indices;
        // Build scalar tensor k.
        auto k_ty = mlir::RankedTensorType::get({}, rewriter.getIntegerType(32));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 102.3K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_initializer_function_ops_to_main.cc

      for (auto [src_arg_idx, src_arg] :
           llvm::enumerate(src_func_op.getArguments())) {
        // No need to create a mapping when there is no usage - it will not affect
        // the cloning.
        if (src_arg.use_empty()) continue;
    
        const unsigned main_arg_idx = main_func_op.getNumArguments();
    
        const DictionaryAttr main_arg_attr =
            src_func_op.getArgAttrDict(src_arg_idx);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun May 12 12:54:52 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/passes/replace_stablehlo_ops_in_main_function_with_xla_call_module_ops.cc

      OpBuilder builder(main_func.getContext());
      for (auto constant_op :
           main_func.getBody().getOps<mlir::stablehlo::ConstantOp>()) {
        builder.setInsertionPointAfter(constant_op);
        if (constant_op.getResult().use_empty() ||
            constant_op.getResult().hasOneUse())
          continue;
        // Do not duplicate constant op if the size is too large.
        // 32 is chosen to be larger than all constants useful for shape references,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_rewrite_pass.cc

        return signalPassFailure();
    
      // Eliminate TPUCompilationResultOp now that the rewrite is complete.
      for (auto& it : compilation_results) {
        for (auto op : it.second) {
          if (!op.use_empty()) {
            mlir::InFlightDiagnostic err = op.emitError("uses remain post rewrite");
            for (auto user : op->getUsers())
              err.attachNote(user->getLoc()) << "remaining user";
            return signalPassFailure();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 21:25:12 UTC 2024
    - 29.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_merge_variables_with_execute.cc

      }
    
      // Remove the read ops if they have no more uses.
      for (const auto& entry : var_access_info.per_resource_info) {
        const auto& info = entry.getSecond();
        if (info.read->use_empty()) info.read->erase();
      }
      return success();
    }
    
    // Checks if an ops parent is a tf_device.parallel_execute and the region the
    // op is in is perfectly wrapped.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 29 17:52:11 UTC 2024
    - 27K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/region_control_flow_to_functional.cc

          then_name, else_name, if_region.getIsStateless());
      CopyAndOverrideAttributes(if_region, if_op, &builder);
    
      if_region.replaceAllUsesWith(if_op.getResults());
      if_region.erase();
    
      if (to_bool && to_bool.use_empty()) to_bool.erase();
      return success();
    }
    
    // Transform CaseRegion to Case.
    LogicalResult RegionControlFlowToFunctional::ConvertCaseOp(
        SymbolTableCollection& symbol_table, CaseRegionOp case_region) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.7K bytes
    - Viewed (0)
Back to top