Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 135 for getAttrOfType (0.23 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. tensorflow/compiler/mlir/tensorflow/transforms/cluster_tf_ops_pass.cc

          DeviceNameUtils::AddressSpace(parsed_name));
      return result.empty() ? kLocalhost : result;
    }
    
    std::string GetHost(Operation *op) {
      std::string device = "";
      if (StringAttr attr = op->getAttrOfType<StringAttr>(kDeviceAttr)) {
        device = attr.getValue().str();
      }
      return GetHost(device);
    }
    
    // The device is considered to be on the localhost iff one of the following is
    // true:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  7. 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)
  8. tensorflow/compiler/mlir/quantization/stablehlo/cc/saved_model_import.cc

        existing_func_names.insert(func_name);
        // We may retrieve the original function's name from the attribute.
        // Functions without this attribute are ignored.
        auto original_func_name =
            func_op->getAttrOfType<StringAttr>("tf._original_func_name");
        if (original_func_name) {
          if (auto alias_itr = function_aliases.find(original_func_name.str());
              alias_itr != function_aliases.end()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 12:49:45 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_initializer_function_ops_to_main.cc

    // initializer function. Assumes that there exists such an attribute.
    std::string GetInitializerType(func::FuncOp init_func_op) {
      return init_func_op
          ->getAttrOfType<StringAttr>(kTfSavedModelInitializerTypeAttr)
          .str();
    }
    
    // An initializer function should satisfy the follwing conditions:
    // * Its GraphOp should only have control outputs.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun May 12 12:54:52 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_main_function.cc

        return "Inserts the main function to the module.";
      }
    
      void runOnOperation() override;
    };
    
    // Checks if a FuncOp is exported.
    bool IsExported(func::FuncOp op) {
      auto exported_names =
          op->getAttrOfType<ArrayAttr>(kTfSavedModelExportedNamesAttr);
      return exported_names && !exported_names.empty();
    }
    
    // Check if a function is an entry function.
    bool IsEntryFunction(func::FuncOp op) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 16.5K bytes
    - Viewed (0)
Back to top