Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 190 for StringAttr (0.14 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/tpu_validate_inputs.cc

                             Operation* parent) {
      int num_replicas = metadata.getNumReplicas();
      int num_cores_per_replica = metadata.getNumCoresPerReplica();
      StringAttr tpu_replicate_attr =
          metadata->getAttrOfType<StringAttr>(TF::kTpuReplicateAttr);
      if (auto repinput = dyn_cast<TF::TPUReplicatedInputOp>(op)) {
        if (!ValidateReplicatedInput(repinput, num_replicas, tpu_replicate_attr))
          return false;
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 06:51:01 UTC 2024
    - 21.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_main_function.cc

      func_attrs.push_back(
          {StringAttr::get(context, "inputs"),
           StringAttr::get(context, absl::StrJoin(input_names, ","))});
      func_attrs.push_back(
          {StringAttr::get(context, "outputs"),
           StringAttr::get(context, absl::StrJoin(output_names, ","))});
      auto dictAttr = DictionaryAttr::get(context, func_attrs);
      main_func->setAttr(StringAttr::get(context, kEntryFunctionAttr), dictAttr);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. tensorflow/compiler/mlir/tensorflow/transforms/tpu_device_propagation.cc

    // propagated through.
    bool IsSupportedExecutorOp(Operation& op) {
      auto ops_have_same_device = [](Operation* lhs, Operation* rhs) {
        auto lhs_device_attr = lhs->getAttrOfType<StringAttr>(kDeviceAttr);
        auto rhs_device_attr = rhs->getAttrOfType<StringAttr>(kDeviceAttr);
        return (!lhs_device_attr && !rhs_device_attr) ||
               (lhs_device_attr && rhs_device_attr &&
                lhs_device_attr.getValue() == rhs_device_attr.getValue());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  10. 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)
Back to top