Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for NameLoc (0.18 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/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)
  8. tensorflow/compiler/mlir/lite/utils/perception_ops_utils_test.cc

        const SmallVector<mlir::Type, NOutput>& output_types) {
      auto func_type = builder->getFunctionType(input_types, output_types);
      auto func = func::FuncOp::create(
          mlir::NameLoc::get(builder->getStringAttr("fused_func")), "fused_func",
          func_type, {});
    
      func.addEntryBlock();
      mlir::StringAttr attr_value = builder->getStringAttr("MaxUnpooling2D");
      func->setAttr("tf._implements", attr_value);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Sep 29 21:02:21 UTC 2022
    - 7.4K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top