Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 77 for getElementDtype (0.36 sec)

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

      bool need_to_set_input_nodes_quantization_params = false;
      for (const BlockArgument arg : func.getArguments()) {
        auto shaped = mlir::dyn_cast<ShapedType>(arg.getType());
        if (shaped && mlir::isa<FloatType>(shaped.getElementType()) &&
            !has_quantize_op(arg)) {
          need_to_set_input_nodes_quantization_params = true;
          break;
        }
      }
    
      if (!need_to_set_input_nodes_quantization_params) {
        return false;
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_dynamic_range.cc

                             QuantizationUnits& quantizable_ops) const {
        // Non-float tensors do not need quantization.
        auto type = mlir::dyn_cast<ShapedType>(op.getType());
        if (!type || !type.getElementType().isF32()) return false;
    
        Value value = op.getResult();
    
        // Check whether dynamic range quantization can be applied.
        for (auto& use : value.getUses()) {
          Operation* user = use.getOwner();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 20.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/utils/xla_sharding_util.cc

                    split_dimension, num_split));
          }
    
          shape[split_dimension] = shape[split_dimension] / num_split;
          output_type =
              mlir::RankedTensorType::get(shape, input_type.getElementType());
        }
      } else {
        output_type = input_type;
      }
    
      // Creates a split op that splits |src_input| along |split_dimension|.
      llvm::SmallVector<mlir::Type, 4> output_types(num_split, output_type);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 21:28:13 UTC 2024
    - 34K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/ir/tf_executor.cc

        // the operand can be tensor of type T or T_REF.
        bool is_output_ref = mlir::isa<tf_type::TensorFlowRefType>(
            output_tensor_type.getElementType());
        if (is_output_ref && !mlir::isa<tf_type::TensorFlowRefType>(
                                 operand0_tensor_type.getElementType())) {
          return switchn.emitOpError()
                 << "expects same operand and output element type but got "
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 42.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/replace_cast_hacks_with_tf_xla_ops.cc

      if (!broadcasted_shapes_or.has_value()) return;
      const auto broadcasted_input_type = RankedTensorType::get(
          broadcasted_shapes_or->first, input_type.getElementType());
      const auto broadcasted_weight_type = RankedTensorType::get(
          broadcasted_shapes_or->second, weight_type.getElementType());
    
      if (broadcasted_input_type.hasStaticShape() &&
          broadcasted_weight_type.hasStaticShape()) {
        input = builder.create<TF::BroadcastToOp>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 47.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/utils/lstm_utils_test.cc

      // input layer norm is None
      EXPECT_TRUE(mlir::isa<NoneType>(it->getOperand(20).getType()));
      // proj_bias is F32
      EXPECT_TRUE(mlir::cast<RankedTensorType>(it->getOperand(17).getType())
                      .getElementType()
                      .isF32());
    
      // output gate bias is 0 since it is out of bounds of the bias tensor, so
      // we set its value as a const tensor of specified size and value 0.
      EXPECT_TRUE(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10K bytes
    - Viewed (0)
  7. build-logic/documentation/src/main/groovy/gradlebuild/docs/dsl/source/SourceMetaDataVisitor.java

            TypeMetaData typeMetaData = new TypeMetaData();
            type.ifArrayType(arrayType -> typeMetaData.setArrayDimensions(arrayType.getArrayLevel()));
            extractElementTypeName(type.getElementType(), typeMetaData);
            return typeMetaData;
        }
    
        private void extractElementTypeName(Type elementType, TypeMetaData typeMetaData) {
            elementType.ifVoidType(voidType -> typeMetaData.setName("void"));
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 21 13:27:02 UTC 2023
    - 11.7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/quantization/import_quant_stats_pass.cc

        if (index < 0 || index >= static_cast<int>(op->getNumResults()))
          return false;
        Value res = op->getResult(index);
        return res.getType().isa<ShapedType>() &&
               res.getType().cast<ShapedType>().getElementType().isa<FloatType>();
      }
    
      // A method to retrieve the name for the given op.
      OperationToName op_to_name_;
    
      // We split the normal names and regex names, since the former can use hash
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 08 10:41:08 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/lift_tflite_flex_ops.cc

        if (auto tensor_array_v3_op = dyn_cast<TF::TensorArrayV3Op>(tf_op)) {
          Value handle = tensor_array_v3_op.getHandle();
          auto handle_type = mlir::cast<TensorType>(handle.getType());
          if (handle_type.getElementType().isInteger(/*width=*/32)) {
            Type resource_tensor_type =
                handle_type.clone(TF::ResourceType::get(rewriter.getContext()));
            handle.setType(resource_tensor_type);
          }
        }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/stablehlo/transforms/unfuse_batch_norm_pass.cc

            mlir::dyn_cast<RankedTensorType>(bn_op.getVariance().getType());
        if (!input_type || !variance_type) {
          return failure();
        }
        auto fp_type = mlir::dyn_cast<FloatType>(variance_type.getElementType());
        if (!fp_type) {
          return failure();
        }
    
        // result = (x - mean) * scale / sqrt(variance + epsilon) + offset
        // Let multiplier = scale / sqrt(variance + epsilon), to compute
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.2K bytes
    - Viewed (0)
Back to top