- Sort Score
- Result 10 results
- Languages All
Results 111 - 120 of 138 for getElementDtype (0.26 sec)
-
tensorflow/compiler/mlir/tensorflow/transforms/functional_control_flow_to_regions.cc
Value ConvertConditionToBoolean(Operation* op, Value cond) { if (auto ranked_type = mlir::dyn_cast<RankedTensorType>(cond.getType())) if (ranked_type.getRank() == 0 && ranked_type.getElementType().isSignlessInteger(1)) return cond; OpBuilder builder(op); Value to_bool = builder.create<TF::ToBoolOp>(op->getLoc(), cond); CopyDeviceAndUnderscoredAttributes(op, to_bool.getDefiningOp());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/odml_converter/transforms/outline_composites.cc
auto cst_op = llvm::dyn_cast_or_null<stablehlo::ConstantOp>(cst_input); if (!cst_op) return false; ElementsAttr value = cst_op.getValue(); if (!value.isSplat()) return false; if (!value.getElementType().isF32()) return false; return std::abs(value.getSplatValue<float>() - val) < kTolerance; } // Determines if the given op is semantically that of the gauss error function. bool MatchERF(Operation* op) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 9.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/insert_weight_param.cc
LogicalResult match(Operation* op) const override { if (op->getNumResults() != 1) { return failure(); } auto type = mlir::cast<TensorType>(op->getResult(0).getType()); if (!type || !type.getElementType().isF32()) { return failure(); } return success( op->hasOneUse() && IsWeightQuantizableFunction(*op->getUses().begin(), type.getRank())); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 09 05:56:10 UTC 2024 - 10.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/defer_activation_transpose.cc
Permute<int64_t>(result_type.getShape(), kNchwToNhwcPermutation); const TensorType new_result_type = result_type.cloneWith(new_result_shape, result_type.getElementType()); // Create a new `stablehlo.reduce_window` with all relevant attributes // permutated to match the new operand & result type. auto new_reduce_window_op =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_quantize_drq.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 - 11.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_avg_pool.cc
llvm::SmallVector<int64_t> shape = {pool.n, h, w, pool.c}; auto op_type = mlir::cast<RankedTensorType>(op->getResult(0).getType()); return RankedTensorType::get(shape, op_type.getElementType()); } StringAttr GetAvgPoolOpPadAttr(Builder& builder, CompositeOp op) { const TorchAvgPoolData pool = GetTorchAvgPoolData(op); if (pool.ph == 0 && pool.pw == 0) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 28 23:16:05 UTC 2024 - 9.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/preprocess_op.cc
if (cur_rank != 4 || cur_shape[2] == 1) return failure(); TensorType new_shape = RankedTensorType::get( {cur_shape[0], cur_shape[1], 1, cur_shape[2] * cur_shape[3]}, attr.getElementType()); // Inserts a reshape op. auto shape_spec_type = RankedTensorType::get({cur_rank}, rewriter.getIntegerType(64)); auto new_shape_const_attr =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/legalize_tf.cc
permuted_shape.begin() + input_rank - 2); return rewriter.create<TFL::TransposeOp>( op->getLoc(), RankedTensorType::get(permuted_shape, input_type.getElementType()), input, permutation_tensor_op.getResult()); }; if (!can_convert_to_fully_connected(op)) { return false; } Value input_lhs = get_real_input_value(op.getX());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon May 20 20:06:54 UTC 2024 - 45.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/translate/tf_mlir_translate.cc
if (auto attr = inst.getAttrOfType<mlir::ElementsAttr>(attr_id)) { mlir::Attribute rand_val; mlir::Type element_type = attr.getShapedType().getElementType(); if (mlir::isa<mlir::IntegerType>(element_type)) { rand_val = mlir::IntegerAttr::get(element_type, std::rand()); } else if (element_type.isF16() || element_type.isF32() ||
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 07 11:51:44 UTC 2024 - 14.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/while_loop_outline.cc
elemType.isInteger(64)) return true; // Complex<F<32>> is allowed. if (mlir::isa<ComplexType>(elemType) && mlir::cast<ComplexType>(elemType).getElementType().isF32()) return true; // QUINT8 and UI8 are allowed. if (mlir::isa<TF::Quint8Type>(elemType) || (elemType.isInteger(8) && mlir::cast<IntegerType>(elemType).isUnsigned())) return true;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.8K bytes - Viewed (0)