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

Logging variable values outside of valid ranges in GPU kernels #234

Open
charleskawczynski opened this issue Sep 21, 2023 · 1 comment
Open
Labels
enhancement New feature or request GPU

Comments

@charleskawczynski
Copy link
Member

We need a way to log (exactly once) variable values found outside of their valid ranges, and this needs to be GPU compatible. Right now, we don't print anything, although we could print using KernelAbstractions (here). However, this is will bloat the log and is not really helpful.

Over-arching issue here

@trontrytel
Copy link
Member

Going to paste my notes here and use the issue to track things :)

Think if we can use any of the ideas here:

to be able to preserve information on when the model is trying to call parameterizations outside of their allowed range. We can't throw warnings on GPUs. Plus, polluting the screen with massive numbers of warnings is not useful in a big simulation anyway.

Maybe instead we could create some sort of a log file with information on:

  • what function was attempted to be called outside of the allowed range
  • how many times
  • with verbose option to also save the inputs?

The only thing is that CM.jl is just a library of functions. So such a thing might need to be implemented on the side of the model that is using it? Or would we still need to provide a logger inside CM.jl?

The list of functions we would need it for (we might need to add one or two more):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request GPU
Projects
None yet
Development

No branches or pull requests

2 participants