Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 47 for hasAttr (0.31 sec)

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

        } else {
          shardings_result.push_back(sharding_next);
        }
      }
    }
    
    bool IsValidShardingTupleForArity(Operation* op) {
      if (!op->hasAttr(kXLAShardingAttr) && !op->hasAttr(kShardingAttr)) {
        return true;
      }
      std::string shard_string;
      if (op->hasAttr(kXLAShardingAttr)) {
        shard_string =
            op->getAttrOfType<StringAttr>(kXLAShardingAttr).strref().str();
      } else {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 06:51:01 UTC 2024
    - 21.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/stablehlo/passes/unwrap_xla_call_module_op.cc

                               SymbolTable& symbol_table) {
      // Do not inline lifted quantized functions used for fusing patterns.
      // TODO - b/310539922: Remove reference to TF/TFL utils.
      if (call_op->hasAttr(kQuantTraitAttrName)) {
        return;
      }
    
      auto function_name = call_op
                               ->getAttrOfType<FlatSymbolRefAttr>(
                                   TF::kStablehloEntryFunctionAttrName)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 07:39:40 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tf2xla/internal/mlir_bridge_pass_util.cc

    namespace tensorflow {
    
    using ::mlir::failure;
    using ::mlir::LogicalResult;
    using ::mlir::success;
    
    namespace {
    constexpr absl::string_view kPartitionedCall = "TPUPartitionedCall";
    
    LogicalResult HasAttr(
        const Graph& graph, const FunctionLibraryDefinition* function_library,
        const std::function<bool(const Graph& graph)>& predicate) {
      if (predicate(graph)) {
        return success();
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 12:22:33 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/sparsecore/embedding_program_key.cc

      preprocess_op->setOperand(0, program);
    }
    
    LogicalResult VerifyAllProgramKeyOperandsReplaced(Operation* module) {
      WalkResult result = module->walk([&](Operation* op) {
        if (!op->hasAttr(kMiniBatchSplitsAttr) && !op->hasAttr(kMiniBatchCsrAttr))
          return WalkResult::advance();
        Operation* defining = op->getOperand(0).getDefiningOp();
        if (llvm::dyn_cast_or_null<TF::ConstOp>(defining)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/utils/call_graph_util.cc

      return {"tf.entry_function",
              tf_saved_model::kTfSavedModelInitializerTypeAttr};
    }
    
    bool IsEntryFunction(func::FuncOp func) {
      for (const auto &attr : GetEntryFunctionAttributeNames()) {
        if (func->hasAttr(attr)) {
          return true;
        }
      }
      return false;
    }
    
    llvm::SmallVector<func::FuncOp> GetEntryFunctions(ModuleOp module) {
      llvm::SmallVector<func::FuncOp> entry_funcs;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/xla_call_module_serialization.cc

      // Copy all referenced StableHLO functions to the new module.
      WalkResult result = WalkReachableFunctions(
          entry_func,
          [&](func::FuncOp f) -> WalkResult {
            if (!f->hasAttr(kFromXlaCallModuleAttrName)) {
              return WalkResult::advance();
            }
    
            auto cloned = llvm::cast<func::FuncOp>(builder.clone(*f));
            cloned->removeAttr(kFromXlaCallModuleAttrName);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/passes/restore_function_name.cc

      void runOnOperation() override;
    };
    
    void RestoreFunctionNameFromXlaCallModuleOp(TF::XlaCallModuleOp& call_op,
                                                SymbolTable& symbol_table) {
      if (!call_op->hasAttr(kOriginalStablehloEntryFunctionAttrName)) {
        return;
      }
    
      const auto original_function_name = call_op->getAttrOfType<StringAttr>(
          kOriginalStablehloEntryFunctionAttrName);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 08:32:43 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/stablehlo/transforms/rename_entrypoint_to_main.cc

        // 'tf.entry_function' attribute set.
        llvm::SmallVector<func::FuncOp, 4> candidate_funcs;
        for (auto& entrypoint : entrypoints) {
          if (entrypoint.second->hasAttr("tf.entry_function")) {
            candidate_funcs.push_back(entrypoint.second);
          }
        }
    
        if (candidate_funcs.empty()) {
          return fail(module, "No entrypoints found");
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/xla_validate_inputs.cc

        }
      }
      return success();
    }
    
    LogicalResult HasTopLevelCompilationMarker(
        llvm::SmallVector<func::FuncOp> &entry_funcs) {
      for (auto &entry_func : entry_funcs) {
        if (entry_func->hasAttr(mlir::TF::kCompileDeviceTypeAttr)) {
          entry_func->emitError() << "TF2XLA MLIR Non-replicated Phase 1 Bridge "
                                     "does not support top-level compilation "
                                     "marker.";
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 06 19:29:14 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/ir/host_runtime/tfrt_ops.cc

    //===----------------------------------------------------------------------===//
    
    mlir::LogicalResult IfrtCallOp::verify() {
      auto func = getOperation()->getParentOfType<mlir::func::FuncOp>();
      if (func != nullptr && func->hasAttr("tfrt_ifrt_serving.program_id")) {
        return emitOpError() << "cannot be nested inside an IFRT program";
      }
    
      for (mlir::Value arg : getArgs()) {
        if (mlir::isa<mlir::TF::ResourceType>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.6K bytes
    - Viewed (0)
Back to top