Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 27 for FailureOr (0.37 sec)

  1. tensorflow/compiler/mlir/lite/stablehlo/transforms/fold_broadcast_pass.cc

      if (splatLhs && splatRhs) {
        auto signedLhs = addSign(splatLhs.getSplatValue<ValType>(), etype);
        auto signedRhs = addSign(splatRhs.getSplatValue<ValType>(), etype);
        FailureOr<decltype(signedLhs)> result(Convert()(signedLhs, signedRhs));
        return succeeded(result) ? SplatElementsAttr::get(type, *result)
                                 : Attribute();
      }
    
      SmallVector<ValType, 6> values;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/stablehlo_custom_call.cc

      return op.getCallTargetName() == kTfTargetName;
    }
    
    DictionaryAttr GetTfBackendConfig(stablehlo::CustomCallOp op) {
      return op->getAttrOfType<DictionaryAttr>(kTfBackendConfigAttrName);
    }
    
    FailureOr<SymbolRefAttr> GetTfFuncCustomCallFuncName(
        stablehlo::CustomCallOp op) {
      if (!IsTfFuncCustomCall(op)) {
        return success(nullptr);
      }
    
      auto config = GetTfBackendConfig(op);
      if (config == nullptr) {
    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/shape_inference.cc

      // reached convergence, false otherwise.
      FailureOr<bool> PropagateShapeIntoAttachedFunctions(Operation* op,
                                                          int64_t max_iterations);
    
      // Shape propagation for region based control flow.
      // Returns a failure() on error, otherwise returns true to indicate that it
      // reached convergence, false otherwise.
      FailureOr<bool> PropagateShapeIntoAttachedRegions(Operation* op,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Jun 08 07:28:49 UTC 2024
    - 134.1K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/stablehlo/passes/lift_quantizable_spots_as_functions.cc

      std::unique_ptr<RE2> match_regex_;  // NOLINT
    };
    
    // Converts `Method` to a single-line textproto representation. Returns
    // `failure()` when converting to textproto failed.
    FailureOr<std::string> QuantizationMethodToTextProto(const Method& method) {
      TextFormat::Printer printer;
      printer.SetSingleLineMode(true);
    
      std::string method_txtpb;
      if (!printer.PrintToString(method, &method_txtpb)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 04:07:09 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/stablehlo/utils/tf_type_utils.cc

            return IntegerType::get(type.getContext(), 16,
                                    IntegerType::SignednessSemantics::Unsigned);
          })
          .Default([&type](Type) { return type; });
    }
    
    FailureOr<mlir::DenseElementsAttr> GetDenseAttrFromTensorProtoAttr(
        const llvm::StringRef mangled_tensor_proto, TensorType tensor_type) {
      ::tensorflow::TensorProto tensor_proto;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_ops_to_mhlo.cc

    using quant::tensorflow::IsTFQintType;
    
    #define GEN_PASS_DEF_CONVERTTFQUANTOPSTOMHLO
    #include "tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/passes.h.inc"
    
    template <typename UniformQuantizedOp>
    FailureOr<TensorType> GetUniformQuantizedType(
        UniformQuantizedOp op, Type original_type,
        TypedValue<TensorType> scales_value,
        TypedValue<TensorType> zero_points_value, FloatType expressed_type,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 30.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/cc/convert_asset_args.cc

      SmallVector<NamedAttribute> new_arg_attrs =
          ReplaceBoundInputAttrWithIndexPathAttr(arg_attrs, index_path, builder);
    
      main_func_op.setArgAttrs(arg_idx, new_arg_attrs);
    }
    
    }  // namespace
    
    FailureOr<SmallVector<AssetFileDef>> ConvertAssetArgs(ModuleOp module_op) {
      func::FuncOp main_func_op = FindMainFuncOp(module_op);
      if (!main_func_op) return failure();
    
    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/quantization/stablehlo/ops/stablehlo_op_quant_spec_test.cc

        }
      )mlir";
    
      const OwningOpRef<ModuleOp> module_op =
          ParseModuleOpString(kXlaCallModuleOpWithPerTensorQuantizedConvolution);
      ASSERT_TRUE(module_op);
    
      const FailureOr<TF::XlaCallModuleOp> xla_call_module_op =
          FindFirstOpFromMainFunc<TF::XlaCallModuleOp>(*module_op);
      ASSERT_TRUE(succeeded(xla_call_module_op));
    
      const std::unique_ptr<OpQuantSpec> op_quant_spec =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 04 07:19:09 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_initializer_function_ops_to_main.cc

    // Returns initializer_type -> init_func_op mapping from the session_init_op's
    // initializers. The initializer functions are validated for whether it can be
    // moved to the main function. Returns failure() iff validation fails.
    FailureOr<absl::flat_hash_map<std::string, func::FuncOp>> GetInitFuncOps(
        ModuleOp module_op) {
      absl::flat_hash_map<std::string, func::FuncOp> init_func_ops;
    
    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/tensorflow/transforms/xla_call_module_deserialization.cc

    // naming conflicts. But we need to rename the function calls inside the
    // stablehlo functions as well. So we first do this renaming in the stablehlo
    // module itself without inserting into the tf module.
    FailureOr<StringAttr> RenameStablehloFunctions(
        MLIRContext *context, SymbolTableCollection &symbol_tables,
        ModuleOp tf_module, ModuleOp stablehlo_module) {
      SymbolTable &tf_symbol_table = symbol_tables.getSymbolTable(tf_module);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 23 09:05:47 UTC 2024
    - 11.1K bytes
    - Viewed (0)
Back to top