Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 62 for getAttrOfType (0.17 sec)

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

      m.walk([&](tf_device::ClusterFuncOp cluster_func) {
        auto replicate = cluster_func->getParentOfType<tf_device::ReplicateOp>();
        if (!replicate) return;
        auto mirrored_variable_indices_attr =
            replicate->getAttrOfType<ArrayAttr>(kMirroredVariableIndicesAttr);
        llvm::SmallDenseSet<int64_t, 8> mirrored_replicate_args;
        if (mirrored_variable_indices_attr) {
          for (const auto& mirrored_index : mirrored_variable_indices_attr) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_duplicate_resource_ops.cc

    }
    
    // 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.
    // TODO(b/284222084): Move executor dialect utilities to a new library.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 26 04:26:16 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/stablehlo/passes/unwrap_xla_call_module_op.cc

      // TODO - b/310539922: Remove reference to TF/TFL utils.
      if (call_op->hasAttr(kQuantTraitAttrName)) {
        return;
      }
    
      auto function_name = call_op
                               ->getAttrOfType<FlatSymbolRefAttr>(
                                   TF::kStablehloEntryFunctionAttrName)
                               .getValue();
      func::FuncOp func_op = symbol_table.lookup<func::FuncOp>(function_name);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 07:39:40 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/tpu_host_computation_expansion.cc

    namespace mlir {
    namespace TFTPU {
    
    namespace {
    
    constexpr char kXlaOutsideCompilationAttr[] = "_xla_outside_compilation";
    
    bool HasOutsideCompilationAttribute(Operation* op) {
      return op->getAttrOfType<StringAttr>(kXlaOutsideCompilationAttr) != nullptr;
    }
    
    // Finds op that created a given value. If the value is a BlockArgument, this
    // returns the owner of the Block.
    Operation* GetOpOfValue(Value value) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/ir/tf_saved_model_test.cc

          module_op, /*initializer_type=*/kTfSavedModelInitializerInitType);
    
      EXPECT_THAT(init_func_op, NotNull());
      EXPECT_THAT(init_func_op.getSymName(), "init_func");
      EXPECT_THAT(
          init_func_op->getAttrOfType<StringAttr>(kTfSavedModelInitializerTypeAttr),
          kTfSavedModelInitializerInitType);
    }
    
    TEST_F(TfSavedModelTest, GetInitializerFunctionNoMatchingInitializerType) {
      constexpr StringRef kModuleOpStr = R"mlir(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 01 05:03:09 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/colocate_tpu_copy_with_dynamic_shape.cc

                          ArrayRef<const Device *> results) override {
        if (llvm::isa<TF::TPUExecuteOp>(op) ||
            llvm::isa<TF::TPUExecuteAndUpdateVariablesOp>(op)) {
          auto device = op->getAttrOfType<StringAttr>(kDevice);
          for (auto *operand : operands)
            propagateIfChanged(operand, operand->SetDevice(device));
        } else {
          // Propagate device through other ops. These ops might have their
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Aug 23 00:30:27 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/cc/convert_asset_args.cc

    // "arg0:0,arg1:0"}`, then this function returns `{"arg0:0", "arg1:0"}`.
    SmallVector<StringRef> GetEntryFunctionInputs(func::FuncOp func_op) {
      auto entry_function_attr =
          func_op->getAttrOfType<DictionaryAttr>("tf.entry_function");
    
      SmallVector<StringRef> inputs;
      mlir::dyn_cast_or_null<StringAttr>(entry_function_attr.get("inputs"))
          .strref()
          .split(inputs, /*Separator=*/",");
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/launch_to_device_attribute.cc

    LogicalResult AssignDevicesInRegion(const Dialect* tf_dialect,
                                        tf_device::LaunchOp launch,
                                        Region& region) {
      auto parallel_group_attr =
          launch->getAttrOfType<StringAttr>(TF::kParallelExecAnnotation);
      auto result = region.walk([&](Operation* op) -> WalkResult {
        if (op->getDialect() != tf_dialect) return WalkResult::advance();
    
        if (parallel_group_attr) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/tpu_annotate_dynamic_shape_inputs.cc

      getOperation().walk([&](tf_device::ClusterFuncOp cluster_func_op) {
        Builder builder(cluster_func_op->getContext());
        // Skip non-tpu device cluster_func.
        auto cluster_id =
            cluster_func_op->getAttrOfType<StringAttr>(TF::kReplicationInfoAttr);
        if (!cluster_id) return WalkResult::advance();
    
        llvm::SmallVector<int, 4> dynamic_shape_arg_index;
    
        // Traverse the operands of the cluster func op and find which operand
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/utils/eval_util.cc

      auto clean_status = MakeCleanup([status] { TF_DeleteStatus(status); });
    
      // Builds TF operation and sets all the attributes.
      std::string node_name = "unnamed";
      if (auto attr = inst->getAttrOfType<mlir::StringAttr>("name")) {
        node_name = std::string(attr.getValue());
      }
      auto node_def_or = ConvertTFDialectOpToNodeDef(
          inst, node_name.c_str(), /*ignore_unregistered_attrs=*/true);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Dec 13 06:02:14 UTC 2023
    - 5.7K bytes
    - Viewed (0)
Back to top