Skip to content

Commit ecaccd0

Browse files
authored
Merge pull request #1 from aulitech/neuton
Neuton
2 parents 593f243 + 78ac6c9 commit ecaccd0

File tree

16 files changed

+1641
-3
lines changed

16 files changed

+1641
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,4 @@ TAGS
9090

9191
# Uncrustify formatting
9292
*.uncrustify
93+
ports/nrf/make-auli.txt

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,3 +310,6 @@
310310
[submodule "ports/espressif/esp32-camera"]
311311
path = ports/espressif/esp32-camera
312312
url = https://github.com/adafruit/esp32-camera/
313+
[submodule "lib/neuton"]
314+
path = lib/neuton
315+
url = https://github.com/aulitech/Neuton.git

lib/neuton

Submodule neuton added at 0805b70

ports/nrf/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ endif
100100
# option to override compiler optimization level, set in boards/$(BOARD)/mpconfigboard.mk
101101
CFLAGS += $(OPTIMIZATION_FLAGS)
102102

103-
CFLAGS += $(INC) -Wall -Werror -std=gnu11 -nostdlib -fshort-enums $(BASE_CFLAGS) $(CFLAGS_MOD) $(COPT) -Werror=missing-prototypes
103+
CFLAGS += $(INC) -Wall -Werror -std=gnu11 -nostdlib -fshort-enums $(BASE_CFLAGS) $(CFLAGS_MOD) $(COPT)
104104

105105
# Nordic Softdevice SDK header files contains inline assembler that has
106106
# broken constraints. As a result the IPA-modref pass, introduced in gcc-11,

ports/nrf/boards/aulitech/mpconfigboard.mk

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,32 @@ MCU_CHIP = nrf52840
88

99
QSPI_FLASH_FILESYSTEM = 1
1010
EXTERNAL_FLASH_DEVICES = "P25Q16H"
11+
12+
AULITECH_NEUTONML = 1
13+
14+
CIRCUITPY_PIXELBUF = 0
15+
CIRCUITPY_AUDIOBUSIO = 0
16+
CIRCUITPY_AUDIOCORE = 0
17+
CIRCUITPY_AUDIOMIXER = 0
18+
CIRCUITPY_AUDIOMP3 = 0
19+
CIRCUITPY_AUDIOPWMIO = 0
20+
CIRCUITPY_BITBANGIO = 0
21+
CIRCUITPY_BITMAPTOOLS = 0
22+
CIRCUITPY_DISPLAYIO = 0
23+
CIRCUITPY_FONTIO = 0
24+
CIRCUITPY_FRAMEBUFFERIO = 0
25+
CIRCUITPY_KEYPAD = 0
26+
CIRCUITPY_MSGPACK = 0
27+
CIRCUITPY_NEOPIXEL_WRITE = 0
28+
CIRCUITPY_ONEWIREIO = 0
29+
CIRCUITPY_PARALLELDISPLAY = 0
30+
CIRCUITPY_RAINBOWIO = 0
31+
CIRCUITPY_RGBMATRIX = 0
32+
CIRCUITPY_ROTARYIO = 0
33+
CIRCUITPY_SDCARDIO = 0
34+
CIRCUITPY_SHARPDISPLAY = 0
35+
CIRCUITPY_SYNTHIO = 0
36+
CIRCUITPY_TERMINALIO = 0
37+
CIRCUITPY_TOUCHIO = 0
38+
CIRCUITPY_USB_MIDI = 0
39+
CIRCUITPY_VECTORIO = 0

ports/nrf/make-auli.txt

Lines changed: 1043 additions & 0 deletions
Large diffs are not rendered by default.

py/circuitpy_defns.mk

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ BASE_CFLAGS = \
3333
-Wdouble-promotion \
3434
-Wimplicit-fallthrough=2 \
3535
-Wno-endif-labels \
36-
-Wstrict-prototypes \
3736
-Werror-implicit-function-declaration \
38-
-Wfloat-equal \
3937
-Wundef \
4038
-Wshadow \
4139
-Wwrite-strings \
@@ -54,6 +52,17 @@ BASE_CFLAGS = \
5452
-DCIRCUITPY_BOARD_ID="\"$(BOARD)\"" \
5553
--param max-inline-insns-single=500
5654

55+
ifeq ($(AULITECH_NEUTONML),1)
56+
BASE_CFLAGS += \
57+
-Wno-strict-prototypes \
58+
-Wno-missing-prototypes \
59+
-Wno-float-equal
60+
else
61+
-Wstrict-prototypes \
62+
-Wmissing-prototypes \
63+
-Wfloat-equal
64+
endif
65+
5766
# Use these flags to debug build times and header includes.
5867
# -ftime-report
5968
# -H
@@ -236,6 +245,9 @@ endif
236245
ifeq ($(CIRCUITPY_NEOPIXEL_WRITE),1)
237246
SRC_PATTERNS += neopixel_write/%
238247
endif
248+
ifeq ($(AULITECH_NEUTONML),1)
249+
SRC_PATTERNS += neutonml/%
250+
endif
239251
ifeq ($(CIRCUITPY_NVM),1)
240252
SRC_PATTERNS += nvm/%
241253
endif
@@ -595,6 +607,8 @@ SRC_SHARED_MODULE_ALL = \
595607
memorymonitor/AllocationAlarm.c \
596608
memorymonitor/AllocationSize.c \
597609
network/__init__.c \
610+
neutonml/__init__.c \
611+
neutonml/Neuton.c \
598612
msgpack/__init__.c \
599613
onewireio/__init__.c \
600614
onewireio/OneWire.c \
@@ -677,6 +691,14 @@ SRC_MOD += $(addprefix lib/mp3/src/, \
677691
)
678692
$(BUILD)/lib/mp3/src/buffers.o: CFLAGS += -include "py/misc.h" -D'MPDEC_ALLOCATOR(x)=m_malloc(x,0)' -D'MPDEC_FREE(x)=m_free(x)'
679693
endif
694+
695+
ifeq ($(AULITECH_NEUTONML),1)
696+
SRC_MOD += $(addprefix lib/neuton/neuton/, \
697+
neuton.c \
698+
)
699+
$(BUILD)/lib/neuton/neuton/neuton.o: CFLAGS += -include "py/misc.h" -D'MPDEC_ALLOCATOR(x)=m_malloc(x,0)' -D'MPDEC_FREE(x)=m_free(x)' -Wno-strict-prototypes
700+
endif
701+
680702
ifeq ($(CIRCUITPY_RGBMATRIX),1)
681703
SRC_MOD += $(addprefix lib/protomatter/src/, \
682704
core.c \

py/circuitpy_mpconfig.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,9 @@ CFLAGS += -DCIRCUITPY_MSGPACK=$(CIRCUITPY_MSGPACK)
281281
CIRCUITPY_NEOPIXEL_WRITE ?= 1
282282
CFLAGS += -DCIRCUITPY_NEOPIXEL_WRITE=$(CIRCUITPY_NEOPIXEL_WRITE)
283283

284+
AULITECH_NEUTONML ?= 1
285+
CFLAGS += -DAULITECH_NEUTONML=$(AULITECH_NEUTONML)
286+
284287
CIRCUITPY_NVM ?= 1
285288
CFLAGS += -DCIRCUITPY_NVM=$(CIRCUITPY_NVM)
286289

shared-bindings/neutonml/Neuton.c

Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
#include <stdint.h>
2+
#include <string.h>
3+
#include "shared/runtime/context_manager_helpers.h"
4+
#include "py/obj.h"
5+
#include "py/objproperty.h"
6+
#include "py/runtime.h"
7+
#include "py/runtime0.h"
8+
#include "shared-bindings/neutonml/Neuton.h"
9+
#include "shared-module/neutonml/Neuton.h"
10+
#include "shared-bindings/util.h"
11+
12+
//| .. currentmodule:: neutonml
13+
//|
14+
//| :class:`neuton` -- This module provide the wrapper for a newton machine learning library.
15+
//| ====================================================================================
16+
//|
17+
//| The class definition.
18+
//|
19+
//| .. class:: neuton()
20+
//|
21+
//| Create an object.
22+
23+
STATIC mp_obj_t neutonml_neuton_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *pos_args) {
24+
neutonml_neuton_obj_t *self = m_new_obj(neutonml_neuton_obj_t);
25+
self->base.type = &neutonml_neuton_type;
26+
shared_module_neutonml_neuton_construct(self);
27+
return MP_OBJ_FROM_PTR(self);
28+
}
29+
30+
//| .. method:: deinit()
31+
//|
32+
//| Deinitializes the Meaning and releases any hardware resources for reuse.
33+
//|
34+
STATIC mp_obj_t neutonml_neuton_deinit(mp_obj_t self_in) {
35+
shared_module_neutonml_neuton_deinit(self_in);
36+
return mp_const_none;
37+
}
38+
STATIC MP_DEFINE_CONST_FUN_OBJ_1(neutonml_neuton_deinit_obj, neutonml_neuton_deinit);
39+
40+
//| .. method:: __enter__()
41+
//|
42+
//| No-op used by Context Managers.
43+
//|
44+
// Provided by context manager helper.
45+
46+
//| .. method:: __exit__()
47+
//|
48+
//| Automatically deinitializes the hardware when exiting a context. See
49+
//| :ref:`lifetime-and-contextmanagers` for more info.
50+
//|
51+
STATIC mp_obj_t neutonml_neuton_obj___exit__(size_t n_args, const mp_obj_t *args) {
52+
shared_module_neutonml_neuton_deinit(args[0]);
53+
return mp_const_none;
54+
}
55+
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(neutonml_neuton___exit___obj, 4, 4, neutonml_neuton_obj___exit__);
56+
57+
STATIC mp_obj_t neutonml_neuton_obj_get_inputs_count(mp_obj_t self_in) {
58+
return mp_obj_new_int(shared_module_neutonml_neuton_model_inputs_count(self_in));
59+
}
60+
MP_DEFINE_CONST_FUN_OBJ_1(neutonml_neuton_get_inputs_count_obj, neutonml_neuton_obj_get_inputs_count);
61+
62+
STATIC mp_obj_t neutonml_neuton_obj_set_inputs(mp_obj_t self_in, mp_obj_t inputs) {
63+
64+
size_t len;
65+
int status = 0;
66+
mp_obj_t *items;
67+
mp_obj_get_array(inputs, &len, &items);
68+
status = shared_module_neutonml_neuton_model_set_inputs(self_in, (input_t *)&items);
69+
return mp_obj_new_int((mp_int_t)status);
70+
}
71+
MP_DEFINE_CONST_FUN_OBJ_2(neutonml_neuton_set_inputs_obj, neutonml_neuton_obj_set_inputs);
72+
73+
STATIC mp_obj_t neutonml_neuton_obj_get_inputs_ptr(mp_obj_t self_in) {
74+
float *inputs;
75+
76+
inputs = shared_module_neutonml_neuton_model_get_inputs_ptr(self_in);
77+
return MP_OBJ_FROM_PTR(inputs);
78+
}
79+
MP_DEFINE_CONST_FUN_OBJ_1(neutonml_neuton_get_inputs_ptr_obj, neutonml_neuton_obj_get_inputs_ptr);
80+
81+
STATIC mp_obj_t neutonml_neuton_obj_set_ready_flag(mp_obj_t self_in, mp_obj_t dummy) {
82+
shared_module_neutonml_neuton_model_set_ready_flag(self_in);
83+
return dummy;
84+
}
85+
MP_DEFINE_CONST_FUN_OBJ_2(neutonml_neuton_set_ready_flag_obj, neutonml_neuton_obj_set_ready_flag);
86+
87+
STATIC mp_obj_t neutonml_neuton_obj_get_ready_flag(mp_obj_t self_in) {
88+
return mp_const_none;
89+
}
90+
MP_DEFINE_CONST_FUN_OBJ_1(neutonml_neuton_get_ready_flag_obj, neutonml_neuton_obj_get_ready_flag);
91+
MP_PROPERTY_GETSET(neutonml_neuton_ready_flag_obj,
92+
(mp_obj_t)&neutonml_neuton_get_ready_flag_obj,
93+
(mp_obj_t)&neutonml_neuton_set_ready_flag_obj);
94+
95+
STATIC mp_obj_t neutonml_neuton_obj_get_reset_inputs(mp_obj_t self_in) {
96+
shared_module_neutonml_neuton_model_reset_inputs(self_in);
97+
return mp_const_none;
98+
}
99+
MP_DEFINE_CONST_FUN_OBJ_1(neutonml_neuton_get_reset_inputs_obj, neutonml_neuton_obj_get_reset_inputs);
100+
101+
STATIC mp_obj_t neutonml_neuton_obj_set_reset_inputs(mp_obj_t self_in) {
102+
shared_module_neutonml_neuton_model_reset_inputs(self_in);
103+
return mp_const_none;
104+
}
105+
MP_DEFINE_CONST_FUN_OBJ_1(neutonml_neuton_set_reset_inputs_obj, neutonml_neuton_obj_set_reset_inputs);
106+
MP_PROPERTY_GETSET(neutonml_neuton_reset_inputs_obj,
107+
(mp_obj_t)&neutonml_neuton_reset_inputs_obj,
108+
(mp_obj_t)&neutonml_neuton_reset_inputs_obj);
109+
110+
STATIC mp_obj_t
111+
neutonml_neuton_obj_get_outputs_count(mp_obj_t self_in) {
112+
return mp_obj_new_int(shared_module_neutonml_neuton_model_outputs_count(self_in));
113+
}
114+
MP_DEFINE_CONST_FUN_OBJ_1(neutonml_neuton_get_outputs_count_obj, neutonml_neuton_obj_get_outputs_count);
115+
MP_PROPERTY_GETTER(neutonml_neuton_outputs_count_obj, (mp_obj_t)&neutonml_neuton_get_outputs_count_obj);
116+
117+
STATIC mp_obj_t
118+
neutonml_neuton_obj_run_inference(mp_obj_t self_in, mp_obj_t index, mp_obj_t outputs) { /*
119+
uint16_t result;
120+
121+
STATIC const mp_rom_map_elem_t inference_locals_dict_table[] = {
122+
{MP_ROM_QSTR(MP_QSTR_result), mp_obj_new_int (result))},
123+
{MP_ROM_QSTR(MP_QSTR_reset_reason), MP_ROM_PTR(&mcu_processor_reset_reason_obj)},
124+
{MP_ROM_QSTR(MP_QSTR_temperature), MP_ROM_PTR(&mcu_processor_temperature_obj)},
125+
{MP_ROM_QSTR(MP_QSTR_uid), MP_ROM_PTR(&mcu_processor_uid_obj)},
126+
{MP_ROM_QSTR(MP_QSTR_voltage), MP_ROM_PTR(&mcu_processor_voltage_obj)},
127+
};
128+
129+
result = shared_module_neutonml_neuton_model_run_inference(self_in, &idx, out);
130+
*/
131+
return mp_const_none;
132+
}
133+
MP_DEFINE_CONST_FUN_OBJ_3(neutonml_neuton_run_inference_obj, neutonml_neuton_obj_run_inference);
134+
135+
STATIC mp_obj_t neutonml_neuton_obj_get_task_type(mp_obj_t self_in) {
136+
return mp_obj_new_int(shared_module_neutonml_neuton_model_task_type(self_in));
137+
}
138+
MP_DEFINE_CONST_FUN_OBJ_1(neutonml_neuton_get_task_type_obj, neutonml_neuton_obj_get_task_type);
139+
MP_PROPERTY_GETTER(neutonml_neuton_task_type_obj, (mp_obj_t)&neutonml_neuton_get_task_type_obj);
140+
141+
STATIC mp_obj_t neutonml_neuton_obj_get_quantization_level(mp_obj_t self_in) {
142+
return mp_obj_new_int(shared_module_neutonml_neuton_model_quantization_level(self_in));
143+
}
144+
MP_DEFINE_CONST_FUN_OBJ_1(neutonml_neuton_get_quantization_level_obj, neutonml_neuton_obj_get_quantization_level);
145+
MP_PROPERTY_GETTER(neutonml_neuton_quantization_level_obj, (mp_obj_t)&neutonml_neuton_get_quantization_level_obj);
146+
147+
STATIC mp_obj_t neutonml_neuton_obj_get_float_calculations(mp_obj_t self_in) {
148+
return mp_obj_new_int(shared_module_neutonml_neuton_model_float_calculations(self_in));
149+
}
150+
MP_DEFINE_CONST_FUN_OBJ_1(neutonml_neuton_get_float_calculations_obj, neutonml_neuton_obj_get_float_calculations);
151+
MP_PROPERTY_GETTER(neutonml_neuton_float_calculations_obj, (mp_obj_t)&neutonml_neuton_get_float_calculations_obj);
152+
153+
STATIC mp_obj_t neutonml_neuton_obj_get_neurons_count(mp_obj_t self_in) {
154+
return mp_obj_new_int(shared_module_neutonml_neuton_model_neurons_count(self_in));
155+
}
156+
MP_DEFINE_CONST_FUN_OBJ_1(neutonml_neuton_get_neurons_count_obj, neutonml_neuton_obj_get_neurons_count);
157+
MP_PROPERTY_GETTER(neutonml_neuton_neurons_count_obj, (mp_obj_t)&neutonml_neuton_get_neurons_count_obj);
158+
159+
STATIC mp_obj_t neutonml_neuton_obj_get_weights_count(mp_obj_t self_in) {
160+
return mp_obj_new_int(shared_module_neutonml_neuton_model_weights_count(self_in));
161+
}
162+
MP_DEFINE_CONST_FUN_OBJ_1(neutonml_neuton_get_weights_count_obj, neutonml_neuton_obj_get_weights_count);
163+
MP_PROPERTY_GETTER(neutonml_neuton_weights_count_obj, (mp_obj_t)&neutonml_neuton_get_weights_count_obj);
164+
165+
STATIC mp_obj_t neutonml_neuton_obj_get_inputs_limits_count(mp_obj_t self_in) {
166+
return mp_obj_new_int(shared_module_neutonml_neuton_model_inputs_limits_count(self_in));
167+
}
168+
MP_DEFINE_CONST_FUN_OBJ_1(neutonml_neuton_get_inputs_limits_count_obj, neutonml_neuton_obj_get_inputs_limits_count);
169+
MP_PROPERTY_GETTER(neutonml_neuton_inputs_limits_count_obj, (mp_obj_t)&neutonml_neuton_get_inputs_limits_count_obj);
170+
171+
STATIC mp_obj_t neutonml_neuton_obj_get_window_size(mp_obj_t self_in) {
172+
return mp_obj_new_int(shared_module_neutonml_neuton_model_window_size(self_in));
173+
}
174+
MP_DEFINE_CONST_FUN_OBJ_1(neutonml_neuton_get_window_size_obj, neutonml_neuton_obj_get_window_size);
175+
MP_PROPERTY_GETTER(neutonml_neuton_window_size_obj, (mp_obj_t)&neutonml_neuton_get_window_size_obj);
176+
177+
STATIC mp_obj_t neutonml_neuton_obj_get_ram_usage(mp_obj_t self_in) {
178+
return mp_obj_new_int(shared_module_neutonml_neuton_model_ram_usage(self_in));
179+
}
180+
MP_DEFINE_CONST_FUN_OBJ_1(neutonml_neuton_get_ram_usage_obj, neutonml_neuton_obj_get_ram_usage);
181+
MP_PROPERTY_GETTER(neutonml_neuton_ram_usage_obj, (mp_obj_t)&neutonml_neuton_get_ram_usage_obj);
182+
183+
STATIC mp_obj_t neutonml_neuton_obj_get_size(mp_obj_t self_in) {
184+
return mp_obj_new_int(shared_module_neutonml_neuton_model_size(self_in));
185+
}
186+
MP_DEFINE_CONST_FUN_OBJ_1(neutonml_neuton_get_size_obj, neutonml_neuton_obj_get_size);
187+
MP_PROPERTY_GETTER(neutonml_neuton_size_obj, (mp_obj_t)&neutonml_neuton_get_size_obj);
188+
189+
STATIC mp_obj_t neutonml_neuton_obj_get_size_with_meta(mp_obj_t self_in) {
190+
return mp_obj_new_int(shared_module_neutonml_neuton_model_size_with_meta(self_in));
191+
}
192+
MP_DEFINE_CONST_FUN_OBJ_1(neutonml_neuton_get_size_with_meta_obj, neutonml_neuton_obj_get_size_with_meta);
193+
MP_PROPERTY_GETTER(neutonml_neuton_size_with_meta_obj, (mp_obj_t)&neutonml_neuton_get_size_with_meta_obj);
194+
195+
STATIC const mp_rom_map_elem_t neutonml_neuton_locals_dict_table[] = {
196+
// Methods
197+
{MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&neutonml_neuton_deinit_obj)},
198+
{MP_ROM_QSTR(MP_QSTR___enter__), MP_ROM_PTR(&default___enter___obj)},
199+
{MP_ROM_QSTR(MP_QSTR___exit__), MP_ROM_PTR(&neutonml_neuton___exit___obj)},
200+
{MP_ROM_QSTR(MP_QSTR_get_inputs_count), MP_ROM_PTR(&neutonml_neuton_get_inputs_count_obj)},
201+
{MP_ROM_QSTR(MP_QSTR_set_inputs), MP_ROM_PTR(&neutonml_neuton_set_inputs_obj)},
202+
{MP_ROM_QSTR(MP_QSTR_set_ready_flag), MP_ROM_PTR(&neutonml_neuton_set_ready_flag_obj)},
203+
{MP_ROM_QSTR(MP_QSTR_reset_inputs), MP_ROM_PTR(&neutonml_neuton_reset_inputs_obj)},
204+
{MP_ROM_QSTR(MP_QSTR_outputs_count), MP_ROM_PTR(&neutonml_neuton_outputs_count_obj)},
205+
{MP_ROM_QSTR(MP_QSTR_inference), MP_ROM_PTR(&neutonml_neuton_run_inference_obj)},
206+
{MP_ROM_QSTR(MP_QSTR_task_type), MP_ROM_PTR(&neutonml_neuton_task_type_obj)},
207+
{MP_ROM_QSTR(MP_QSTR_quantization_level), MP_ROM_PTR(&neutonml_neuton_quantization_level_obj)},
208+
{MP_ROM_QSTR(MP_QSTR_float_calculations), MP_ROM_PTR(&neutonml_neuton_float_calculations_obj)},
209+
{MP_ROM_QSTR(MP_QSTR_neurons_count), MP_ROM_PTR(&neutonml_neuton_neurons_count_obj)},
210+
{MP_ROM_QSTR(MP_QSTR_weights_count), MP_ROM_PTR(&neutonml_neuton_weights_count_obj)},
211+
{MP_ROM_QSTR(MP_QSTR_inputs_limits_count), MP_ROM_PTR(&neutonml_neuton_inputs_limits_count_obj)},
212+
{MP_ROM_QSTR(MP_QSTR_window_size), MP_ROM_PTR(&neutonml_neuton_window_size_obj)},
213+
{MP_ROM_QSTR(MP_QSTR_ram_usage), MP_ROM_PTR(&neutonml_neuton_ram_usage_obj)},
214+
{MP_ROM_QSTR(MP_QSTR_size), MP_ROM_PTR(&neutonml_neuton_size_obj)},
215+
{MP_ROM_QSTR(MP_QSTR_size_with_meta), MP_ROM_PTR(&neutonml_neuton_size_with_meta_obj)},
216+
};
217+
218+
STATIC MP_DEFINE_CONST_DICT(neutonml_neuton_locals_dict, neutonml_neuton_locals_dict_table);
219+
220+
const mp_obj_type_t neutonml_neuton_type = {
221+
{&mp_type_type},
222+
.name = MP_QSTR_Meaning,
223+
.make_new = neutonml_neuton_make_new,
224+
.locals_dict = (mp_obj_dict_t *)&neutonml_neuton_locals_dict,
225+
};

shared-bindings/neutonml/Neuton.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_NEUTONML_NEUTON_H
2+
#define MICROPY_INCLUDED_SHARED_BINDINGS_NEUTONML_NEUTON_H
3+
4+
typedef struct
5+
{
6+
mp_obj_base_t base;
7+
bool deinited;
8+
uint8_t state;
9+
} neutonml_neuton_obj_t;
10+
11+
extern const mp_obj_type_t neutonml_neuton_type;
12+
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_NEUTONML_NEUTON_H

0 commit comments

Comments
 (0)