Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 190 for StringAttr (0.25 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_duplicate_resource_ops.cc

      return nullptr;
    }
    
    // Returns the `shared_name` attribute value if exists. If not, returns an
    // empty string.
    StringRef GetSharedName(Operation* op) {
      if (!op->hasAttrOfType<StringAttr>(kSharedNameAttr)) return "";
      return op->getAttrOfType<StringAttr>(kSharedNameAttr).getValue();
    }
    
    // Gets the GraphOp from the function op. Returns an empty op iff it doesn't
    // exist.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 26 04:26:16 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/tpu_dynamic_layout_pass.cc

        if (!is_generator(alias)) return true;
    
        StringAttr device;
        if (auto arg = mlir::dyn_cast<BlockArgument>(alias)) {
          device = func.getArgAttrOfType<mlir::StringAttr>(arg.getArgNumber(),
                                                           kFuncDeviceAttr);
        } else {
          device = alias.getDefiningOp()->getAttrOfType<StringAttr>(kDeviceAttr);
        }
    
        if (!device) return false;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/passes/add_dump_tensor_op.cc

      return std::make_pair(f_attr.getValue().str(), kEmptyNodeName.str());
    }
    
    Operation *DuplicateOp(TF::PartitionedCallOp call_op, PatternRewriter &rewriter,
                           const StringAttr &new_ref_func_name) {
      // Create PartitionedCallOp to the copied composite function. This
      // PartitionedCallOp does not have kQuantTraitAttrName, and therefore won't
      // get quantized.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 22:55:22 UTC 2024
    - 13K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/utils/xla_sharding_util.cc

      if (!mlir::isa<mlir::StringAttr>(shard_attr)) return mlir::failure();
    
      auto shard_str = mlir::cast<mlir::StringAttr>(shard_attr).getValue().str();
      return DecodeShardingAttribute(shard_str, sharding, report_error);
    }
    
    void EncodeSharding(mlir::Operation* op, llvm::StringRef shard_str) {
      if (!op->hasAttrOfType<mlir::StringAttr>(shard_str)) return;
    
      ::xla::OpSharding sharding;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 21:28:13 UTC 2024
    - 34K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_layout_helper.h

      auto perm = GetDataFormatPermutation(op->getDataFormat(), data_format);
      if (perm.empty()) return failure();
    
      // Update data format attribute.
      (*op)->setAttr("data_format", StringAttr::get(op->getContext(), data_format));
    
      // Update types for all layout sensitive results.
      auto layout_sensitive = cast<LayoutSensitiveInterface>(op->getOperation());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 08 01:19:25 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/translate/export_graphdef.cc

      if (dict_attr) {
        TF_RET_CHECK(mlir::isa<mlir::StringAttr>(dict_attr.get("inputs")))
            << "inputs missing in entry function attribute";
        TF_RET_CHECK(mlir::isa<mlir::StringAttr>(dict_attr.get("outputs")))
            << "outputs missing in entry function attribute";
        mlir::cast<mlir::StringAttr>(dict_attr.get("inputs"))
            .getValue()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 11:17:36 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tf2xla/api/v2/tf_executor_to_graph.cc

      if (dict_attr) {
        TF_RET_CHECK(mlir::isa<mlir::StringAttr>(dict_attr.get("inputs")))
            << "inputs missing in entry function attribute";
        TF_RET_CHECK(mlir::isa<mlir::StringAttr>(dict_attr.get("outputs")))
            << "outputs missing in entry function attribute";
        mlir::cast<mlir::StringAttr>(dict_attr.get("inputs"))
            .getValue()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 06 23:04:51 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/experimental/tac/common/targets.h

      auto device = op->getAttrOfType<StringAttr>(kDevice);
      if (device == nullptr || device.getValue().empty()) return std::nullopt;
    
      return GetCanonicalHardwareName(device.getValue().str());
    }
    
    // Get inference type attribute from the operation if available.
    inline std::optional<InferenceType> GetInferenceTypeAnnotation(Operation* op) {
      auto inference_type = op->getAttrOfType<StringAttr>(kInferenceType);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 06 03:08:33 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/executor_tpuv1_outline_tpu_island.cc

            islands_to_outline.push_back(island_op);
            break;
          }
          auto device_type =
              op.getAttrOfType<StringAttr>(TF::kCompileDeviceTypeAttr);
          if (device_type && device_type.getValue() == TF::kTpuDevice &&
              !op.hasAttrOfType<StringAttr>(TF::kReplicationInfoAttr)) {
            // Handle single-core TPU case (no `TPUReplicateMetadataOp`).
            islands_to_outline.push_back(island_op);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/ir/host_runtime/tfrt_ops.cc

        if (mlir::isa<TF::ResourceType>(
                getElementTypeOrSelf(iter.value().getType()))) {
          resource_vec.push_back(GetResourceHandleValueAndIdBase(
              mlir::cast<mlir::StringAttr>(getContainer()[index]).getValue(),
              mlir::cast<mlir::StringAttr>(getSharedName()[index]).getValue(),
              device, getResults()[index], resource_handle_id_map, next_id));
        }
      }
      return resource_vec;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.6K bytes
    - Viewed (0)
Back to top