Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 53 for m_Constant (0.16 sec)

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

        if (matchPattern(input_op, m_Constant(&attr))) {
          // Constant case.
          builder->setInsertionPoint(op);
          Operation* duplicated_input_op = builder->clone(*input_op);
    
          // Rewire the inputs.
          op->setOperand(index, duplicated_input_op->getResult(0));
        } else if (auto dq = dyn_cast<DequantizeOp>(input_op);
                   dq && matchPattern(dq.getInput(), m_Constant(&attr))) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 20:30:06 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/utils/fake_quant_utils.h

                      AttrType &max_value) const {
        Value min = tf_op.getMin(), max = tf_op.getMax();
        if (!matchPattern(min, m_Constant(&min_value))) {
          return false;
        }
        if (!matchPattern(max, m_Constant(&max_value))) {
          return false;
        }
        return true;  // Successfully matched and fetched.
      }
    };
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_tensor_helper.cc

    // routine uses the constant op's attribute to get the actual shape.
    RankedTensorType GetRankedTensorTypeForOperand(Value operand) {
      DenseElementsAttr attr;
      if (matchPattern(operand, m_Constant(&attr))) {
        return mlir::dyn_cast<RankedTensorType>(attr.getType());
      }
      return mlir::dyn_cast<RankedTensorType>(operand.getType());
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_collective.cc

                                       DenseIntElementsAttr& replica_groups,
                                       Operation* op) {
      DenseIntElementsAttr group_assignment;
      if (!matchPattern(group_assignment_value, m_Constant(&group_assignment))) {
        return op->emitOpError() << "expects constant group_assignment";
      }
      replica_groups = mlir::cast<DenseIntElementsAttr>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 16K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_quantize_op.cc

      const bool kIsNarrowRange = true;
      const bool kIsSigned = true;
      const int kBitWidth = 8;
    
      DenseFPElementsAttr attr;
      if (!matchPattern(op->getResult(0), m_Constant(&attr))) return nullptr;
    
      QuantizedType quant_type = mlir::dyn_cast<quant::QuantizedType>(
          quant::GetUniformQuantizedTypeForWeight(
              attr, /*symmetric=*/kIsNarrowRange && kIsSigned, kBitWidth, kIsSigned,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/ir/tf_arith_ops_folder.cc

      auto input_type = mlir::dyn_cast<RankedTensorType>(input.getType());
      if (!input_type) return success();
      int64_t rank = input_type.getRank();
    
      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)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.h

        DenseIntElementsAttr value_attr;
        if (!matchPattern(value, m_Constant(&value_attr)) ||
            !value_attr.isSplat()) {
          return false;
        }
        splat_value = value_attr.getSplatValue<T>();
        return true;
      }
    
      DenseFPElementsAttr value_attr;
      if (!matchPattern(value, m_Constant(&value_attr)) || !value_attr.isSplat()) {
        return false;
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/utils/tf_to_xla_attribute_utils_test.cc

      Value packed_value = PackOperand(builder, module->getLoc(), value, pack_dim);
      DenseIntElementsAttr packed_value_attr;
      ASSERT_TRUE(matchPattern(packed_value, m_Constant(&packed_value_attr)));
    
      ShapedType packed_shape_type =
          mlir::dyn_cast<ShapedType>(packed_value.getType());
      llvm::SmallVector<int64_t> packed_shape(packed_shape_type.getShape().begin(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform_patterns.cc

      mlir::DenseIntElementsAttr splits_attr;
      if (!splits || !matchPattern(splits, m_Constant(&splits_attr)))
        return failure();
    
      auto split_dim = splitv_op.getSplitDim().getDefiningOp();
      mlir::ElementsAttr split_dim_attr;
      if (!split_dim || !matchPattern(split_dim, m_Constant(&split_dim_attr)))
        return failure();
    
      auto input = splitv_op.getValue();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf.cc

                           m_Constant(&window_dimensions)) &&
              matchPattern(op.getWindowStrides(), m_Constant(&window_strides)) &&
              matchPattern(op.getBaseDilations(), m_Constant(&base_dilations)) &&
              matchPattern(op.getWindowDilations(),
                           m_Constant(&window_dilations)) &&
              matchPattern(op.getPadding(), m_Constant(&padding))))
          return failure();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 291.8K bytes
    - Viewed (0)
Back to top