Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 86 for StringAttr (0.16 sec)

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

          if (block_arg.getParentRegion() != &func_op.getRegion()) {
            return false;
          }
          if (StringAttr attr = func_op.getArgAttrOfType<StringAttr>(
                  block_arg.getArgNumber(), kTFDeviceAttr)) {
            return op_device == attr;
          }
        } else if (StringAttr attr = arg.getDefiningOp()->getAttrOfType<StringAttr>(
                       kDeviceAttr)) {
          return op_device == attr;
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/error_util_test.cc

      // pass the filter.
      MLIRContext context;
      auto id =
          StringAttr::get(&context, "//tensorflow/python/keras/keras_file.py");
      auto loc = FileLineColLoc::get(&context, id, 0, 0);
      auto id2 =
          StringAttr::get(&context, "//tensorflow/python/something/my_test.py");
      auto loc2 = FileLineColLoc::get(&context, id2, 0, 0);
      auto id3 = StringAttr::get(&context, "python/tensorflow/show_file.py");
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Feb 26 03:47:51 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tfr/ir/tfr_types.h

        : public TypeStorage,
          public llvm::TrailingObjects<TFRTypeStorage, StringAttr> {
      using KeyTy = ArrayRef<StringAttr>;
    
      explicit TFRTypeStorage(unsigned num_attrs) : num_attrs(num_attrs) {}
    
      static TFRTypeStorage* construct(TypeStorageAllocator& allocator, KeyTy key) {
        // Allocate a new storage instance.
        auto byteSize = TFRTypeStorage::totalSizeToAlloc<StringAttr>(key.size());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 05 07:17:01 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/custom_call.cc

          rewriter.getStringAttr(mhlo_custom_call.getCallTargetName()));
    
      if (auto bc = mhlo_custom_call.getBackendConfig()) {
        if (auto stringattr = mlir::dyn_cast_or_null<mlir::StringAttr>(*bc)) {
          tfl_custom.setCustomOptionAttr(
              TFL::ConstBytesAttr::get(rewriter.getContext(), stringattr));
        }
      } else {
        tfl_custom.setCustomOptionAttr(
            TFL::ConstBytesAttr::get(rewriter.getContext(), ""));
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/colocate_tpu_copy_with_dynamic_shape.cc

        }
      }
    
      ChangeResult SetDevice(mlir::StringAttr device) {
        bool changed = (device != device_);
        device_ = device;
        return changed ? ChangeResult::Change : ChangeResult::NoChange;
      }
    
      bool hasDevice() const { return !!device_; }
    
      mlir::StringAttr getDevice() const { return device_; }
    
     private:
      mutable mlir::StringAttr device_;
    };
    
    class DeviceDataflowAnalysis
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Aug 23 00:30:27 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/utils/attribute_utils.cc

    namespace mlir {
    namespace TF {
    
    using ::tensorflow::kValidDeviceTypes;
    
    LogicalResult HasValidCompilationAndReplicationAttributes(Operation& op) {
      auto replicate_attr = op.getAttrOfType<StringAttr>(kReplicationInfoAttr);
      auto compile_attr = op.getAttrOfType<StringAttr>(kCompileDeviceTypeAttr);
      if (!replicate_attr && !compile_attr) return success();
      if (!replicate_attr || !compile_attr)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 22:03:30 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tfrt/ir/tfrt_fallback_common.h

      for (auto op_attr : op_func_attr_array) {
        auto key_value = mlir::dyn_cast<mlir::ArrayAttr>(op_attr);
        if (!key_value || key_value.getValue().size() != 2 ||
            !mlir::isa<mlir::StringAttr>(key_value.getValue()[0]) ||
            !mlir::isa<mlir::StringAttr>(key_value.getValue()[1]))
          return op.emitOpError() << "each op_func_attr should be a key-value "
                                     "pair, where both the key and the value are "
    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/lite/utils/perception_ops_utils_test.cc

      SmallVector<::mlir::NamedAttribute, 3> fields;
    
      auto padding_id = ::mlir::StringAttr::get(context, "padding");
      fields.emplace_back(padding_id, StringAttr::get(context, padding));
    
      auto pool_size_id = ::mlir::StringAttr::get(context, "pool_size");
      fields.emplace_back(pool_size_id, pool_size);
    
      auto strides_id = ::mlir::StringAttr::get(context, "strides");
      fields.emplace_back(strides_id, strides);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Sep 29 21:02:21 UTC 2022
    - 7.4K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/constant_op_device_assignment.cc

    void ConstantOpDeviceAssignmentPass::runOnOperation() {
      ModuleOp module = getOperation();
    
      module.walk([&](TF::ConstOp op) {
        // Keep the ConstOp if the op already have the device attribute.
        if (StringAttr device_attr = op->getAttrOfType<StringAttr>(kDeviceAttr)) {
          return WalkResult::advance();
        }
        OpBuilder builder(op);
        llvm::StringMap<mlir::Operation *> cloned_op_by_device;
        bool all_uses_replaced = true;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 3.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/readonly_references_to_resources.cc

      // Parse node name from the `shared_name` attribute first. The variable v2 op
      // relies on the share name to look up from the TensorFlow's resource manager.
      StringAttr shared_name_attr = op->getAttrOfType<StringAttr>(kSharedNameAttr);
      if (shared_name_attr) {
        auto shared_name = StringRef(shared_name_attr.getValue());
        if (!shared_name.empty()) {
          return shared_name;
        }
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.8K bytes
    - Viewed (0)
Back to top