Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 230 for eraseOp (0.21 sec)

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

      CreateRegionWithCall(while_op.cond_function(), new_op.getCond(), loc);
      CreateRegionWithCall(while_op.body_function(), new_op.getBody(), loc);
    
      op->replaceAllUsesWith(new_op.getResults());
      op->erase();
    }
    
    void LegalizeWhilePass::RunOnFunction(func::FuncOp func) {
      // Convert all TF WhileOps inside the function body to TFL While ops.
      func.getBody().walk([](TF::WhileOp while_op) { RunOnWhile(while_op); });
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/hoist_replicate_invariant_resource_writes.cc

        auto index = indexed_assign.index();
        assign_op->moveAfter(new_replicate_op);
        assign_op->setOperand(
            1, new_replicate_op->getResult(old_num_results + num_replicas * index));
      }
      replicate_op->erase();
    }
    
    // Looks for AssignVariable ops from the end of the tf_device.replicate op. It
    // returns all the last writes to replicate invariant resource variables
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 5.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/xla_rewrite.cc

          ValueRange(resource_args), cluster_func_op.getFuncAttr());
    
      CopyDeviceAndUnderscoredAttributes(cluster_func_op, xla_launch_op);
      cluster_func_op.replaceAllUsesWith(xla_launch_op.getResults());
      cluster_func_op.erase();
    }
    
    void XlaRewritePass::runOnOperation() {
      ModuleOp module = getOperation();
      SymbolTable symtab(module);
      OpBuilder builder(&getContext());
      module.walk([&](tf_device::ClusterFuncOp cluster_func_op) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/device_index_selector.cc

        DenseElementsAttr attr =
            DenseElementsAttr::get(type, b.getI32IntegerAttr(index));
        auto constant = b.create<arith::ConstantOp>(op.getLoc(), type, attr);
        op.replaceAllUsesWith(constant.getOperation());
        op.erase();
      });
    }
    
    // Creates an instance of the TensorFlow DeviceIndex selector pass.
    std::unique_ptr<OperationPass<func::FuncOp>> CreateDeviceIndexSelectorPass() {
      return std::make_unique<DeviceIndexSelector>();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/freeze_saved_model_assets.cc

                init_op.getLoc(), init_op.getTableHandle(), const_op.getResult(),
                init_op.getKeyIndex(), init_op.getValueIndex(),
                init_op.getVocabSize(), init_op.getDelimiter());
            init_op.erase();
          }
        }
        func.eraseArguments(args_to_erase);
      }
    }
    
    }  // namespace
    
    std::unique_ptr<OperationPass<ModuleOp>> CreateFreezeAssetsPass(
        std::string saved_model_dir) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jan 30 01:12:09 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/materialize_mlir_passthrough_op.cc

        Operation &return_op = block.front();
        for (auto ret_mapping :
             llvm::zip(op->getResults(), return_op.getOperands())) {
          std::get<0>(ret_mapping).replaceAllUsesWith(std::get<1>(ret_mapping));
        }
        op->erase();
      });
    }
    
    }  // namespace
    
    namespace TF {
    std::unique_ptr<OperationPass<func::FuncOp>>
    CreateMaterializePassthroughOpPass() {
      return std::make_unique<MaterializePassthroughOpPass>();
    }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 4.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/transforms/unfold_large_splat_constant.cc

        TFL::FillOp fill = op_builder->create<TFL::FillOp>(
            const_op->getLoc(), splat_elements_attr.getType(), fill_shape,
            fill_value);
        const_op->replaceAllUsesWith(fill);
        const_op->erase();
      }
    };
    
    }  // namespace
    
    std::unique_ptr<OperationPass<ModuleOp>> CreateUnfoldLargeSplatConstantPass() {
      return std::make_unique<UnfoldLargeSplatConstantPass>();
    }
    
    }  // namespace TFL
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/tpu_identity_pruning.cc

    // results.
    void RemoveIdentityFromRegion(Region& region) {
      region.walk([](Operation* op) {
        if (isa<TF::IdentityOp, TF::IdentityNOp>(op)) {
          op->replaceAllUsesWith(op->getOperands());
          op->erase();
        }
      });
    }
    
    void TPUIdentityPruning::runOnOperation() {
      SmallVector<tf_device::ClusterOp, 4> clusters;
      getOperation().walk(
          [&](tf_device::ClusterOp cluster) { clusters.push_back(cluster); });
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 4.1K bytes
    - Viewed (0)
  9. tensorflow/c/eager/tape.h

      it->second--;
      if (it->second != 0) {
        return;
      }
      tensor_usage_.erase(it);
      auto tensor_op_it = tensor_tape_.find(tensor_id);
      if (tensor_op_it == tensor_tape_.end()) {
        return;
      }
      const int64_t op_id = tensor_op_it->second;
      if (op_id == -1) {
        // Do not delete watched tensors.
        return;
      }
      tensor_tape_.erase(tensor_op_it);
      auto op_it = op_tape_.find(op_id);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 02 12:40:29 UTC 2024
    - 47.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/while_loop_outline.cc

        }
        args.append(new_args.begin(), new_args.end());
      } else {
        args.append(yield_op->operand_begin(), yield_op->operand_end());
      }
      b.create<func::ReturnOp>(yield_op->getLoc(), args);
      yield_op->erase();
      SymbolTable(region.getParentOfType<ModuleOp>()).insert(outlined_func);
      outlined_func.setPrivate();
      return outlined_func;
    }
    
    // Replace region with call to outline function.
    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