Skip to content

Commit

Permalink
fix cffi life cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
kalcohol committed Feb 8, 2025
1 parent ce0f2e2 commit 3dd8d86
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions axengine/_axe.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,14 @@ def __init__(
self._cmm_token = engine_cffi.new("AX_S8[]", b"PyEngine")
self._io[0].nInputSize = len(self.get_inputs())
self._io[0].nOutputSize = len(self.get_outputs())
self._io[0].pInputs = engine_cffi.new(
_inputs= engine_cffi.new(
"AX_ENGINE_IO_BUFFER_T[{}]".format(self._io[0].nInputSize)
)
self._io[0].pOutputs = engine_cffi.new(
self._io[0].pInputs = _inputs
_outputs = engine_cffi.new(
"AX_ENGINE_IO_BUFFER_T[{}]".format(self._io[0].nOutputSize)
)
self._io[0].pOutputs = _outputs
for i in range(len(self.get_inputs())):
max_buf = 0
for j in range(self._shape_count):
Expand Down

0 comments on commit 3dd8d86

Please sign in to comment.