Move most debug printing in rtl.cpp behind DP() macro
Adjust the print output for gpu arch mismatch when the architectures match
Convert an assert into graceful failure
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
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>
openmp/libomptarget/plugins/amdgpu/src/rtl.cpp | ||
---|---|---|
1498 | 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. |
openmp/libomptarget/plugins/amdgpu/src/rtl.cpp | ||
---|---|---|
290 | Changed a couple of integer prints to the string format in passing |
openmp/libomptarget/plugins/amdgpu/src/rtl.cpp | ||
---|---|---|
1500 | could we retain fprintf for the if part if this code, it is helpful to users when they miscompile one arch and run on another. | |
1900–1908 | could we keep all the fprintf's under runtime control of STARTUP_DEBUG ,its helpful to turn this on separately then all the DP traces, |
openmp/libomptarget/plugins/amdgpu/src/rtl.cpp | ||
---|---|---|
1900–1908 | I can make my peace with that as it's still behind an environment variable. Will wait to see if anyone else comments. |
If I understand correctly this is no problem for aomp as the DP-wrapped prints can be enabled by default, therefore landing as is. Probably more iteration needed on these print messages and those elsewhere in the library.
Changed a couple of integer prints to the string format in passing