This patch adds support for using function tracing features to track the
executino of runtime functions in the device runtime library. This is
enabled by first compiling the new runtime with
-fopenmp-target-debug=3 and running with
LIBOMPTARGET_DEVICE_RTL_DEBUG=3. The output only tracks team 0 and
thread 0 so there isn't much output when using a generic region.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
The output only tracks team 0 and thread 0 so there isn't much output when using a generic region.
We could even expose this via the device_environment to the user as a runtime choice (env vars).
In case this is not eliminated at compile time it's costly either way.
openmp/libomptarget/DeviceRTL/src/Debug.cpp | ||
---|---|---|
48 | make it omp_get_thread_num though, and omp_get_team_num |
Changing the interface to use the OpenMP standard functions for getting thread
numbers and team numbers. This in theory will allow the implementation to more
generally follow the thread doing the actual execution. The implementation of
these on the device are not currently correct however, so this won't work as
intended until omp_get_thread_num() is fixed on the device.
Changing back to use the mapping functions, can be fixed later once there's a
better interface to getting the effective initial thread in generic and SPMD
regions from any arbitrary location.
make it omp_get_thread_num though, and omp_get_team_num