- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 46 for resource_type (0.19 sec)
-
tensorflow/compiler/mlir/tensorflow/transforms/tpu_partitioned_op_conversion.cc
} else { first_operand_type = op.getOperand().getType(); } auto element_type = getElementTypeOrSelf(first_operand_type); if (mlir::isa<TF::ResourceType>(element_type)) { first_operand_type = mlir::cast<TF::ResourceType>(element_type).getSubtypes().front(); } auto tensor_type = mlir::dyn_cast_or_null<TensorType>(first_operand_type); if (!(tensor_type && tensor_type.hasRank())) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/host_runtime/tfrt_ops.cc
} for (mlir::Value arg : getArgs()) { if (mlir::isa<mlir::TF::ResourceType>( mlir::getElementTypeOrSelf(arg.getType()))) { return emitOpError() << "does not support passing '!tf.resource' values as arguments"; } } for (mlir::Value result : getResults()) { if (mlir::isa<mlir::TF::ResourceType>( mlir::getElementTypeOrSelf(result.getType()))) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/xla_rewrite.cc
llvm::BitVector removed_params(num_params); // Copy the resource-type parameters to the end. for (unsigned i = 0; i < num_params; ++i) { BlockArgument param = callee.getArgument(i); if (mlir::isa<TF::ResourceType>(getElementTypeOrSelf(param.getType()))) { removed_params.set(i); callee.getBody().addArgument(param.getType(), param.getLoc()); param.replaceAllUsesWith(callee.getArguments().back());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 4.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/stack_ops_decomposition.cc
}; // Returns the type of the local variable for the stack size. Type GetSizeVarType(OpBuilder builder) { auto size_type = cutil::GetSizeType(builder); return RankedTensorType::get( {}, TF::ResourceType::get(ArrayRef<TensorType>{size_type}, builder.getContext())); } // Returns the aliasing argument number of a fucntion return value if it simply
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 23.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/lift_variables.cc
if (!global_tensor) continue; 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/lite/transforms/analyze_variables.cc
// Note: this might disable native variables in more than needed cases. // TODO(b/189370197): Enhance variable analysis. for (auto operand : op->getOperands()) { if (mlir::isa<TF::ResourceType>( getElementTypeOrSelf(operand.getType()))) { legalize_to_tfl = false; return WalkResult::interrupt(); } } return WalkResult::advance(); });
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 4.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_variable_runtime_reformatting.cc
for (auto index_and_arg : llvm::enumerate(execute.getArgs())) { auto arg = SkipIdentity(index_and_arg.value(), /*allow_other_use=*/false); if (!arg.hasOneUse() || !mlir::isa<TF::ResourceType>(getElementTypeOrSelf(arg.getType()))) { continue; } auto block_arg = mlir::dyn_cast<BlockArgument>(arg); if (!block_arg || block_arg.getOwner() != &replicate.GetBody()) continue;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 21.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/hoist_loop_invariant.cc
void HoistLoopInvariantPass::runOnOperation() { func::FuncOp func = getOperation(); // Skip the pass if the function inputs contain any resource. for (const auto &type : func.getArgumentTypes()) { if (mlir::isa<ResourceType>(getElementTypeOrSelf(type))) return; } llvm::DenseSet<ResourceHandle> read_only_vars = GetReadOnlyVariables(func); func->walk([&](LoopLikeOpInterface loopLike) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/quantize_variables.cc
} } } // Update resource tensors. for (VarHandleOp var_handle_op : var_handle_ops) { builder.setInsertionPoint(var_handle_op); auto output_type = UnrankedTensorType::get(TF::ResourceType::get( {mlir::cast<TensorType>(ref_qtype)}, builder.getContext())); auto new_var_handle_op = builder.create<VarHandleOp>( var_handle_op.getLoc(), output_type, var_handle_op.getContainer(),
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/readonly_references_to_resources.cc
return signalPassFailure(); } VarHandleOp var_handle_op = builder.create<VarHandleOp>( variable_v2_op.getLoc(), ArrayRef<Type>{RankedTensorType::get( {}, TF::ResourceType::get(ArrayRef<TensorType>{tensor_type}, builder.getContext()))}, ArrayRef<Value>{}, ArrayRef<NamedAttribute>{ builder.getNamedAttr("device", device_attr),
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 7.8K bytes - Viewed (0)