These are chat archives for halide/Halide

Nov 2018
Nikita Glukhov
Nov 11 2018 12:37
Hi, guys! I still can't figure it out how to profile generators. In my case profiling works only in a jit-compile scenario. If I manually run:
%name% -g %name% -f %name% -x .s=.s.txt,.cpp=.generated.cpp target=host-profile-no_runtime auto_schedule=false
then as a result halide_profiler_set_current_func() and others are inside generated lib, but nothing happens at program run stage. If I trying adding target=profile to the generator which creates halide_rt_host.lib too, this will lead to linking errors.
Nikita Glukhov
Nov 11 2018 13:28

I was able to finally find a solution by myself. I removed no_runtime from the generator line. And added the following code to the application:

  static void *const user_context = nullptr;

If this is a standard solution, then maybe it's worth adding this to tutorials.