Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for getSExtValue (0.15 sec)

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

      size_t idx = 0;
      for (; idx < perm_values_attr.size() - 2; ++idx) {
        if (perm_values[idx].getSExtValue() != idx) return false;
      }
    
      return (perm_values[idx].getSExtValue() == perm_values_attr.size() - 1) &&
             (perm_values[idx + 1].getSExtValue() == idx);
    }
    
    // Gets the new type after transposing the last 2 dimensions.
    inline Type TransposeLastTwoDims(Type type) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/flatbuffer_operator.h

      auto elemType = type.getElementType();
      if (elemType.isSignlessInteger(8)) {
        auto vec = llvm::to_vector(llvm::map_range(
            elements.getValues<APInt>(),
            [&](APInt value) -> int8_t { return value.getSExtValue(); }));
        return std::vector<int8_t>(vec.begin(), vec.end());
      }
    
      return std::vector<int8_t>();
    }
    
    template <>
    inline std::vector<int16_t> GetVector(DenseElementsAttr elements) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 21:00:09 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/dilated_conv.h

          // scheme for `Conv2D`.
          int64_t addtional_pad =
              pad_attr ? pad_attr.getValues<APInt>()[{i + 1, j}].getSExtValue() : 0;
          if (stb_paddings_attr.getValues<APInt>()[{i, j}].getSExtValue() +
                  addtional_pad !=
              bts_crops_attr.getValues<APInt>()[{i, j}].getSExtValue()) {
            op->setAttr("padding", rewriter.getStringAttr("SAME"));
            break;
          }
        }
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 20K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_layout_helper.cc

      SmallVector<int64_t, 8> perm0_values;
      for (const auto &value : perm0.getValues<APInt>())
        perm0_values.push_back(value.getSExtValue());
    
      SmallVector<int64_t, 8> perm1_values;
      for (const auto &value : perm1.getValues<APInt>())
        perm1_values.push_back(value.getSExtValue());
    
      for (int i = 0; i < perm0_values.size(); ++i) {
        if (perm0_values[perm1_values[i]] != i) return false;
      }
    
      return true;
    }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.cc

          const int64_t pad_start =
              paddings_attr.getValues<APInt>()[{i, 0}].getSExtValue();
          const int64_t pad_end =
              paddings_attr.getValues<APInt>()[{i, 1}].getSExtValue();
          const int64_t block_len =
              block_shape_attr.getValues<APInt>()[i].getSExtValue();
          if ((input_len + pad_start + pad_end) % block_len != 0) {
            return op.emitOpError()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 22:07:10 UTC 2024
    - 170.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/stablehlo/transforms/hlo_matchers.cc

      }
    
      using StridedArrayViewBase::NextTensorIndex;
      using StridedArrayViewBase::size;
    
      int64_t operator[](int64_t i) const {
        return data_.getValues<APInt>()[OffsetForIndex(i)].getSExtValue();
      }
    
     private:
      const DenseIntElementsAttr& data_;
    };
    
    // It matches %iota generated from the following mlir codes:
    //
    // %iota_r1 = "mhlo.iota"(){iota_dimension = 0} :() -> tensor<Lxi32>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/collection_ops_util.cc

      int64_t first_index = -1;
      for (const auto& ind : const_op.getValue().getValues<APInt>()) {
        if (last_index == -1) {
          last_index = ind.getSExtValue();
          first_index = last_index;
          continue;
        }
        if (last_index + 1 != ind.getSExtValue()) return -1;
        last_index++;
      }
      return first_index;
    }
    
    }  // namespace
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/ir/tf_arith_ops_folder.cc

      DenseIntElementsAttr dims_attr;
      if (!matchPattern(dims, m_Constant(&dims_attr))) return success();
      for (const auto &dim_pair : llvm::enumerate(dims_attr)) {
        int64_t cur_dim = dim_pair.value().getSExtValue();
        if (cur_dim < -rank || cur_dim >= rank)
          return emitError(loc)
                 << dim_pair.index() << "-th dimension should be in the range of [-"
                 << rank << ", " << rank << ")";
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/lower_tf.cc

          for (uint64_t i = 0; i < block_rank; i++) {
            int64_t paddings_sum =
                paddings.getValues<APInt>()[{i, 0}].getSExtValue() +
                paddings.getValues<APInt>()[{i, 1}].getSExtValue();
            int64_t block_shape_i =
                block_shape.getValues<APInt>()[i].getSExtValue();
            padded_shape[i + 1] = (paddings_sum + input_shape[i + 1]);
            block_shape_ints.push_back(block_shape_i);
          }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 74.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/flatbuffer_export.cc

      TfLitePoolParams pool_params;
      pool_params.stride_height = op.stride_h().getSExtValue();
      pool_params.stride_width = op.stride_w().getSExtValue();
      pool_params.filter_height = op.filter_h().getSExtValue();
      pool_params.filter_width = op.filter_w().getSExtValue();
      const auto padding = GetTflitePadding(inst, op.padding());
      if (padding) {
        pool_params.padding = *padding;
    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