Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 31 for FailureOr (0.15 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/cc/convert_asset_args_test.cc

            return
          }
        }
      )mlir");
    
      FailureOr<SmallVector<AssetFileDef>> asset_file_defs =
          ConvertAssetArgs(*module_op);
    
      EXPECT_TRUE(succeeded(asset_file_defs));
      EXPECT_THAT(*asset_file_defs, SizeIs(1));
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.cc

        return failure();
      }
      return static_cast<int32_t>(value);
    }
    
    FailureOr<SmallVector<int32_t>> CastI64ArrayToI32(
        const ArrayRef<int64_t> int64_array) {
      SmallVector<int32_t> int32_array{};
      int32_array.reserve(int64_array.size());
    
      for (const int64_t i64 : int64_array) {
        FailureOr<int32_t> cast_i32 = CastI64ToI32(i64);
        if (failed(cast_i32)) return failure();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/set_tpu_infeed_layout.h

    namespace mlir {
    
    // Set layouts attribute of tf.InfeedDequeueTuple ops.
    bool SetTPUInfeedLayout(OwningOpRef<ModuleOp>& mlir_module);
    
    // Try to determine the right TPU infeed layout.
    FailureOr<Attribute> GetTPUInfeedLayout(ArrayRef<Type> types,
                                            OpBuilder& rewriter);
    
    }  // namespace mlir
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Feb 14 22:51:30 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.h

          : OpRewritePattern<RootOpT>(context, /*benefit=*/300) {}
    
     private:
      // Collects all candidate ops for quantization, which are the
      // `dequantize_op`'s users.
      FailureOr<SmallVector<Operation*>> CollectCandidateOps(
          DequantizeOpT dequantize_op) const {
        auto users = dequantize_op->getResult(0).getUsers();
        return SmallVector<Operation*>(users.begin(), users.end());
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/xla_call_module_serialization.cc

    constexpr llvm::StringRef kCalledIndexAttrName = "called_index";
    constexpr llvm::StringRef kCalledFuncAttrName = "called_func";
    
    // Converts `called_func` attributes in custom call ops back to `called_index`.
    FailureOr<ArrayAttr> DesymbolizeCustomCallCalledIndex(ModuleOp module) {
      Builder builder(module.getContext());
    
      SmallVector<Attribute> function_list;
      llvm::DenseMap<SymbolRefAttr, int> called_indexes;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/shape_inference.h

    // Returns a failure() on error, otherwise returns true to indicate that it
    // reached convergence, false otherwise.
    // If input shapes are provided, first refines the `main` function using
    // InferShapeForFunction.
    FailureOr<bool> InferModuleShape(ModuleOp module, int64_t max_iterations = 10,
                                     ArrayRef<TypeID> ops_to_skip = {},
                                     ArrayRef<ArrayRef<int64_t>> input_shapes = {});
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 12:49:45 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/utils/stablehlo_custom_call.h

    // dictionary attribute.
    //
    // If the op does not represent a TF function call, returns nullptr.
    // Otherwise, if the op does not have `caller_name`, returns failure.
    FailureOr<SymbolRefAttr> GetTfFuncCustomCallFuncName(
        stablehlo::CustomCallOp op);
    
    }  // namespace TF
    }  // namespace mlir
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 26 03:48:35 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/stablehlo/utils/tf_type_utils.h

    #include "mlir/Support/LogicalResult.h"  // from @llvm-project
    
    namespace mlir::quant::tensorflow {
    
    // GetDenseAttrFromTensorProtoAttr returns DenseElementsAttr from tensor proto.
    FailureOr<mlir::DenseElementsAttr> GetDenseAttrFromTensorProtoAttr(
        llvm::StringRef mangled_tensor_proto, TensorType result_tensor_type);
    
    // Check if a type is TF qint type.
    bool IsTFQintType(Type type);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 08:32:43 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.h

                                     << T::getOperationName() << ").\n");
        return failure();
      }
    }
    
    FailureOr<int32_t> CastI64ToI32(int64_t value);
    
    // Tries to cast an array of int64 to int32. If any of the element in the
    // array is not in the range of int32, returns failure().
    FailureOr<SmallVector<int32_t>> CastI64ArrayToI32(
        ArrayRef<int64_t> int64_array);
    
    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/quantization/tensorflow/cc/convert_asset_args.h

    //   "tf_saved_model.index_path", if the bound input is attached to the
    //   `tf_saved_model::AssetOp`.
    // * Strips the "assets/" prefix of the filename when setting it to
    //   `AssetFileDef`.
    FailureOr<SmallVector<tensorflow::AssetFileDef>> ConvertAssetArgs(
        ModuleOp module_op);
    
    }  // namespace mlir::quant
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 19 01:45:41 UTC 2023
    - 1.7K bytes
    - Viewed (0)
Back to top