[Openmp-commits] [PATCH] D108562: [libomptarget][amdgpu] Refactor debug printing

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Aug 23 08:58:43 PDT 2021


JonChesterfield added a comment.
Herald added a subscriber: sstefan1.

Converted fprintf and printf to DP. Left one fprintf in place because it chooses at runtime whether to write to stdout or stderr and this change was mostly interested in dropping the error messages of the format:

`Possible gpu arch mismatch: device: gfx906, image:gfx906 please check compiler flag: -march=<gpu>`



================
Comment at: openmp/libomptarget/plugins/amdgpu/src/rtl.cpp:1497
+      const char *ElfName = get_elf_mach_gfx_name(elf_e_flags(image));
+
+      if (strcmp(DeviceName, ElfName) != 0) {
----------------
Primary change is here. This is a relatively common error message and it looks bad when the two strings it claims are likely to be different are identical.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108562



More information about the Openmp-commits mailing list