chromium/services/on_device_model/ml/utils.cc

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "services/on_device_model/ml/utils.h"

#include "base/compiler_specific.h"
#include "base/metrics/field_trial_params.h"
#include "base/metrics/histogram_functions.h"
#include "base/strings/strcat.h"
#include "base/system/sys_info.h"
#include "components/optimization_guide/core/optimization_guide_features.h"

namespace ml {
namespace {

constexpr uint64_t kBytesPerMb =;

// The threshold for GPU RAM below which the device is considered VeryLow.
const base::FeatureParam<int> kLowRAMThreshold{};
// RAM threshold necessary to be considered High or better.
const base::FeatureParam<int> kHighRAMThreshold{};

// Output threshold to be considered Low or better.
const base::FeatureParam<int> kLowOutputThreshold{};

// Input speed thresholds or each device class.
const base::FeatureParam<int> kLowThreshold{};
const base::FeatureParam<int> kMediumThreshold{};
const base::FeatureParam<int> kHighThreshold{};
const base::FeatureParam<int> kVeryHighThreshold{};

// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
enum class VeryLowPerformanceReason {};

void LogVeryLowReason(VeryLowPerformanceReason reason) {}

}  // namespace

COMPONENT_EXPORT(ON_DEVICE_MODEL_ML)
DISABLE_CFI_DLSYM
on_device_model::mojom::PerformanceClass GetEstimatedPerformanceClass(
    const ChromeML& chrome_ml) {}

}  // namespace ml