summaryrefslogtreecommitdiff
path: root/chromium/chromeos/services/machine_learning/public/mojom/model.mojom
blob: 473313f085e71a5afa33631594c89b9cbfdb13c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Datatypes and interfaces of models for the Machine Learning API.

// NOTE: This mojom should be kept in sync with the copy in Chromium OS's repo
// in src/platform2/ml/mojom/.
// Example: A backwards-compatible interface change can be made in Chromium OS
// first, then replicated and used here later.

module chromeos.machine_learning.mojom;

import "chromeos/services/machine_learning/public/mojom/graph_executor.mojom";

enum ModelId {
  UNKNOWN,
  TAB_DISCARDER,
  POWER_MANAGER
};

struct ModelSpec {
  ModelId id;
};

// The lifetime of the cached model is tied to the lifetime of the Model
// interface pipe. The Model interface pipe can be used to acquire multiple
// separate GraphExecutor instances.
interface Model {
  CreateGraphExecutor(GraphExecutor& request);
};