Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 207 for int32Ptr (0.15 sec)

  1. tensorflow/compiler/mlir/lite/utils/string_utils.cc

      // Allocate sufficient memory to tensor buffer.
      int32_t num_strings = offset_.size() - 1;
      // Total bytes include:
      //   * size of content (data_.size)
      //   * offset of each tensor (sizeof(int32_t) * num_strings)
      //   * length of whole buffer (int32_t)
      //   * num of strings (int32_t).
      int32_t bytes = data_.size()                            // size of content
                      + sizeof(int32_t) * (num_strings + 2);  // size of header
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:41:49 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/text/cases/icu.go

    	src := C.CString(input)
    
    	cn := C.int32_t(0)
    
    	switch caser {
    	case "fold":
    		cn = C.ucasemap_utf8FoldCase(cm,
    			dst, C.int32_t(len(buf)),
    			src, C.int32_t(len(input)),
    			&err)
    	case "lower":
    		cn = C.ucasemap_utf8ToLower(cm,
    			dst, C.int32_t(len(buf)),
    			src, C.int32_t(len(input)),
    			&err)
    	case "upper":
    		cn = C.ucasemap_utf8ToUpper(cm,
    			dst, C.int32_t(len(buf)),
    			src, C.int32_t(len(input)),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/quantization/numerical_utils.h

    #include <cstdint>
    #include <optional>
    #include <utility>
    
    #include "absl/types/optional.h"
    
    namespace mlir {
    namespace quant {
    
    using QuantizedMultiplier = std::pair<int32_t, int32_t>;
    using QuantizedRange = std::pair<int32_t, int32_t>;
    
    // Decompose double precision multiplier to integer multiplier and exponent.
    //    double_multiplier = int_multiplier * 2 ^ (-31 + exponent)
    // int_multiplier will be range of (2^31, 2^30].
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 07 18:43:51 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/utils/tf_to_xla_attribute_utils.cc

                              Value &padding_high) {
      Value zero = CreateScalarConstValue<int32_t>(builder, loc, 0);
      Value one = CreateScalarConstValue<int32_t>(builder, loc, 1);
      Value two = CreateScalarConstValue<int32_t>(builder, loc, 2);
      Value filter_size = CreateScalarConstValue<int32_t>(builder, loc, filter_sz);
      Type int32_scalar_type = zero.getType();
    
      auto scalar_add = [&](Value lhs, Value rhs) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/stablehlo/cc/calibration/calibration_parameters_test.cc

    }
    
    TEST(CalibrationParametersTest, CalculateNumBinsDivisible) {
      int32_t num_bins = CalculateActualNumBins(
          /*min_value=*/0.0, /*max_value=*/4.0, /*bin_width=*/2.0);
    
      // Expect 2 bins: [0, 2), [2, 4].
      EXPECT_EQ(num_bins, 2);
    }
    
    TEST(CalibrationParametersTest, CalculateNumBinsNotDivisible) {
      int32_t num_bins = CalculateActualNumBins(
          /*min_value=*/0.0, /*max_value=*/5.0, /*bin_width=*/2.0);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 05 09:09:34 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/utils/math_utils_test.cc

    #include <gtest/gtest.h>
    #include "mlir/Support/LogicalResult.h"  // from @llvm-project
    
    namespace mlir::quant::stablehlo {
    namespace {
    
    TEST(UtilsTest, QuantizeMultiplierNormalMultipliers) {
      int32_t quantized_fraction;
      int32_t shift;
    
      EXPECT_TRUE(succeeded(QuantizeMultiplier(1.2, quantized_fraction, shift)));
      EXPECT_EQ(quantized_fraction, 19661);
      EXPECT_EQ(shift, 1);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 05:58:41 UTC 2024
    - 2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_utils.cc

    bool DenseI64AttrToI32Vector(const DenseIntElementsAttr& dense_attr,
                                 std::vector<int32_t>* out_vec) {
      std::vector<int32_t> ret(dense_attr.getNumElements());
      auto range = dense_attr.getValues<int64_t>();
      std::transform(range.begin(), range.end(), ret.begin(),
                     [](int64_t attr) { return static_cast<int32_t>(attr); });
      *out_vec = std::move(ret);
      return true;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 29 18:33:05 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/quantization/numerical_utils.cc

    QuantizedRange CalculateQuantizedRange(double scale, int32_t zero_point,
                                           std::optional<double> rmin,
                                           std::optional<double> rmax, int32_t qmin,
                                           int32_t qmax) {
      auto quantize = [scale, zero_point](float f) {
        return zero_point + static_cast<int32_t>(std::round(f / scale));
      };
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 17 19:57:04 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/stablehlo/cc/calibration/calibration_parameters.h

    }
    
    // Calculates the bin index of the current value.
    inline int32_t CalculateBinIndex(const float value, const float lower_bound,
                                     const float bin_width) {
      return std::floor((value - lower_bound) / bin_width);
    }
    
    // Same as `CalculateBinIndex` but clamps to avoid out-of-bound.
    inline int32_t CalculateBinIndexSafe(const float value, const float lower_bound,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 01:09:50 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/push_transpose_through_ewise.cc

    llvm::SmallVector<int32_t> InvertPermutation(llvm::SmallVector<int32_t> arr) {
      llvm::SmallVector<int32_t> inverse_arr(arr.size());
      for (int32_t i = 0; i < arr.size(); ++i) {
        inverse_arr[arr[i]] = i;
      }
      return inverse_arr;
    }
    
    llvm::SmallVector<int64_t> PermuteShape(llvm::ArrayRef<int64_t> shape,
                                            llvm::ArrayRef<int32_t> perm) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.5K bytes
    - Viewed (0)
Back to top