Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for NameLoc (0.11 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/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)
  5. 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)
  6. 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)
  7. 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)
  8. tensorflow/compiler/mlir/tensorflow/transforms/lift_variables.cc

                 << "failed to convert tensor (name: " << name.str() << ")";
        }
        ElementsAttr tensor_attr = tensor_attr_or.value();
    
        builder.create<tf_saved_model::GlobalTensorOp>(
            NameLoc::get(builder.getStringAttr(name.str())),
            builder.getStringAttr(name), tensor_attr,
            TypeAttr::get(tensor_attr.getType()), builder.getUnitAttr());
      }
    
      return success();
    }
    
    }  // namespace
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 23 09:05:47 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/experimental/tac/transforms/tac_filter.cc

          filtered_ops.push_back(func);
        }
        return;
      }
    
      llvm::Regex op_regex(tac_filter.op_filter().op_name_pattern());
      module.walk([&](Operation* op) {
        auto named_loc = mlir::dyn_cast<NameLoc>(op->getLoc());
        if (!named_loc) {
          return;
        }
        if (!op_regex.match(named_loc.getName())) {
          return;
        }
    
        op->setAttr(kSkipTargetAnnotation, builder.getUnitAttr());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/utils/lstm_utils_test.cc

                                             layer_norm_scale_type};
      auto func_type = builder->getFunctionType(input_types, output_type);
    
      auto func = func::FuncOp::create(
          mlir::NameLoc::get(builder->getStringAttr("fused_func")), "fused_func",
          func_type, {});
      func.addEntryBlock();
    
      std::vector<std::string> attributes;
      if (ln) {
        attributes.push_back(kLayerNormalizedLstmCellSimple);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10K bytes
    - Viewed (0)
Back to top