Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 135 for getAttrOfType (0.35 sec)

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

        return failure();
      }
    
      // Builds TF operation and sets all the attributes.
      std::string node_name = "unnamed";
      if (const StringAttr attr = inst->getAttrOfType<StringAttr>("name")) {
        node_name = std::string(attr.getValue());
      }
      absl::StatusOr<std::unique_ptr<tensorflow::NodeDef>> node_def =
          tensorflow::ConvertTFDialectOpToNodeDef(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tf2xla/internal/mlir_bridge_pass_util.cc

        const llvm::StringRef tpu_replicate_attr_name(kTpuReplicateAttr.data(),
                                                      kTpuReplicateAttr.size());
        auto replicate_attr =
            op->getAttrOfType<mlir::StringAttr>(tpu_replicate_attr_name);
        if (replicate_attr) return mlir::WalkResult::interrupt();
        return mlir::WalkResult::advance();
      });
      return walk_result.wasInterrupted();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 12:22:33 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/modify_io_nodes.cc

            dequantize_op.erase();
          }
        }
      }
      return success();
    }
    
    void ModifyIONodesPass::runOnOperation() {
      auto func = getOperation();
      auto attrs = func->getAttrOfType<mlir::DictionaryAttr>("tf.entry_function");
    
      // Handle the entry functions only.
      if (func.getName() != "main" && (!attrs || attrs.empty())) {
        return;
      }
    
      OpBuilder builder(func);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/common/lift_as_function_call.cc

        } else {
          owner_op = attr_to_op_map[attribute];
    
          std::string new_attr_map_str{};
          if (owner_op->hasAttr(kAttrMapAttribute)) {
            new_attr_map_str =
                owner_op->getAttrOfType<StringAttr>(kAttrMapAttribute).str();
            absl::StrAppend(&new_attr_map_str, ",");
          }
    
          // Append "<identifier>:<attribute_name>". Ex) "0:transpose_a".
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_variable_runtime_reformatting.cc

      Region& body = while_op.getBody();
      Region& cond = while_op.getCond();
    
      llvm::SmallVector<std::pair<int64_t, llvm::SmallVector<Value, 4>>, 4> mapping;
      auto mirrored_variable_indices_attr =
          replicate->getAttrOfType<ArrayAttr>(kMirroredVariableIndicesAttr);
      if (!mirrored_variable_indices_attr) return mapping;
    
      // Finds the mapping from a replicate argument to an execute operand.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/dilated_conv.h

      }
      // Make sure Conv2D has 'VALID' padding.
      if (op->template getAttrOfType<StringAttr>("padding").getValue() != "VALID") {
        return rewriter.notifyMatchFailure(op,
                                           "Conv2D op doesn't have valid padding");
      }
      // Make sure dilations are all ones if set.
      const ArrayAttr& dilations =
          op->template getAttrOfType<ArrayAttr>("dilations");
      if (dilations && !TFIntListIsAllOnes(dilations)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 20K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/passes/lift_quantizable_spots_as_functions.cc

      // `xla_call_module_op`.
      bool Match(TF::XlaCallModuleOp xla_call_module_op) const {
        if (match_regex_ == nullptr) return false;
    
        const std::string lifted_func_name =
            xla_call_module_op->getAttrOfType<FlatSymbolRefAttr>("_entry_function")
                .getValue()
                .str();
    
        return RE2::FullMatch(lifted_func_name, *match_regex_);  // NOLINT
      }
    
     private:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 04:07:09 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc

        // contain the attribute names.
        // TransferQuantizationAttributes(rewriter, inner_op, attrs);
        std::string attr_map_str =
            inner_op.getAttrOfType<StringAttr>(kAttrMapAttribute).str();
        for (absl::string_view element_str : absl::StrSplit(attr_map_str, ',')) {
          std::vector<absl::string_view> key_and_value_pair =
              absl::StrSplit(element_str, ':');
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 54.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tf2xla/internal/passes/extract_outside_compilation.cc

    // outside compilation.
    LogicalResult CheckAncestorNotOutsideComp(Operation* op) {
      if (!op->getAttrOfType<StringAttr>(kXlaOutsideCompilationAttr))
        return mlir::success();
      Operation* iter_op = op;
      while (auto* parent_op = iter_op->getParentOp()) {
        if (parent_op->getAttrOfType<StringAttr>(kXlaOutsideCompilationAttr)) {
          return op->emitOpError()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 21:25:12 UTC 2024
    - 68.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/utils/device_util_test.cc

      DeviceSet device_set;
      for (auto& device : devices) device_set.AddDevice(device.get());
      AddDevicesToOp(*module_ref, &device_set);
    
      auto devices_attr =
          (*module_ref)->getAttrOfType<mlir::DictionaryAttr>("tf.devices");
      ASSERT_NE(devices_attr, nullptr);
      ASSERT_EQ(devices_attr.size(), 3);
    
      // CPU device added with an empty metadata.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.5K bytes
    - Viewed (0)
Back to top