halide / Halide

a language for fast, portable data-parallel computation
https://halide-lang.org
Other
5.89k stars 1.07k forks source link

Profiler shows MemoryType::Stack allocations as heap allocations #3758

Open dsharletg opened 5 years ago

steven-johnson commented 5 years ago

Looking at Profiling.cpp, looks like the code doesn't look at MemoryType at all -- it just decides that things under a certain size are on stack, over that size are on heap. Did it never get updated when we added store_in()?

dsharletg commented 5 years ago

Yes, that's the problem. I locally hacked in a fix when I reported this, but handling this (more) correctly is a bit tricky.

mcourteaux commented 8 months ago

I don't think this is still happening.

https://github.com/halide/Halide/blob/10e07e647ccc9b1d0e0523b8c110f40722fc7525/src/Profiling.cpp#L213-L222

Seems to implement a check to not instrument stack allocations.