Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 140 for getElementDtype (0.61 sec)

  1. tensorflow/compiler/mlir/lite/experimental/tac/transforms/fold_constants_to_subgraph.cc

        // arith ConstOp path.
        auto type =
            mlir::cast<ShapedType>(arith_const_op.getType()).getElementType();
        if (!type.isInteger(32) && !type.isInteger(64)) return false;
      } else if (auto const_op = dyn_cast_or_null<TFL::ConstOp>(op)) {
        // ConstOp path.
        auto type = mlir::cast<ShapedType>(const_op.getType()).getElementType();
        if (!type.isInteger(32) && !type.isInteger(64)) return false;
      } else {
        // QConstOp path.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/push_transpose_through_ewise.cc

            llvm::dyn_cast<RankedTensorType>(op->getResult(0).getType());
        auto new_out_type = RankedTensorType::get(
            PermuteShape(current_out_type.getShape(), inverse_perm_arr),
            current_out_type.getElementType());
    
        // Create new ewise op to appear before the tranpose.
        auto *new_ewise_op =
            rewriter.create(op->getLoc(), op->getName().getIdentifier(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_ops_to_mhlo.cc

            op->getLoc(), *output_type, op.getInput());
        rewriter.replaceOpWithNewOp<mhlo::BitcastConvertOp>(
            op,
            output_type->clone(
                mlir::dyn_cast<quant::QuantizedType>(output_type->getElementType())
                    .getStorageType()),
            result);
    
        return success();
      }
    };
    
    // UniformDequantizeOp takes TF quantized types as input which would have been
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 30.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/c/c_api_unified_experimental_mlir.cc

        // unified_api_test.cc.
        return Unimplemented("MlirTensor::Shape is not implemented yet.");
      }
    
      Value getValue() { return value_; }
      Type getElementType() {
        return mlir::cast<ShapedType>(value_.getType()).getElementType();
      }
    
      // For LLVM style RTTI.
      static bool classof(const AbstractTensorHandle* ptr) {
        return ptr->getKind() == kMlir;
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/utils/convert_type.cc

                absl::StrCat("Converting ", debugString(type), " to DataType"));
        }
      } else if (auto complex_type = mlir::dyn_cast<mlir::ComplexType>(type)) {
        auto etype = complex_type.getElementType();
        if (etype.isF32()) {
          *dtype = DT_COMPLEX64;
          return absl::OkStatus();
        } else if (etype.isF64()) {
          *dtype = DT_COMPLEX128;
          return absl::OkStatus();
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/quantize_patterns.td

    def QuantizeByQuantizedType : NativeCodeCall<"quant::Quantize($0, $1.getValue())">;
    def F32ElementsAttr : ElementsAttrBase<
      CPred<"$_self.cast<ElementsAttr>().getShapedType().getElementType().isF32()">, "float constant tensor">;
    
    // Squash tfl.dequantize and tfl.quantize pairs.
    // TODO(fengliuai): Compare the scale of input and output. This can also be
    // squashed to a requantize op if the scales are different.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 23:10:13 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.cc

        if (const TensorType type = mlir::dyn_cast<TensorType>(operand.getType())) {
          if (mlir::isa<FloatType>(type.getElementType())) {
            return false;
          }
          if (mlir::isa<UniformQuantizedType, UniformQuantizedPerAxisType>(
                  type.getElementType())) {
            has_quantized_types = true;
          }
        }
      }
      for (const Value result : call_op.getResults()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 06:04:36 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform.cc

        if (!output_type || !output_type.getElementType().isF32()) return failure();
    
        auto input_type = mlir::dyn_cast<ShapedType>(input_dequant.getType());
        // TODO(renjieliu): support UniformQuantizedPerAxisType.
        auto q_type = mlir::dyn_cast_or_null<quant::UniformQuantizedType>(
            input_type.getElementType());
        if (!q_type) return failure();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/lower_tf.cc

                 .getElementType()
                 .isF32()) {
          return failure();
        }
        MLIRContext *context = rewriter.getContext();
        llvm::SmallVector<Value, 2> operands{op.getA(), op.getB()};
        for (Value &operand : operands) {
          TensorType tensor_type = mlir::cast<TensorType>(operand.getType());
          Type element_type = tensor_type.getElementType();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 74.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.cc

      // is up to ~2x faster.
      const bool is_f16 = input_ty.getElementType().isF16();
      if (is_f16 && CanUseTensorCores(devices)) return "NHWC";
    
      // For f32/f16 data type decision depends on the filter size in spatial
      // dimensions, for other data types we keep current data format.
      if (!input_ty.getElementType().isF32() && !input_ty.getElementType().isF16())
        return getDataFormat();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 146.7K bytes
    - Viewed (0)
Back to top