[Openmp-commits] [PATCH] D106751: [OpenMP][Libomptarget] Adding `print_device_info` to RTL and `omptarget`
Jon Chesterfield via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Sat Jul 24 11:32:45 PDT 2021
JonChesterfield added a comment.
Not obvious to me that the functionality has much to do with the plugin. Could do a standalone tool instead?
I think there's a tool called nvidia-smi that does something similar. There's definitely one called rocminfo that does. The latter prints 'human readable' output, which gets in the way of scripting with it.
================
Comment at: openmp/libomptarget/plugins/cuda/src/rtl.cpp:1339
+
+void __tgt_rtl_print_device_info(int32_t device_id) {
+ assert(DeviceRTL.isValidDeviceId(device_id) && "device_id is invalid");
----------------
Verbose. Can probably format as a table containing the cuda API call, the text to print, possibly the corresponding HSA API call, then iterate over that table printing / building json etc
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