Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for IsResourceType (0.18 sec)

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

    // similar. Move to common utils.
    bool IsResourceType(Type type) {
      return type.isa<TF::ResourceType>() ||
             (type.isa<TensorType>() &&
              type.cast<TensorType>().getElementType().isa<TF::ResourceType>());
    }
    
    SmallVector<Value> GetAccessedResources(Operation& op) {
      SmallVector<Value, 4> accessed_resources;
      for (auto operand : op.getOperands()) {
        if (!IsResourceType(operand.getType())) continue;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 5.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/analysis/resource_value_typed_analyzer.cc

    namespace mlir {
    namespace TF {
    namespace {
    
    bool IsResourceType(Type type) {
      if (auto tensor_type = mlir::dyn_cast<TensorType>(type)) {
        return mlir::isa<TF::ResourceType>(tensor_type.getElementType());
      }
      return false;
    }
    
    bool IsResource(Value value) { return IsResourceType(value.getType()); }
    
    // Helper that returns the FuncOp that is the SessionInit function which
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 09:04:13 UTC 2024
    - 8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/convert_control_to_data_outputs.cc

      }
    
      for (auto& arg : op->getOpOperands()) {
        Value v = arg.get();
        if (!IsResourceType(arg.get().getType())) continue;
        if (alias_analysis.IsUnknownResource(v)) continue;
        for (auto id : alias_analysis.GetResourceUniqueIds(v)) {
          (void)id;
        }
      }
    
      for (auto& arg : op->getOpOperands()) {
        if (!IsResourceType(arg.get().getType())) {
          continue;
        }
        auto lattice =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/sparsecore/embedding_sequencing.cc

      // Convert a list of mlir::Value's into a list of mlir::Type's
      std::vector<Type> types;
      types.reserve(input.size());
      for (auto val : input) types.push_back(val.getType());
      return types;
    }
    
    bool IsResourceType(Type val_type) {
      if (auto tensor_type = mlir::dyn_cast<mlir::TensorType>(val_type)) {
        if (mlir::isa<TF::ResourceType>(tensor_type.getElementType())) {
          return true;
        }
      }
      return false;
    }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 39.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/sparsecore/embedding_pipelining.cc

    static constexpr char kLower[] = "_lower_using_switch_merge";
    static constexpr llvm::StringRef kTpuCompilationStatus =
        "_tpu_compilation_status";
    
    namespace mlir {
    namespace TFDevice {
    namespace {
    
    bool IsResourceType(Type val_type) {
      if (auto tensor_type = mlir::dyn_cast<mlir::TensorType>(val_type)) {
        if (mlir::isa<TF::ResourceType>(tensor_type.getElementType())) {
          return true;
        }
      }
      return false;
    }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 92.9K bytes
    - Viewed (0)
Back to top