Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for NameLoc (0.12 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/passes/add_quantization_unit_loc.cc

      if (locations.size() < 2 || !isa<NameLoc>(locations.front())) return false;
    
      StringRef op_type_with_suffix =
          mlir::cast<NameLoc>(locations.front()).getName().strref();
      if (!op_type_with_suffix.ends_with(":")) return false;
    
      return absl::c_all_of(locations, [](Location loc) {
        return isa<NameLoc>(loc) ||
               (isa<CallSiteLoc>(loc) &&
                isa<NameLoc>(mlir::cast<CallSiteLoc>(loc).getCallee()));
      });
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/cc/quantization_unit_loc.cc

        : CallSiteLoc(CallSiteLoc::get(
              /*callee=*/NameLoc::get(
                  StringAttr::get(context, ConcatNodeAndFuncName(unit.node_name(),
                                                                 unit.func_name())),
                  /*childLoc=*/NameLoc::get(
                      StringAttr::get(context, unit.op_type()))),
              /*caller=*/NameLoc::get(StringAttr::get(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/metrics/types_util.cc

              auto new_call = mutable_location->mutable_call()->Add();
              ExtractFileLine(loc, new_call->mutable_source());
            })
            .Case<NameLoc>([&](NameLoc loc) {
              if (!mutable_location->has_type()) {
                mutable_location->set_type(ConverterErrorData::NAMELOC);
              }
    
              auto new_call = mutable_location->mutable_call()->Add();
              new_call->set_name(loc.getName().str());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_save_op.cc

    // op. The `ConstOp` will be created at `builder`'s current insertion point.
    TF::ConstOp CreateTensorNamesConst(const ArrayRef<std::string> tensor_names,
                                       OpBuilder& builder) {
      const auto loc = NameLoc::get(builder.getStringAttr("tensor_names"));
      return Create1DStringConst(tensor_names, loc, builder);
    }
    
    // Creates a 1D string array constant for "shape_and_slices" input of
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 05:52:39 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_restore_op.cc

      const int insert_idx = func_op.getNumArguments();
    
      func_op.insertArgument(insert_idx, /*argType=*/filename_op_type, arg_attrs,
                             NameLoc::get(file_prefix_attr));
    
      return func_op.getArgument(insert_idx);
    }
    
    // Creates a 1D string array constant for "tensor_names" input of `RestoreV2`
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Mar 12 06:02:20 UTC 2023
    - 9K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/utils/location_utils.cc

        auto locations = fused_loc.getLocations();
        if (!locations.empty()) {
          // Skip locations for propagating op_type metadata.
          if (auto name_loc = mlir::dyn_cast<mlir::NameLoc>(locations[0])) {
            if (name_loc.getName().strref().ends_with(":")) {
              if (locations.size() == 2)
                return locations[1];
              else if (locations.size() > 2)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_save_function_ops_to_main.cc

          RankedTensorType::get(/*shape=*/{}, builder.getType<TF::StringType>());
      BlockArgument new_file_prefix_arg =
          main_func_op.getBody().front().addArgument(
              file_prefix_arg_type,
              NameLoc::get(builder.getStringAttr(kTfFilePrefix)));
    
      SmallVector<Type> input_types(main_func_op.getArgumentTypes());
      input_types.emplace_back(file_prefix_arg_type);
    
      main_func_op.setType(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/utils/session_utils.cc

      // In some cases the shared_name attribute doesn't have the same
      // tensor name in the model, so we first try to use the location
      // then fallback to shared_name attribute.
      if (auto loc = mlir::dyn_cast<NameLoc>(var_handle_op->getLoc()))
        return loc.getName().str();
      return var_handle_op.getSharedName().str();
    }
    
    std::vector<std::string> GetVariableNames(
        llvm::ArrayRef<TF::VarHandleOp> var_handle_ops) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/quantization/import_quant_stats_pass.cc

        Location loc = tensorflow::GetLocationWithoutOpType(op->getLoc());
        if (auto name = loc.dyn_cast<NameLoc>()) {
          return name.getName().strref();
        } else if (auto fused_name = loc.dyn_cast<FusedLoc>()) {
          for (auto sub_loc : fused_name.getLocations()) {
            if (auto named_sub_loc = sub_loc.dyn_cast<NameLoc>()) {
              return named_sub_loc.getName().strref();
            }
          }
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 08 10:41:08 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_main_function.cc

      llvm::SmallVector<Value> returning_values(output_count, Value());
      for (const auto& node_name : node_to_output_map.keys()) {
        auto node_output_tensors = node_to_output_map[node_name];
    
        NameLoc new_loc = NameLoc::get(builder.getStringAttr(node_name));
        int32_t max_tensor_index = 0;
        absl::c_for_each(node_output_tensors,
                         [&max_tensor_index](const OutputInfo& output_info) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 16.5K bytes
    - Viewed (0)
Back to top