- Sort Score
- Result 10 results
- Languages All
Results 131 - 140 of 169 for getElementDtype (0.47 sec)
-
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) -
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) -
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) -
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) -
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/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) -
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/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)