[WIP] fix model loading alignement issues on k210
You should align the model with the minimal alignment (K210 is 256) instead of read_unaligned in interpreter.initialize.
I dont see any method called interpreter::initialize. Maybe you mean interpreter::load_model or runtime_module::initialize ? And which buffer should be aligned ?
I checked that the buffer from interpreter::load_model is indeed aligned on a 256 boundary :
buffer's addr 0x801af800
But that is not the problem. The actual problem occurs in k210_runtime_module::visit(const kpu_conv2d_options), where op.activation.start isnt a multiple of 256.
op.activation.start = 560
op.activation.memory_location = 2
This makes the following check fail
CHECK_WITH_ERR(layer.kernel_calc_type_cfg.data.active_addr % 256 == 0, std::errc::invalid_argument);
I dont see any method called interpreter::initialize. Maybe you mean interpreter::load_model or runtime_module::initialize ? And which buffer should be aligned ?
the buffer you passed to interpreter::load_model should be aligned. so read_unaligend is not needed.
Sorry, I think we need to close this pr as it's not valid anymore. Thank you for your contribution.