Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for IsResourceType (0.37 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)
Back to top