|
From: Guido R. <gui...@gm...> - 2020-11-06 10:06:26
|
Hello, I am implementing a neural network using GLOW ( https://github.com/pytorch/glow) Glow provides you a model in object form (no source is available) that you need to link into your program, feed input and retrieve output. I tested the model on a x86 linux machine and profiled it with callgrind it worked perfectly. Now I would like to perform the same test on the embedded platform that is the real target of my work: this is a arm-m7 that runs freertos I ported gprof to freertos and I obtained good results: I would like to do the same with callgrind to have a second opinion. My question are: 1) How does callgrind work: How does it intercept the execution of a routine? Is it the same as gprof with program counter sampling? 2) Would this port be feasible at all on freertos ? 3) if it is, would you be interested in the porting if I got it working? Thanks for the patience in advance Keep up the excellent work Best Regards Guido |
|
From: Paul F. <pj...@wa...> - 2020-11-06 11:48:17
|
On 11/6/20 11:05 AM, Guido Roncarolo wrote: > Hello, > > I am implementing a neural network using GLOW > (https://github.com/pytorch/glow <https://github.com/pytorch/glow>) > > Glow provides you a model in object form (no source is available) > that you need to link into your program, feed input and retrieve output. > > I tested the model on a x86 linux machine and profiled it with callgrind > it worked perfectly. > > Now I would like to perform the same test on the embedded platform > that is the real target of my work: this is a arm-m7 that runs freertos > > I ported gprof to freertos and I obtained good results: I would like > to do the same with callgrind to have a second opinion. > > My question are: > 1) How does callgrind work: How does it intercept the execution of a > routine? > Is it the same as gprof with program counter sampling? No. Valgrind performs CPU and process virtualization. Machine code gets JIT compiled to VEX, the Valgrind synthetic VM. In turn, VEX can be instrumented by the various tools, allowing things like instruction retirement counts and function call counts. > 2) Would this port be feasible at all on freertos ? Is freertos a (very) Unix-like OS? If so, maybe, but a port would be a substantial amount of work. A+ Paul |
|
From: John R. <jr...@bi...> - 2020-11-06 14:08:49
|
> I tested the model on a x86 linux machine and profiled it with callgrind > it worked perfectly. > > Now I would like to perform the same test on the embedded platform that is the real target of my work: this is a arm-m7 that runs freertos Don't bother. Instead run callgrind on a RaspberryPi running Linux. The results will match within a couple percent. (Callgrind, like any valgrind tool, covers only code that runs in user mode. Each valgrind tool runs only one thread at a time. What you measure is the algorithms used by the source code, and the goodness of the compiler.) The results also will match within a couple percent of x86 Linux. Porting valgrind to freertos will take several months. |
|
From: Guido R. <gui...@gm...> - 2020-11-16 07:28:31
|
Thanks so much for your answers! And thanks again for the superlative project regards guido On Fri, Nov 6, 2020 at 3:09 PM John Reiser <jr...@bi...> wrote: > > > I tested the model on a x86 linux machine and profiled it with callgrind > > it worked perfectly. > > > > Now I would like to perform the same test on the embedded platform that is the real target of my work: this is a arm-m7 that runs freertos > > Don't bother. Instead run callgrind on a RaspberryPi running Linux. > The results will match within a couple percent. > (Callgrind, like any valgrind tool, covers only code that runs in user mode. > Each valgrind tool runs only one thread at a time. What you measure > is the algorithms used by the source code, and the goodness of the compiler.) > The results also will match within a couple percent of x86 Linux. > Porting valgrind to freertos will take several months. > > > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers |