- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 115 for get_attr (0.15 sec)
-
tensorflow/compiler/mlir/tensorflow/utils/device_util_test.cc
mlir::OwningOpRef<mlir::ModuleOp> module_ref = mlir::ModuleOp::create(mlir::UnknownLoc::get(&context)); AddDevicesToOp(*module_ref, /*device_set=*/nullptr); EXPECT_EQ((*module_ref)->getAttr("tf.devices"), nullptr); } TEST(DeviceUtilTest, GetDevicesFromOpNoDevicesAttribute) { mlir::MLIRContext context; mlir::OwningOpRef<mlir::ModuleOp> module_ref =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 9.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.h
} // Returns the function attribute for the given call op which is lifted for // quantization. inline FlatSymbolRefAttr GetFuncAttr(TF::PartitionedCallOp call_op) { return mlir::dyn_cast<FlatSymbolRefAttr>(call_op.getFAttr()); } inline FlatSymbolRefAttr GetFuncAttr(TF::XlaCallModuleOp call_op) { return call_op->getAttrOfType<FlatSymbolRefAttr>( TF::kStablehloEntryFunctionAttrName); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 9.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/internal/passes/extract_head_tail_outside_compilation.cc
auto new_cluster = builder->create<mlir::tf_device::ClusterOp>( cluster.getLoc(), new_cluster_result_types, /*operands=*/llvm::ArrayRef<Value>{}, cluster->getAttrs()); new_cluster.getBody().takeBody(cluster.getBody()); auto operand_not_in_cluster = [&](mlir::OpOperand& operand) { return !new_cluster.getOperation()->isProperAncestor(operand.getOwner()); };
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 20.6K bytes - Viewed (0) -
fastapi/encoders.py
exclude = set(exclude) if isinstance(obj, BaseModel): # TODO: remove when deprecating Pydantic v1 encoders: Dict[Any, Any] = {} if not PYDANTIC_V2: encoders = getattr(obj.__config__, "json_encoders", {}) # type: ignore[attr-defined] if custom_encoder: encoders.update(custom_encoder) obj_dict = _model_dump( obj, mode="json",
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Apr 18 21:56:59 UTC 2024 - 10.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform.cc
} } // Build the new float-versioned op. OperationState state(op->getLoc(), op->getName()); state.operands = dequantized_inputs; state.types = result_types; state.attributes = op->getAttrs(); state.successors = op->getSuccessors(); builder->setInsertionPoint(op); Operation* new_op = builder->create(state); // Insert quantize ops for every outputs and rewrite.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/resource_op_lifting_cleanup.cc
if (cloned == func) continue; // Patch up the op attribute to point to the new function. for (NamedAttribute attr : op->getAttrs()) { auto symref = mlir::dyn_cast<FlatSymbolRefAttr>(attr.getValue()); if (!symref) continue; if (symref.getValue() != func.getName()) continue; op->setAttr(attr.getName(), FlatSymbolRefAttr::get(op->getContext(), cloned.getName())); break; } }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 19.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.cc
for (const auto &entry : llvm::enumerate(indices.getValue())) { auto int_attr = entry.value().cast<IntegerAttr>(); if (int_attr.getInt() < min) return op.emitOpError() << "requires '" << name << "' to contain values of at least " << min << ", but got " << int_attr.getInt() << " at index " << entry.index(); } return success();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 09 22:07:10 UTC 2024 - 170.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/convert_func_to_bfloat16.cc
// OperationState so we can add regions to the new op. OperationState state(op->getLoc(), op->getName().getStringRef(), operands, new_results, op->getAttrs(), op->getSuccessors()); for (Region& region : op->getRegions()) { Region& new_region = *state.addRegion(); rewriter.inlineRegionBefore(region, new_region, new_region.begin());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 9.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/executor_tpuv1_outline_tpu_island.cc
// outlined module. for (func::FuncOp func : outlined_module.getOps<func::FuncOp>()) { func.walk([&](Operation *op) { for (NamedAttribute attr : op->getAttrs()) { if (auto symbol_ref = mlir::dyn_cast<FlatSymbolRefAttr>(attr.getValue())) { MoveFuncOp(symbol_ref, symbol_table, outlined_symbol_table); continue; }
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/utils/attribute_utils.h
// Copies attributes that satisfy the given predicate from `from` to `to`. template <typename Predicate> void CopyAttributes(Operation *from, Operation *to, Predicate P) { for (const NamedAttribute &attr : from->getAttrs()) if (P(attr)) to->setAttr(attr.getName(), attr.getValue()); } // Copies attributes whose name begins with an _ from `from` to `to`. inline void CopyUnderscoredAttributes(Operation *from, Operation *to) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 22 19:47:48 UTC 2024 - 8.7K bytes - Viewed (0)