Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 117 for get_attr (0.13 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/cluster_outlining.cc

      cluster_op->setAttr(
          builder->getStringAttr(kFuncAttr),
          mlir::SymbolRefAttr::get(builder->getContext(), outlined_func.getName()));
    
      builder->setInsertionPoint(cluster_op);
      auto cluster_func_op = builder->create<tf_device::ClusterFuncOp>(
          cluster_op.getLoc(), outlined_func.getFunctionType().getResults(),
          live_ins.getArrayRef(), cluster_op->getAttrs());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 21:25:12 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/experimental/tac/transforms/raise_target_subgraphs.cc

      added_func_op->setAttr(kInterfaceNameAttr, interface_name);
      added_call_op->setAttr(kInterfaceNameAttr, interface_name);
    
      StringAttr device = mlir::cast<StringAttr>(
          added_func_op->getRegion(0).getBlocks().front().front().getAttr(kDevice));
      StringAttr inference_type = mlir::cast<StringAttr>(
          added_func_op->getRegion(0).getBlocks().front().front().getAttr(
              kInferenceType));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/remove_unused_arguments.cc

        }
      }
      OpBuilder builder(op);
      builder.setInsertionPointAfter(op);
      OperationState state(op->getLoc(), op->getName().getStringRef(),
                           op->getOperands(), result_types, op->getAttrs());
      for (int i = 0; i < op->getNumRegions(); ++i) {
        state.addRegion();
      }
      Operation* new_op = builder.create(state);
      for (const auto& indexed_regions : llvm::enumerate(op->getRegions())) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/flatbuffer_import.cc

      // use it in exports or if there are breaking changes
      module->setAttr("tfl.schema_version",
                      builder.getI32IntegerAttr(model->version));
      if (!model->description.empty()) {
        module->setAttr("tfl.description",
                        builder.getStringAttr(model->description));
      }
    
      if (!metadata_attrs.empty()) {
        module->setAttr("tfl.metadata", builder.getDictionaryAttr(metadata_attrs));
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 18:21:50 UTC 2024
    - 66.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/utils/call_graph_util.cc

        }
      });
      return entry_funcs;
    }
    
    LogicalResult GetCallees(SymbolUserOpInterface op, SymbolTable &symtab,
                             llvm::SmallVector<func::FuncOp> &callees) {
      for (auto attr : op->getAttrs()) {
        auto sym = mlir::dyn_cast<SymbolRefAttr>(attr.getValue());
        if (!sym) continue;
        auto callee = symtab.lookup<func::FuncOp>(sym.getRootReference());
        if (!callee) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/utils/perception_ops_utils.cc

        return func_.emitWarning()
               << "Invalid number of results from " << kMaxUnpooling << ": "
               << func_.getFunctionType().getNumResults();
      }
    
      auto attrs = attr_.getAttrs();
    
      if (failed(HasIntegerArrayWithSize(&func_, attrs, "pool_size", 2))) {
        return failure();
      }
    
      if (failed(HasIntegerArrayWithSize(&func_, attrs, "strides", 2))) {
        return failure();
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_tpu_model_to_cpu.cc

     private:
      LogicalResult matchAndRewrite(TF::TPUPartitionedCallOp call_op,
                                    PatternRewriter& rewriter) const override {
        auto f_attr = mlir::dyn_cast<FlatSymbolRefAttr>(call_op.getFAttr());
        auto module_op = call_op->getParentOfType<ModuleOp>();
        SymbolTable symbol_table(module_op);
    
        auto f_name = f_attr.getValue();
        func::FuncOp float_func =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/launch_to_device_attribute.cc

        if (op->getDialect() != tf_dialect) return WalkResult::advance();
    
        if (parallel_group_attr) {
          op->setAttr(TF::kParallelExecAnnotation, parallel_group_attr);
        }
        auto device_attr = op->getAttr(kDeviceAttr);
        if (!device_attr) {
          op->setAttr(kDeviceAttr, launch.getDeviceAttr());
          return WalkResult::advance();
        }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_op_quant_spec.cc

      auto spec = std::make_unique<OpQuantSpec>();
      if (auto call_op = dyn_cast<TF::PartitionedCallOp>(op)) {
        StringRef function_name =
            mlir::cast<FlatSymbolRefAttr>(call_op.getFAttr()).getValue();
        if (!function_name.starts_with("composite_")) {
          return spec;
        }
        if (function_name.contains("depthwise_conv2d")) {
          spec->coeff_op_quant_dim[1] = 3;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/ir/tf_device.cc

        BlockArgument block_arg) {
      assert(block_arg.getOwner() == &GetBody());
    
      unsigned arg_number = block_arg.getArgNumber();
      unsigned num_replicated_args = GetNumReplicatedBlockArguments();
      int32_t num_replicas = getNAttr().getInt();
      MutableArrayRef<OpOperand> operands = getOperation()->getOpOperands();
    
      // All replicated arguments are before packed arguments so return replicated
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 33.4K bytes
    - Viewed (0)
Back to top