Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 89 for IntegerAttr (0.17 sec)

  1. tensorflow/compiler/mlir/lite/transforms/legalize_tf.cc

    DECL_CONVERT_OP(Conv3D);
    DECL_CONVERT_OP(Conv3DBackpropInputV2);
    
    #undef DECL_CONVERT_OP
    
    // Converts any IntegerAttr to an IntegerAttr of an i32 type.
    // The value won't change in the new attribute, but if the value is out of
    // the bound of i32, the function returns a failure.
    LogicalResult ConvertToI32Attr(IntegerAttr attr, IntegerAttr* attr_i32) {
      if (attr.getType().isInteger(/*width=*/32)) {
        *attr_i32 = attr;
        return success();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 20 20:06:54 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/quantization/ir/QuantizeUtils.cc

    using namespace mlir;
    using namespace mlir::quantfork;
    
    /// Converts a possible primitive, real expressed value attribute to a
    /// corresponding storage attribute (typically FloatAttr -> IntegerAttr).
    /// quantizedElementType is the QuantizedType that describes the expressed
    /// origValue.
    /// Returns a converter Attribute or nullptr if conversion is not possible.
    static Attribute convertPrimitiveValueAttr(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform_patterns.cc

    namespace tac {
    namespace {
    
    // ================== Common ========================
    
    // Converts any IntegerAttr to an IntegerAttr of an i32 type.
    // The value won't change in the new attribute, but if the value is out of
    // the bound of i32, the function returns a failure.
    LogicalResult ConvertToI32Attr(IntegerAttr attr, IntegerAttr* attr_i32) {
      if (attr.getType().isInteger(/*width=*/32)) {
        *attr_i32 = attr;
        return success();
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/ir/host_runtime/tfrt_ops.cc

      int64_t prev_index = -1;
      for (auto arg_index_attr : getVariableArgIndicesAttr()) {
        if (!mlir::isa_and_nonnull<mlir::IntegerAttr>(arg_index_attr)) {
          return emitOpError() << "variable_arg_indices must be an integer";
        }
    
        int64_t index = mlir::dyn_cast<mlir::IntegerAttr>(arg_index_attr)
                            .getValue()
                            .getSExtValue();
        if (index < 0) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/prepare_tf.cc

      void runOnOperation() override;
    };
    
    // Transient state for preserving data from match to rewrite
    struct ConvertTFConvOpMatchState {
      IntegerAttr dilation_height_factor;
      IntegerAttr dilation_width_factor;
      StringAttr padding;
      IntegerAttr stride_height;
      IntegerAttr stride_width;
    };
    
    // Templated class for declaring a converter from some TensorFlow convolution
    // op into its counterpart in TensorFlow Lite.
    //
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 64.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/utils/tf_to_uniform_attribute_utils.cc

        PatternRewriter& rewriter, llvm::StringMap<Attribute>& identifier_to_attr) {
      ArrayAttr stride = mlir::dyn_cast<ArrayAttr>(identifier_to_attr["strides"]);
      const int stride_h = mlir::cast<IntegerAttr>(stride[1]).getInt();
      const int stride_w = mlir::cast<IntegerAttr>(stride[2]).getInt();
      return rewriter.getI64ArrayAttr({stride_h, stride_w});
    }
    
    Attribute GetLhsDilationValue(PatternRewriter& rewriter,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/utils/attribute_utils.h

    // Returns the single integer element from an ElementsAttr. Returns empty
    // attribute if the number of elements in the attribute is not 1 or the
    // element isn't a integer attribute.
    IntegerAttr ExtractSingleElementAsInteger(ElementsAttr attr);
    
    }  // end namespace TFL
    }  // end namespace mlir
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 03 16:37:16 UTC 2022
    - 2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/utils/nms_utils.cc

    }
    
    LogicalResult ConvertSSDPostProcessFunc::AddIntAttr(
        func::FuncOp func, DictionaryAttr attrs, const std::string& attribute,
        flexbuffers::Builder* builder) {
      auto int_attr = mlir::dyn_cast_or_null<IntegerAttr>(attrs.get(attribute));
      if (!int_attr) {
        return func.emitError()
               << attribute.c_str() << " attribute is not set or not an integer";
      }
      builder->Int(attribute.c_str(), int_attr.getInt());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/python/mlir_wrapper/mlir_wrapper.pyi

    class FunctionType(Type):
        def __init__(self, *args, **kwargs) -> None: ...
        def getResults(self) -> list[Type]: ...
    
    class IntegerAttr(Attribute):
        def __init__(self, *args, **kwargs) -> None: ...
        def get(self, arg0: int) -> IntegerAttr: ...
    
    class IntegerType(Type):
        def __init__(self, *args, **kwargs) -> None: ...
        def get(self, arg0: int) -> IntegerType: ...
    
    class Location:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 09 17:10:09 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_ops_to_mhlo.cc

          const int64_t stride =
              mlir::cast<IntegerAttr>(op.getWindowStridesAttr()[i]).getInt();
          const int64_t lhs_size_dilated =
              ::tensorflow::UniformQuantizedConvolutionParams::DilatedSize(
                  lhs_shape.getDimSize(dnums.input_spatial_dimensions(i)),
                  mlir::cast<IntegerAttr>(op.getLhsDilationAttr()[i]).getInt());
          const int64_t rhs_size_dilated =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 30.9K bytes
    - Viewed (0)
Back to top