- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 79 for getElementDtype (0.34 sec)
-
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) -
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/tensorflow/utils/convert_tensor_test.cc
tensor.flat<T>().setValues(values); auto value_or = ConvertTensor(tensor, &b); TF_ASSERT_OK(value_or.status()); auto attr = value_or.value(); EXPECT_EQ(attr.getShapedType().getElementType(), expected_ty); Tensor out; TF_ASSERT_OK(ConvertToTensor(attr, &out)); test::ExpectTensorEqual<T>(tensor, out); } }; TEST_F(ConvertTensorTest, Simple) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 10.4K bytes - Viewed (0) -
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/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) -
platforms/jvm/language-java/src/main/java/org/gradle/api/internal/tasks/compile/incremental/asm/ClassDependenciesVisitor.java
} }); } } protected void maybeAddDependentType(Set<String> types, Type type) { while (type.getSort() == Type.ARRAY) { type = type.getElementType(); } if (type.getSort() != Type.OBJECT) { return; } String name = type.getClassName(); if (typeFilter.test(name)) {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue Feb 27 13:49:15 UTC 2024 - 11.7K 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)