- Sort Score
- Result 10 results
- Languages All
Results 111 - 120 of 169 for getElementDtype (0.17 sec)
-
tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_driver.cc
if (auto dq_op = dyn_cast_or_null<quantfork::DequantizeCastOp>( op->getOperand(i).getDefiningOp())) { auto type = mlir::cast<TensorType>(dq_op.getArg().getType()).getElementType(); if (auto per_axis_qtype = mlir::dyn_cast_or_null<quant::UniformQuantizedPerAxisType>( QuantizedType::getQuantizedElementType(type))) { return true; } }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 38.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_quantize.cc
bool need_to_set_input_nodes_quantization_params = false; for (const BlockArgument arg : func.getArguments()) { auto shaped = mlir::dyn_cast<ShapedType>(arg.getType()); if (shaped && mlir::isa<FloatType>(shaped.getElementType()) && !has_quantize_op(arg)) { need_to_set_input_nodes_quantization_params = true; break; } } if (!need_to_set_input_nodes_quantization_params) { return false; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 17.2K bytes - Viewed (0) -
platforms/core-configuration/model-core/src/main/java/org/gradle/model/internal/inspect/StructNodeInitializer.java
CollectionSchema<P, ?> propertyCollectionsSchema = (CollectionSchema<P, ?>) propertySchema; ModelType<?> elementType = propertyCollectionsSchema.getElementType(); nodeInitializerRegistry.ensureHasInitializer(forProperty(elementType, property, bindings.getPublicSchema().getType())); } if (property.isDeclaredAsHavingUnmanagedType()) {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Sep 28 09:51:04 UTC 2023 - 9.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/optimize_functional_ops.cc
// TODO(hinsu): Handle constants that are not scalar booleans. auto cond_type = mlir::dyn_cast<RankedTensorType>(cond.getType()); if (!cond_type || !cond_type.getShape().equals({}) || !cond_type.getElementType().isInteger(/*width=*/1)) return failure(); // Identify the branch to inline. bool cond_value = (*cond.value_begin<APInt>()).getSExtValue(); func::FuncOp func = cond_value ? then_func : else_func;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/optimize_layout.cc
SmallVector<int64_t, 4> permutedShape = applyPermutation( type.getShape(), isInvert ? invertPermutationVector(perm) : perm); return RankedTensorType::get(permutedShape, type.getElementType()); } static RankedTensorType GetInvertPermutedTensorType(RankedTensorType type, ArrayRef<int64_t> perm) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 21:59:06 UTC 2024 - 8.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/fold_constant_transpose.cc
if (!const_op) return failure(); // Only support float tensors. auto tensor_type = mlir::dyn_cast_or_null<TensorType>(const_op.getType()); if (!tensor_type || !tensor_type.getElementType().isF32()) { return failure(); } return success( mlir::isa_and_nonnull<DenseFPElementsAttr>(const_op.getValue())); } void rewrite(mlir::stablehlo::TransposeOp op,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 7.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/lower_variable_ops_to_ml_program.cc
auto tensor = llvm::dyn_cast<TensorType>(var_handle_op.getResource().getType()); if (!tensor) return nullptr; TF::ResourceType resource = llvm::dyn_cast<TF::ResourceType>(tensor.getElementType()); if (!resource || resource.getSubtypes().size() != 1) return nullptr; return resource.getSubtypes().front(); } else if (auto global_tensor_op =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Mar 06 23:53:00 UTC 2024 - 7.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/prepare_quantize.cc
bool need_to_set_input_nodes_quantization_params = false; for (const BlockArgument arg : func.getArguments()) { auto shaped = mlir::dyn_cast<ShapedType>(arg.getType()); if (shaped && mlir::isa<FloatType>(shaped.getElementType()) && !has_quantize_op(arg)) { need_to_set_input_nodes_quantization_params = true; break; } } if (!need_to_set_input_nodes_quantization_params) { return false; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 17.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/prepare_quantize_dynamic_range.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 - 20.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/lift_variables.cc
auto arg_type = mlir::cast<RankedTensorType>(arg.getType()); assert(arg_type.getRank() == 0); llvm::ArrayRef<TensorType> underlying_type = mlir::cast<TF::ResourceType>(arg_type.getElementType()).getSubtypes(); // If the arg type already matches the global_tensor type, we don't need // to do anything. if (!underlying_type.empty() &&
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 23 09:05:47 UTC 2024 - 7.9K bytes - Viewed (0)