Skip to content

Commit

Permalink
add ret on init
Browse files Browse the repository at this point in the history
  • Loading branch information
zylo117 committed Dec 26, 2024
1 parent 1d9fa32 commit 8e1ead9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion axengine/axcl_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def _free_io(self, io_data):
def _init(self, device_id=0, vnpu=VNPUType.DISABLED): # vnpu type, the default is disabled
ret = self._rt_lib.axclInit([])
if ret != 0:
raise RuntimeError("Failed to initialize runtime.")
raise RuntimeError(f"Failed to initialize runtime. {ret}.")

lst = self._rt_ffi.new("axclrtDeviceList *")
ret = self._rt_lib.axclrtGetDeviceList(lst)
Expand Down

0 comments on commit 8e1ead9

Please sign in to comment.