Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 135 for getAttrOfType (0.25 sec)

  1. tensorflow/compiler/mlir/tensorflow/ir/tf_saved_model.cc

      SmallVector<StringRef, 2> ret;
      auto exported_names =
          op->getAttrOfType<ArrayAttr>(kTfSavedModelExportedNamesAttr);
      if (exported_names) {
        for (auto name : exported_names) {
          ret.push_back(mlir::cast<StringAttr>(name).getValue());
        }
      }
      return ret;
    }
    
    bool IsExported(Operation *op) {
      auto exported_names =
          op->getAttrOfType<ArrayAttr>(kTfSavedModelExportedNamesAttr);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/convert_launch_func_to_tf_call.cc

            /*config=*/builder.getStringAttr(""),
            /*config_proto=*/builder.getStringAttr(""),
            /*executor_type=*/builder.getStringAttr(""));
        call_op->setAttr("device", launch->getAttrOfType<StringAttr>("device"));
        launch.replaceAllUsesWith(call_op);
        launch.erase();
      });
    }
    
    }  // namespace
    
    std::unique_ptr<OperationPass<ModuleOp>> CreateConvertLaunchFuncToTFCallPass() {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Aug 31 21:08:09 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/verify_no_outside_compilation_markers_pass.cc

        if (IsLaunchOp(*op)) return WalkResult::interrupt();
    
        return WalkResult::advance();
      });
    
      return walk_result.wasInterrupted();
    }
    
    bool HasXlaOutsideCompilationMarker(Operation& op) {
      return op.getAttrOfType<StringAttr>(kXlaOutsideCompilationAttr) != nullptr;
    }
    
    void VerifyNoOutsideCompilationMarkersPass::runOnOperation() {
      Operation* func_op = getOperation();
    
      auto walk_result = func_op->walk([&](Operation* op) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Aug 22 19:52:08 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/translate/export_graphdef.cc

      const mlir::Dialect* tf_dialect_;
      const SymbolTable& symbol_table_;
    };
    
    std::string FindFunctionName(const GraphExportConfig& configs, FuncOp func) {
      if (auto original_func_name =
              func->getAttrOfType<mlir::StringAttr>("tf._original_func_name");
          configs.export_original_tf_func_name && original_func_name) {
        return original_func_name.str();
      }
    
      return func.getName().str();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 11:17:36 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tf2xla/api/v2/tf_executor_to_graph.cc

      const mlir::Dialect* tf_dialect_;
      const SymbolTable& symbol_table_;
    };
    
    std::string FindFunctionName(const GraphExportConfig& configs, FuncOp func) {
      if (auto original_func_name =
              func->getAttrOfType<mlir::StringAttr>("tf._original_func_name");
          configs.export_original_tf_func_name && original_func_name) {
        return original_func_name.str();
      }
    
      return func.getName().str();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 06 23:04:51 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/python/saved_model_to_tfl_flatbuffer.cc

        mlir::OwningOpRef<mlir::ModuleOp>* module) {
      mlir::func::FuncOp entry_function = nullptr;
      for (auto func : module->get().getOps<mlir::func::FuncOp>()) {
        if (auto tf_attrs =
                func->getAttrOfType<mlir::DictionaryAttr>("tf.entry_function")) {
          // TODO(b/184697652): There could be multiple entry functions. Let's
          // handle such cases if there are any needs for that.
          if (entry_function != nullptr) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun May 12 12:39:37 UTC 2024
    - 11K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/tpu_resource_partitioning.cc

        tf_device::ClusterFuncOp cluster_func) {
      bool use_spmd = false;
      if (auto use_spmd_attr = cluster_func->getAttrOfType<BoolAttr>(kUseSpmdAttr))
        use_spmd = use_spmd_attr.getValue();
    
      if (!use_spmd) return success();
    
      auto num_cores_per_replica_attr =
          cluster_func->getAttrOfType<IntegerAttr>(kNumCoresPerReplicaAttr);
    
      // Wrap the ClusterFunc with a ParallelExecute if it does not already exist.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 11.8K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/transforms/prepare_composite_functions_tf.cc

        // We need to handle them separately.
        auto tf_implements_attr_str =
            func->getAttrOfType<StringAttr>(kTFImplements);
        if (tf_implements_attr_str) {
          ConvertTFImplements(func, tf_implements_attr_str);
          continue;
        }
    
        auto tf_implements_attr = func->getAttrOfType<FuncAttr>(kTFImplements);
        if (tf_implements_attr) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.h

    inline FlatSymbolRefAttr GetFuncAttr(TF::PartitionedCallOp call_op) {
      return mlir::dyn_cast<FlatSymbolRefAttr>(call_op.getFAttr());
    }
    
    inline FlatSymbolRefAttr GetFuncAttr(TF::XlaCallModuleOp call_op) {
      return call_op->getAttrOfType<FlatSymbolRefAttr>(
          TF::kStablehloEntryFunctionAttrName);
    }
    
    // Returns the entry function name for the given tf.XlaCallModule op. Returns
    // empty string if such attribute does not exist.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/tfg-to-tfe.cc

        Location loc = graph_func.getLoc();
        FunctionType ftype = graph_func.getFunctionType();
    
        func::FuncOp func = rewriter.create<func::FuncOp>(
            graph_func.getLoc(),
            graph_func->getAttrOfType<StringAttr>(SymbolTable::getSymbolAttrName())
                .getValue(),
            ftype);
    
        func->setAttrs(graph_func->getAttrs());
    
        llvm::SmallVector<Type> arg_types;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 21.2K bytes
    - Viewed (0)
Back to top