- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 73 for getElementDtype (0.26 sec)
-
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/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) -
tensorflow/compiler/mlir/tfrt/analysis/cost_analysis.cc
int64_t output_size = InferTensorSize(context, value_type); int64_t cost = kLookupTableFindCostScale * output_size; if (mlir::isa<mlir::TF::StringType>(key_type.getElementType())) cost *= kLookupTableFindStringKeyCostScale; return cost; } // The cost function for tf.GatherV2. int64_t InferGatherV2Cost(const CostContext& context, mlir::TF::GatherV2Op op) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 7.6K bytes - Viewed (0) -
subprojects/core/src/test/groovy/org/gradle/api/internal/collections/ElementSourceSpec.groovy
TypedProviderOfSet(Class<T> type, Set<T> value) { this.type = type this.value = value } @Override Class<? extends T> getElementType() { return type } @Override protected Value<? extends Set<T>> calculateOwnValue(ValueConsumer consumer) { return Value.of(value) }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Aug 25 10:08:46 UTC 2022 - 9.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/constant_fold_utils.cc
// require "raising" later. for (const Type type : inst->getResultTypes()) { if (const TensorType tensor_type = mlir::dyn_cast<TensorType>(type)) { if (mlir::isa<VariantType>(tensor_type.getElementType())) { return false; } } } // Operations that execute function calls shouldn't be constant folded. if (llvm::isa<TF::WhileOp, TF::CaseOp, TF::IfOp, CallOpInterface>(inst)) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 7.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/op_stat_pass.cc
ShapedType value_shaped_type = mlir::dyn_cast_or_null<ShapedType>( value_for_deducing_op_type.getType()); if (value_shaped_type != nullptr) { auto operand_or_result = value_shaped_type.getElementType(); std::string dtype; TypeSwitch<Type>(operand_or_result) .Case<IntegerType>([&](Type) { dtype =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/analysis/resource_value_typed_analyzer.cc
namespace mlir { namespace TF { namespace { bool IsResourceType(Type type) { if (auto tensor_type = mlir::dyn_cast<TensorType>(type)) { return mlir::isa<TF::ResourceType>(tensor_type.getElementType()); } return false; } bool IsResource(Value value) { return IsResourceType(value.getType()); } // Helper that returns the FuncOp that is the SessionInit function which
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 15 09:04:13 UTC 2024 - 8K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/pin_ops_with_side_effects.cc
bool IsResourceTensor(Value value) { const auto tensor_type = mlir::dyn_cast<TensorType>(value.getType()); return tensor_type && mlir::isa<mlir::TF::ResourceType>(tensor_type.getElementType()); } // The default criterion for operations being considered as causing or being // dependent on side effects. Reflects the current runtime logic; see below. bool OpHasSideEffects(Operation *op) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 7K bytes - Viewed (0)