Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache Simulator Speedup Improvements: Elements per Iteration assumption? #138

Open
lukastruemper opened this issue Feb 27, 2022 · 4 comments

Comments

@lukastruemper
Copy link
Contributor

lukastruemper commented Feb 27, 2022

Hello,

I am applying your nice tool to typical stencil applications and I am observing very long simulation runtimes on high-dimensional stencils (several orders of magnitude longer than execution time). Most of the time is spent in the "warmup phase" and I am wondering about this:

warmup_increment = ceildiv(max_cache_size // element_size, max_steps // 2)

Does it assume that only one element is loaded/stored to the cache per iteration? On higher-dimensional stencils, I easily read 100-1000 elements per iteration.

So could something like this be used instead of element_size:

sympy.Integer(self.kernel.bytes_per_iteration))

, but estimated on read elements per iteration? If this leads to inaccuracy, would this still be reasonably accurate?

I would have researched this in the related publications, but I couldn't find those details.

Thanks in advance!

@lukastruemper
Copy link
Contributor Author

@cod3monk do you have some time to discuss speed improvements / approximations?

@TomTheBear
Copy link
Member

Sorry for the delay. We have a meeting with cod3monk next week and come back to you afterwards.

@cod3monk
Copy link
Member

Hi @lukastruemper,

sorry for the long delay and thanks for getting in touch with us.

The warmup-phase should be limited by invalid_entries > 0 (becoming 0 when the cache is fully initialized, indirectly taking the number of accessed elements into account). You can try decreasing warmup_increment, but I wouldn't expect much improvement. A more likely target for improvements would be the subsequently called functions:

@TomTheBear and @JanLJL will be in touch with you, on how to proceed.

@lukastruemper
Copy link
Contributor Author

All right, thanks for the detailed reply! I'll talk to them :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants