Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 139 for getElementDtype (0.4 sec)

  1. 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)
  2. tensorflow/compiler/mlir/lite/stablehlo/transforms/op_stat_pass.cc

          ShapedType value_shaped_type = mlir::dyn_cast_or_null<ShapedType>(
              value_for_deducing_op_type.getType());
          if (value_shaped_type != nullptr) {
            auto operand_or_result = value_shaped_type.getElementType();
            std::string dtype;
    
            TypeSwitch<Type>(operand_or_result)
                .Case<IntegerType>([&](Type) {
                  dtype =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/analysis/resource_value_typed_analyzer.cc

    namespace mlir {
    namespace TF {
    namespace {
    
    bool IsResourceType(Type type) {
      if (auto tensor_type = mlir::dyn_cast<TensorType>(type)) {
        return mlir::isa<TF::ResourceType>(tensor_type.getElementType());
      }
      return false;
    }
    
    bool IsResource(Value value) { return IsResourceType(value.getType()); }
    
    // Helper that returns the FuncOp that is the SessionInit function which
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 09:04:13 UTC 2024
    - 8K bytes
    - Viewed (0)
  4. 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)
  5. tensorflow/compiler/mlir/lite/transforms/pin_ops_with_side_effects.cc

    bool IsResourceTensor(Value value) {
      const auto tensor_type = mlir::dyn_cast<TensorType>(value.getType());
      return tensor_type &&
             mlir::isa<mlir::TF::ResourceType>(tensor_type.getElementType());
    }
    
    // The default criterion for operations being considered as causing or being
    // dependent on side effects. Reflects the current runtime logic; see below.
    bool OpHasSideEffects(Operation *op) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7K 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. tensorflow/compiler/mlir/lite/transforms/optimize_batch_matmul.cc

                         permuted_shape.begin() + input_rank - 2);
          return rewriter.create<TFL::TransposeOp>(
              bmm_op->getLoc(),
              RankedTensorType::get(permuted_shape, input_type.getElementType()),
              input, permutation_tensor_op.getResult());
        };
    
        Value input_lhs = bmm_op.getX();
        Value input_rhs = bmm_op.getY();
    
        Value output_lhs =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/flatbuffer_import.cc

        bool truncate = shaped_type.getElementType().getIntOrFloatBitWidth() == 64;
        TF_ASSIGN_OR_RETURN(value,
                            tfl::ConvertIntBuffer(shaped_type, buffer, truncate));
        TF_ASSIGN_OR_RETURN(
            mlir::quant::QuantizedType type,
            tfl::GetQuantizedType(tensor, builder, /*is_constant=*/true,
                                  /*storage_type=*/value.getElementType()));
        shaped_type = shaped_type.clone(type);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 18:21:50 UTC 2024
    - 66.8K 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