Hello friends in the community, I tried to convert a custom model into a Hef model, but encountered the following problem while compiling the Hef model:
[error] Mapping Failed (allocation time: 2m 52s)
Compiler could not find a valid partition to contexts. Most commom error is: Automri finished with too many resources on context_4 with 11/68 failures.
[error] Failed to produce compiled graph
[error] BackendAllocatorException: Compilation failed: Compiler could not find a valid partition to contexts. Most commom error is: Automri finished with too many resources on context_4 with 11/68 failures.
If anyone can help me answer, I would be extremely grateful.
I understand you’re encountering resource allocation challenges during the partitioning phase, particularly with context_4 exceeding the available hardware resources.
While I can provide some general steps that often help resolve resource allocation challenges during compilation, to give you the most accurate and focused assistance, it would be really helpful if you could share:
In the meantime, here are some common approaches that might help:
Optimize Your Model
Start by simplifying your model structure:
# Key optimization areas:
- Reduce layer complexity or use smaller kernel sizes
- Lower the number of channels in MAC-heavy layers
- Consider reducing input resolution
- Ensure full int8 quantization
Try enabling streaming to process larger layers in chunks:
Thank you for your patient answer. My information is all on the server, but I accidentally didn’t save it. Many of my information and models are gone. Currently, I don’t have hardware, just a native test. I want to know why there is such a problem in context 4.
Thank you, omria, I have already sent you a private message and attached the model address. Thank you again for your patient response.
Best regards,
niyu6