aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/odp_ml_null.c
blob: 718e80d7653446bd55b43919e59c5c70f5508875 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
/* SPDX-License-Identifier: BSD-3-Clause
 * Copyright (c) 2023 Nokia
 */

#include <odp/api/hints.h>
#include <odp/api/ml.h>

#include <odp_init_internal.h>

#include <stdint.h>
#include <string.h>

/* Dummy ML API implementation, no capability and just return error for
 * other functions.
 */
int _odp_ml_init_global(void)
{
	return 0;
}

int _odp_ml_term_global(void)
{
	return 0;
}

int odp_ml_capability(odp_ml_capability_t *capa)
{
	memset(capa, 0, sizeof(odp_ml_capability_t));
	return 0;
}

void odp_ml_config_init(odp_ml_config_t *config ODP_UNUSED)
{
}

int odp_ml_config(const odp_ml_config_t *config ODP_UNUSED)
{
	return -1;
}

void odp_ml_model_param_init(odp_ml_model_param_t *param ODP_UNUSED)
{
}

odp_ml_model_t odp_ml_model_create(const char *name ODP_UNUSED,
				   const odp_ml_model_param_t *param ODP_UNUSED)
{
	return ODP_ML_MODEL_INVALID;
}

int odp_ml_model_destroy(odp_ml_model_t model ODP_UNUSED)
{
	return -1;
}

int odp_ml_model_info(odp_ml_model_t model ODP_UNUSED, odp_ml_model_info_t *info ODP_UNUSED)
{
	return -1;
}

uint32_t odp_ml_model_input_info(odp_ml_model_t model ODP_UNUSED,
				 odp_ml_input_info_t info[] ODP_UNUSED,
				 uint32_t num ODP_UNUSED)
{
	return 0;
}

uint32_t odp_ml_model_output_info(odp_ml_model_t model ODP_UNUSED,
				  odp_ml_output_info_t info[] ODP_UNUSED,
				  uint32_t num ODP_UNUSED)
{
	return 0;
}

odp_ml_model_t odp_ml_model_lookup(const char *name ODP_UNUSED)
{
	return ODP_ML_MODEL_INVALID;
}

uint64_t odp_ml_model_to_u64(odp_ml_model_t model ODP_UNUSED)
{
	return 0;
}

void odp_ml_model_print(odp_ml_model_t model ODP_UNUSED)
{
}

void odp_ml_print(void)
{
}

void odp_ml_compl_pool_param_init(odp_ml_compl_pool_param_t *pool_param)
{
	memset(pool_param, 0, sizeof(odp_ml_compl_pool_param_t));
}

odp_pool_t odp_ml_compl_pool_create(const char *name ODP_UNUSED,
				    const odp_ml_compl_pool_param_t *pool_param ODP_UNUSED)
{
	return ODP_POOL_INVALID;
}

odp_ml_compl_t odp_ml_compl_alloc(odp_pool_t pool ODP_UNUSED)
{
	return ODP_ML_COMPL_INVALID;
}

void odp_ml_compl_free(odp_ml_compl_t ml_compl ODP_UNUSED)
{
}

int odp_ml_compl_run_result(odp_ml_compl_t ml_compl ODP_UNUSED,
			    odp_ml_run_result_t *result ODP_UNUSED)
{
	return -1;
}

int odp_ml_compl_load_result(odp_ml_compl_t ml_compl ODP_UNUSED,
			     odp_ml_load_result_t *result ODP_UNUSED)
{
	return -1;
}

void *odp_ml_compl_user_area(odp_ml_compl_t ml_compl ODP_UNUSED)
{
	return NULL;
}

odp_ml_compl_t odp_ml_compl_from_event(odp_event_t event ODP_UNUSED)
{
	return ODP_ML_COMPL_INVALID;
}

odp_event_t odp_ml_compl_to_event(odp_ml_compl_t ml_compl ODP_UNUSED)
{
	return ODP_EVENT_INVALID;
}

uint64_t odp_ml_compl_to_u64(odp_ml_compl_t ml_compl ODP_UNUSED)
{
	return 0;
}

void odp_ml_compl_param_init(odp_ml_compl_param_t *compl_param ODP_UNUSED)
{
}

int odp_ml_model_load(odp_ml_model_t model ODP_UNUSED, odp_ml_load_result_t *result ODP_UNUSED)
{
	return -1;
}

int odp_ml_model_load_start(odp_ml_model_t model ODP_UNUSED,
			    const odp_ml_compl_param_t *compl_param ODP_UNUSED)
{
	return -1;
}

int odp_ml_model_load_status(odp_ml_model_t model ODP_UNUSED, uint32_t compl_id ODP_UNUSED,
			     odp_ml_load_result_t *result ODP_UNUSED)
{
	return -1;
}

int odp_ml_model_unload(odp_ml_model_t model ODP_UNUSED, odp_ml_load_result_t *result ODP_UNUSED)
{
	return -1;
}

int odp_ml_model_unload_start(odp_ml_model_t model ODP_UNUSED,
			      const odp_ml_compl_param_t *compl_param ODP_UNUSED)
{
	return -1;
}

int odp_ml_model_unload_status(odp_ml_model_t model ODP_UNUSED, uint32_t compl_id ODP_UNUSED,
			       odp_ml_load_result_t *result ODP_UNUSED)
{
	return -1;
}

void odp_ml_run_param_init(odp_ml_run_param_t *param ODP_UNUSED)
{
}

int odp_ml_run(odp_ml_model_t model ODP_UNUSED, const odp_ml_data_t *data ODP_UNUSED,
	       const odp_ml_run_param_t *param ODP_UNUSED)
{
	return -1;
}

int odp_ml_run_multi(odp_ml_model_t model ODP_UNUSED, const odp_ml_data_t data[] ODP_UNUSED,
		     const odp_ml_run_param_t param[] ODP_UNUSED, int num ODP_UNUSED)
{
	return -1;
}

int odp_ml_run_start(odp_ml_model_t model ODP_UNUSED, const odp_ml_data_t *data ODP_UNUSED,
		     const odp_ml_compl_param_t *compl_param ODP_UNUSED,
		     const odp_ml_run_param_t *run_param ODP_UNUSED)
{
	return -1;
}

int odp_ml_run_start_multi(odp_ml_model_t model ODP_UNUSED,
			   const odp_ml_data_t data[] ODP_UNUSED,
			   const odp_ml_compl_param_t compl_param[] ODP_UNUSED,
			   const odp_ml_run_param_t run_param[] ODP_UNUSED,
			   int num ODP_UNUSED)
{
	return -1;
}

int odp_ml_run_status(odp_ml_model_t model ODP_UNUSED, uint32_t compl_id ODP_UNUSED,
		      odp_ml_run_result_t *result ODP_UNUSED)
{
	return -1;
}

int odp_ml_model_extra_stat_info(odp_ml_model_t model ODP_UNUSED,
				 odp_ml_extra_stat_info_t info[] ODP_UNUSED,
				 int num ODP_UNUSED)
{
	return -1;
}

int odp_ml_model_extra_stats(odp_ml_model_t model ODP_UNUSED,
			     uint64_t stats[] ODP_UNUSED, int num ODP_UNUSED)
{
	return -1;
}