Halide icon indicating copy to clipboard operation
Halide copied to clipboard

Profiler shows MemoryType::Stack allocations as heap allocations

Open dsharletg opened this issue 6 years ago • 3 comments

dsharletg avatar Mar 25 '19 04:03 dsharletg

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()?

steven-johnson avatar Mar 25 '19 22:03 steven-johnson

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

dsharletg avatar Mar 25 '19 22:03 dsharletg

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.

mcourteaux avatar Mar 06 '24 11:03 mcourteaux