Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for hasAttr (0.09 sec)

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

     private:
      LogicalResult matchAndRewrite(Operation* op,
                                    PatternRewriter& rewriter) const override {
        // Remove `_tpu_replicate` attributes on each operation first.
        if (op->hasAttr(tensorflow::kTPUReplicateAttr)) {
          op->removeAttr(tensorflow::kTPUReplicateAttr);
          return success();
        }
    
        // Remove TPU operations.
        if (isa<TF::TPUReplicateMetadataOp, TF::TPUCompilationResultOp,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  8. fastapi/utils.py

        # performance by avoiding unnecessary cloning
        if cloned_types is None:
            cloned_types = _CLONED_TYPES_CACHE
    
        original_type = field.type_
        if is_dataclass(original_type) and hasattr(original_type, "__pydantic_model__"):
            original_type = original_type.__pydantic_model__
        use_type = original_type
        if lenient_issubclass(original_type, BaseModel):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/executor_tpuv1_outline_tpu_island.cc

              }
            }
          }
        });
      }
      // Remove `kSkipIslandOutlining` attributes.
      for (func::FuncOp func_op : getOperation().getOps<func::FuncOp>()) {
        if (func_op->hasAttr(mlir::TF::kSkipIslandOutlining)) {
          func_op->removeAttr(mlir::TF::kSkipIslandOutlining);
        }
      }
    }
    
    }  // namespace
    
    std::unique_ptr<OperationPass<ModuleOp>>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.7K bytes
    - Viewed (0)
Back to top