I have some questions/statements regarding xcore.ai and its programming:
- Some notes and questions on your AIoT_sdk. You have a "bug" in the mobilenet example: I got an error on the line "socket bind error" when doing xrun, due to the xscope which is used to send images to the board from the computer. In the same example there is something wrong in the makefile and how the inference_engine is built/linked (added as static library). If I keep the code identical except the the makefile - changed to mostly similar to cifar10 example's one - I got 8ms of inference, otherwise I got 1.5sec. I guess that is due to the inference_engine and how is built in mobilenet example. By the way, your off-the-shelf mobilenet example runs in 3sec, which is quite high. While cifar one in 6ms, which is correct, accordingly to how fast you claim your board is.
- It seems that is not possible to spawn the inferenc process to 2 tiles, it just replicates the process, isn't it?
- I have understood that the parallelization is not possible to change at runtime (true?). Is there a way to completely stall the cores that are not needed in a certain stage? Therefore, not just using a timer that shifts step-wise the activities in the select{}: from a dummy task - but still active/consuming - to the true activity.
- When I try to set the task to just one core (ie: on tile[0].core[0]) it gives me an error like "statement placed on a core must be call to combinable function". Any idea/any suggestion where to look at? (code below)
Code: Select all
#include <platform.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <xscope.h>
#include <stdint.h>
#include <timer.h>
extern "C" {
void init_rt();
void infer_rt();
}
void task1() {
timer t;
uint32_t time;
uint8_t flag = 0;
const uint32_t period = 100000; // 1s?
t :> time;
while (1) {
select {
case t when timerafter (time) :> void:
if (flag == 0){
init_rt();
flag++;
}
else infer_rt();
time += period;
break;
default:
break;
}
}
}
int main(void) {
par {
on tile[0].core[0]: task1();
}
return 0;
}