Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for PackInt4ValuesDensely (0.19 sec)

  1. tensorflow/compiler/mlir/lite/utils/low_bit_utils.h

    // Returns a new buffer that is packed densely with 2 4-bit values in a byte.
    // The packing format is low-bits-first, i.e. the lower nibble of a byte is
    // filled first, followed by the upper nibble.
    std::vector<uint8_t> PackInt4ValuesDensely(std::vector<uint8_t> src_buffer);
    
    // Assumes `src_buffer` contains 2 4-bit elements packed in 8-bit.
    // Returns a vector where each int8 element contains a int4 sign-extended value.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 12 20:13:51 UTC 2022
    - 1.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/utils/low_bit_utils.cc

    #include "tensorflow/compiler/mlir/lite/utils/low_bit_utils.h"
    
    #include <cassert>
    #include <cstdint>
    #include <vector>
    
    namespace tflite {
    
    std::vector<uint8_t> PackInt4ValuesDensely(std::vector<uint8_t> src_buffer) {
      auto num_elements = src_buffer.size();
      auto packed_size = (num_elements + 1) / 2;
      std::vector<uint8_t> packed_buffer((num_elements + 1) / 2);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 04 19:11:58 UTC 2023
    - 2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/flatbuffer_export.cc

        std::vector<uint8_t> data;
        for (mlir::APInt v : attr.getValues<mlir::APInt>()) {
          data.emplace_back(static_cast<uint8_t>(*(v.getRawData())));
        }
        auto packed_buffer = tflite::PackInt4ValuesDensely(data);
        if (use_buffer_offset_) {
          buffer_data_map_[index] =
              std::string(packed_buffer.begin(), packed_buffer.end());
          return tflite::CreateBuffer(builder_, 0, 1, 1);
        } else {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:41:49 UTC 2024
    - 164.5K bytes
    - Viewed (0)
Back to top