I am using the Metis M.2 Card on my host PC. It is detected using `lspci` and `axdevice`. I am able to run inference using `./inference.py yolov5m-v7-coco-tracker usb:0`. However when I try to use the AxRuntime API (Python) I get the following:
from axelera.runtime import Context,
context = Context()
model_path = "/home/user/axelera/testing/data/yolov5/compile/compiled_model/model.json"
model = context.load_model(model_path)
batch_size = 1
connection = context.device_connect(None, batch_size)
instance = connection.load_model_instance(model, num_sub_devices=batch_size, aipu_cores=batch_size)
>ERROR]]axeDeviceMemoryAllocate]: Not enough memory: free memory 1531904, request memory 16520704.
>ERROR]]axeDeviceMemAlloc]: Device memory allocate failed: size 16520704.
>ERROR]]axeMemAllocDevice]: Device memory allocate failed: 0x70010001.
Error at zeMemAllocDevice(context, &desc, size, alignment, device, &addr): mem_alloc_device: 249: Exit with error code: 0x70010001 : ZE_RESULT_ERROR_NOT_AVAILABLE
Failed to allocate memory poolpool_l2_const
Failed to initialise memory pool pool_l2_const
Failed to initialize V1Executor
---------------------------------------------------------------------------
InternalError Traceback (most recent call last)
Cell Inn7], line 1
----> 1 instance = connection.load_model_instance(model, num_sub_devices=batch_size, aipu_cores=batch_size)
File ~/.cache/axelera/venvs/3252ae77/lib/python3.10/site-packages/axelera/runtime/objects.py:496, in Connection.load_model_instance(self, model, **kwargs)
494 instance = axr.load_model_instance(self._obj, model._obj, props)
495 if not instance:
--> 496 _raise_error(self.context)
497 return ModelInstance(instance, self.context)
File ~/.cache/axelera/venvs/3252ae77/lib/python3.10/site-packages/axelera/runtime/objects.py:83, in _raise_error(ctx, err_no)
81 msg = axr.last_error_string(pctx).decode("utf-8")
82 exc = _exceptions.get(err_no, _exceptionssaxr.Result.UNKNOWN_ERROR])
---> 83 raise exc(f"{err}: {msg}")
InternalError: AXR_ERROR_INTERNAL_ERROR: Error at zeMemAllocDevice(context, &desc, size, alignment, device, &addr): mem_alloc_device: 249: Exit with error code: 0x70010001 : ZE_RESULT_ERROR_NOT_AVAILABLE
What is happening here and how do I solve it?
(Rebooting system or using `axdevice --refresh` does not seem to help)