[Openmp-commits] [PATCH] D106751: [OpenMP][Libomptarget] Adding `print_device_info` to RTL and `omptarget`

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sun Jul 25 12:52:22 PDT 2021


jdoerfert added a comment.

In D106751#2903161 <https://reviews.llvm.org/D106751#2903161>, @JonChesterfield wrote:

> If it's for debugging openmp, we should do the cuda queries once and store their result, then use that result in printing and elsewhere. Otherwise there's a risk that the value printed is different to the one used, or that an error will prevent the other queries working in the print when they're done later.

That doesn't make as much sense as you think. Most of the values are not actually "used" anywhere. Some that are might be overwritten per target region now or in the future. All in all, there is little reason to cache stuff, if you want to know cuda values, ask cuda, (or HSA, ...). If we cache stuff there is more risk and complexity for no gain.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106751/new/

https://reviews.llvm.org/D106751



More information about the Openmp-commits mailing list