@@ -89,6 +89,7 @@ with `-g` for full debug information. A full list of flags supported by
8989 * Dump the contents of the device pointer map at kernel exit: ``0x04 ``
9090 * Indicate when an entry is changed in the device mapping table: ``0x08 ``
9191 * Print OpenMP kernel information from device plugins: ``0x10 ``
92+ * Indicate when data is copied to and from the device: ``0x20 ``
9293
9394Any combination of these flags can be used by setting the appropriate bits. For
9495example, to enable printing all data active in an OpenMP target region along
@@ -137,44 +138,53 @@ provide the following output from the runtime library.
137138
138139 .. code-block :: text
139140
140- Info: Device supports up to 65536 CUDA blocks and 1024 threads with a warp size of 32
141141 Info: Entering OpenMP data region at zaxpy.cpp:14:1 with 2 arguments:
142- Info: to(X[0:N])[16384]
143- Info: tofrom(Y[0:N])[16384]
144- Info: Creating new map entry with HstPtrBegin=0x00007fff963f4000,
145- TgtPtrBegin=0x00007fff963f4000, Size=16384, Name=X[0:N]
146- Info: Creating new map entry with HstPtrBegin=0x00007fff963f8000,
147- TgtPtrBegin=0x00007fff963f00000, Size=16384, Name=Y[0:N]
142+ Info: to(X[0:N])[16384]
143+ Info: tofrom(Y[0:N])[16384]
144+ Info: Creating new map entry with HstPtrBegin=0x00007ffde9e99000,
145+ TgtPtrBegin=0x00007f15dc600000, Size=16384, Name=X[0:N]
146+ Info: Copying data from host to device, HstPtr=0x00007ffde9e99000,
147+ TgtPtr=0x00007f15dc600000, Size=16384, Name=X[0:N]
148+ Info: Creating new map entry with HstPtrBegin=0x00007ffde9e95000,
149+ TgtPtrBegin=0x00007f15dc604000, Size=16384, Name=Y[0:N]
150+ Info: Copying data from host to device, HstPtr=0x00007ffde9e95000,
151+ TgtPtr=0x00007f15dc604000, Size=16384, Name=Y[0:N]
148152 Info: OpenMP Host-Device pointer mappings after block at zaxpy.cpp:14:1:
149153 Info: Host Ptr Target Ptr Size (B) RefCount Declaration
150- Info: 0x00007fff963f4000 0x00007fd225004000 16384 1 Y[0:N] at zaxpy.cpp:13:17
151- Info: 0x00007fff963f8000 0x00007fd225000000 16384 1 X[0:N] at zaxpy.cpp:13:11
154+ Info: 0x00007ffde9e95000 0x00007f15dc604000 16384 1 Y[0:N] at zaxpy.cpp:13:17
155+ Info: 0x00007ffde9e99000 0x00007f15dc600000 16384 1 X[0:N] at zaxpy.cpp:13:11
152156 Info: Entering OpenMP kernel at zaxpy.cpp:6:1 with 4 arguments:
153157 Info: firstprivate(N)[8] (implicit)
154158 Info: use_address(Y)[0] (implicit)
155159 Info: tofrom(D)[16] (implicit)
156160 Info: use_address(X)[0] (implicit)
157- Info: Mapping exists (implicit) with HstPtrBegin=0x00007ffe37d8be80,
158- TgtPtrBegin=0x00007f90ff004000, Size=0, updated RefCount=2, Name=Y
159- Info: Creating new map entry with HstPtrBegin=0x00007fff963f33ff0,
160- TgtPtrBegin=0x00007fd225003ff0, Size=16, Name=D
161- Info: Mapping exists (implicit) with HstPtrBegin=0x00007ffe37d8fe80,
162- TgtPtrBegin=0x00007f90ff000000, Size=0, updated RefCount=2, Name=X
163- Info: Launching kernel __omp_offloading_fd02_c2c4ac1a__Z5daxpyPNSt3__17complexIdEES2_S1_m_l6
161+ Info: Mapping exists (implicit) with HstPtrBegin=0x00007ffde9e95000,
162+ TgtPtrBegin=0x00007f15dc604000, Size=0, updated RefCount=2, Name=Y
163+ Info: Creating new map entry with HstPtrBegin=0x00007ffde9e94fb0,
164+ TgtPtrBegin=0x00007f15dc608000, Size=16, Name=D
165+ Info: Copying data from host to device, HstPtr=0x00007ffde9e94fb0,
166+ TgtPtr=0x00007f15dc608000, Size=16, Name=D
167+ Info: Mapping exists (implicit) with HstPtrBegin=0x00007ffde9e99000,
168+ TgtPtrBegin=0x00007f15dc600000, Size=0, updated RefCount=2, Name=X
169+ Info: Launching kernel __omp_offloading_fd02_e25f6e76__Z5zaxpyPSt7complexIdES1_S0_m_l6
164170 with 8 blocks and 128 threads in SPMD mode
165- Info: Removing map entry with HstPtrBegin=0x00007fff963f33ff0,
166- TgtPtrBegin=0x00007fd225003ff0, Size=16, Name=D
171+ Info: Copying data from device to host, TgtPtr=0x00007f15dc608000,
172+ HstPtr=0x00007ffde9e94fb0, Size=16, Name=D
173+ Info: Removing map entry with HstPtrBegin=0x00007ffde9e94fb0,
174+ TgtPtrBegin=0x00007f15dc608000, Size=16, Name=D
167175 Info: OpenMP Host-Device pointer mappings after block at zaxpy.cpp:6:1:
168176 Info: Host Ptr Target Ptr Size (B) RefCount Declaration
169- Info: 0x00007fff963f4000 0x00007fd225004000 16384 1 Y[0:N] at zaxpy.cpp:13:17
170- Info: 0x00007fff963f8000 0x00007fd225000000 16384 1 X[0:N] at zaxpy.cpp:13:11
177+ Info: 0x00007ffde9e95000 0x00007f15dc604000 16384 1 Y[0:N] at zaxpy.cpp:13:17
178+ Info: 0x00007ffde9e99000 0x00007f15dc600000 16384 1 X[0:N] at zaxpy.cpp:13:11
171179 Info: Exiting OpenMP data region at zaxpy.cpp:14:1 with 2 arguments:
172- Info: to(X[0:N])[16384]
173- Info: tofrom(Y[0:N])[16384]
174- Info: Removing map entry with HstPtrBegin=0x00007fff963f4000,
175- TgtPtrBegin=0x00007fff963f4000, Size=16384, Name=X[0:N]
176- Info: Removing map entry with HstPtrBegin=0x00007fff963f8000,
177- TgtPtrBegin=0x00007fff963f00000, Size=16384, Name=Y[0:N]
180+ Info: to(X[0:N])[16384]
181+ Info: tofrom(Y[0:N])[16384]
182+ Info: Copying data from device to host, TgtPtr=0x00007f15dc604000,
183+ HstPtr=0x00007ffde9e95000, Size=16384, Name=Y[0:N]
184+ Info: Removing map entry with HstPtrBegin=0x00007ffde9e95000,
185+ TgtPtrBegin=0x00007f15dc604000, Size=16384, Name=Y[0:N]
186+ Info: Removing map entry with HstPtrBegin=0x00007ffde9e99000,
187+ TgtPtrBegin=0x00007f15dc600000, Size=16384, Name=X[0:N]
178188
179189 From this information, we can see the OpenMP kernel being launched on the CUDA
180190device with enough threads and blocks for all ``1024 `` iterations of the loop in
0 commit comments