Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 201 for constop (0.12 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/unroll_batch_matmul.cc

        std::swap(rhs_shape[rhs_dims - 1], rhs_shape[rhs_dims - 2]);
      }
    
      const int64_t rows = lhs_shape[lhs_dims - 2];
      const int64_t cols = rhs_shape[rhs_dims - 1];
    
      if (lhs_shape[lhs_dims - 1] != rhs_shape[rhs_dims - 2]) {
        // Input dimensions must be compatible for multiplication.
        return failure();
      }
    
      const auto matmul_type = RankedTensorType::get({rows, cols}, element_type);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/optimize.cc

      bool isSupportedAxis(mlir::Value value, int64_t rank) const {
        auto const_op =
            dyn_cast_or_null<mlir::arith::ConstantOp>(value.getDefiningOp());
        if (!const_op) {
          return false;
        }
        auto axes = dyn_cast<DenseIntElementsAttr>(const_op.getValueAttr());
        if (!axes || axes.getNumElements() != 1) {
          return false;
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 102.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tfrt/tests/mlrt/tf_to_mlrt.mlir

      // CHECK-NEXT: [[PREFIX:%.*]] = tf_mlrt.constop
      %cst = "tf.Const"() {__op_key = 0: i32, value = dense<"restore_ariables"> : tensor<!tf_type.string>} : () -> tensor<!tf_type.string>
      // CHECK-NEXT: [[SLICE:%.*]] = tf_mlrt.constop
      %cst_0 = "tf.Const"()  {__op_key = 1: i32, value = dense<""> : tensor<1x!tf_type.string>} : () -> tensor<1x!tf_type.string>
      // CHECK-NEXT: [[NAME:%.*]] = tf_mlrt.constop
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 31 20:44:15 UTC 2024
    - 24.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/cast_bf16_ops_to_f32.cc

     public:
      explicit CastBf16OpsToF32(MLIRContext* context)
          : RewritePattern(MatchAnyOpTypeTag(), /*benefit=*/1, context) {}
    
     private:
      LogicalResult match(Operation* op) const override {
        if (isa<TF::CastOp, TF::ConstOp>(op) ||
            op->getName().hasTrait<OpTrait::ZeroOperands>()) {
          return failure();
        }
        for (Value input : op->getOperands()) {
          if (getElementTypeOrSelf(input).isBF16()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Dec 10 05:52:02 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc

      explicit QuantizeCompositeFunctionsPass() = default;
    
      explicit QuantizeCompositeFunctionsPass(
          const QuantMethod quantization_method, const OpSet target_opset,
          const bool enable_per_channel_quantization,
          const int min_num_elements_for_weights,
          const bool enable_legacy_weight_only,
          std::optional<const std::string> mlir_dump_file_name)
          : enable_legacy_weight_only_(enable_legacy_weight_only),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 54.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/freeze_global_tensors.cc

                bvector.set(use.getOperandNumber());
            }
          }
    
          // Replace the arg with a tf.Const op in the function body.
          builder.setInsertionPointToStart(&func.getBody().front());
          auto const_op = builder.create<TF::ConstOp>(global_tensor.getLoc(),
                                                      *global_tensor.getValue());
          args_to_erase.set(val.getArgNumber());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/transforms/split_merged_operands.cc

        auto inserted_value = values->insert(operand).second;
        if (inserted_value) continue;
        // We can only clone the constant op or const->dequantize combo. The latter
        // case is useful for float16 quantization. Since all ops have been
        // legalized to tflite ops, so we only care about ConstOp or QConstOp or
        // mlir constant op.
        Operation* input_op = operand.getDefiningOp();
        if (input_op == nullptr) return failure();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 20:30:06 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.cc

        llvm::SmallVectorImpl<ShapedTypeComponents>& inferredReturnShapes) {
      const int64_t num_spatial_dims = std::is_same<OpT, Conv2DOpAdaptor>() ? 2 : 3;
      const int64_t num_dims = 2 + num_spatial_dims;
      const Value input = op.getInput();
      const Value filter = op.getFilter();
      const TensorType input_ty = mlir::cast<TensorType>(input.getType());
      const TensorType filter_ty = mlir::cast<TensorType>(filter.getType());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 146.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_collective.cc

        IntegerAttr group_key = rewriter.getI32IntegerAttr(0);
    
        auto const_group_size = rewriter.create<TF::ConstOp>(
            assign_group->getLoc(), assign_group.getResult(0).getType(),
            group_size);
        auto const_group_key = rewriter.create<TF::ConstOp>(
            assign_group->getLoc(), assign_group.getResult(1).getType(), group_key);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 16K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/legalize_tf.cc

        return rewriter.createOrFold<TF::CastOp>(loc, new_type, val,
                                                 rewriter.getBoolAttr(false));
      }
      return rewriter.createOrFold<TF::CastOp>(
          loc, UnrankedTensorType::get(new_ele_type), val,
          rewriter.getBoolAttr(false));
    }
    
    // Utility function to-
    // 1. Create a tfl.const op with an int32_t values, from an MLIR Value, if the
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 20 20:06:54 UTC 2024
    - 45.2K bytes
    - Viewed (0)
Back to top