public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, 0/4] Handle GOMP_OPENACC_NVPTX_{DISASM,SAVE_TEMPS,JIT} in libgomp nvptx plugin
@ 2017-06-26 11:24 Tom de Vries
  2017-06-26 11:32 ` [PATCH, 1/4] Show value of GOMP_OPENACC_DIM " Tom de Vries
                   ` (5 more replies)
  0 siblings, 6 replies; 31+ messages in thread
From: Tom de Vries @ 2017-06-26 11:24 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: GCC Patches, Thomas Schwinge

Hi,

I've written a patch series to facilitate debugging libgomp openacc 
testcase failures on the nvptx accelerator.


When running an openacc test-case on an nvptx accelerator, the following 
happens:
- the plugin obtains the ptx assembly for the acceleration kernels
- it calls the cuda jit to compile and link the ptx into a module
- it loads the module
- it starts an acceleration kernel

The patch series adds these environment variables:
- GOMP_OPENACC_NVPTX_SAVE_TEMPS: a means to save the resulting module
   such that it can be investigated using nvdisasm and cuobjdump.
- GOMP_OPENACC_NVPTX_DISASM: a means to see the resulting module in
   the debug output,  by writing it into a file and calling nvdisasm on
   it
- GOMP_OPENACC_NVPTX_JIT: a means to set parameters of the
   compilation/linking process, currently supporting:
   * -O[0-4], mapping onto CU_JIT_OPTIMIZATION_LEVEL
   * -ori, mapping onto CU_JIT_NEW_SM3X_OPT


The patch series consists of these patches:

1. Show value of GOMP_OPENACC_DIM in libgomp nvptx plugin
2. Handle GOMP_OPENACC_NVPTX_{DISASM,SAVE_TEMPS} in libgomp nvptx plugin
3. Handle GOMP_OPENACC_NVPTX_JIT=-O[0-4] in libgomp nvptx plugin
4. Handle GOMP_OPENACC_NVPTX_JIT=-ori in libgomp nvptx plugin


I've tested the patch series on top of gomp-4_0-branch, by running an 
openacc testcase from the command line and defining the various 
environment variables.

[ A relevant difference between gomp-4_0-branch and master is that:
- master defines and includes ./libgomp/plugin/cuda/cuda.h, so I had to
   add the CU_JIT constants there, while
- gomp-4_0-branch doesn't define that local minimal cuda.h file but
   includes cuda's cuda.h. My setup linked against cuda 6.5 which defines
   CU_JIT_OPTIMIZATION_LEVEL but not yet CU_JIT_NEW_SM3X_OPT (that seems
   to have been introduced at cuda 8.0), so I had to hardcode the latter.
]


OK for trunk if bootstrap and reg-test on x86_64 with nvidia accelerator 
succeeds?

Thanks,
- Tom

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2017-11-21 23:25 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-26 11:24 [PATCH, 0/4] Handle GOMP_OPENACC_NVPTX_{DISASM,SAVE_TEMPS,JIT} in libgomp nvptx plugin Tom de Vries
2017-06-26 11:32 ` [PATCH, 1/4] Show value of GOMP_OPENACC_DIM " Tom de Vries
2017-06-27 16:44   ` Tom de Vries
2017-06-26 11:39 ` [PATCH, 2/4] Handle GOMP_OPENACC_NVPTX_{DISASM,SAVE_TEMPS} " Tom de Vries
2017-06-26 15:27   ` Joseph Myers
2017-06-26 15:29     ` Jakub Jelinek
2017-06-27  7:18       ` [PATCH] Use secure_getenv for GOMP_DEBUG Tom de Vries
2017-06-27  7:38         ` Jakub Jelinek
2017-06-27 11:10           ` Tom de Vries
2017-06-27 11:21             ` Jakub Jelinek
2017-07-03 12:26             ` Franz Sirl
2017-07-03 13:42               ` Tom de Vries
2017-06-27 12:19       ` [PATCH, 2/4] Handle GOMP_OPENACC_NVPTX_{DISASM,SAVE_TEMPS} in libgomp nvptx plugin Tom de Vries
2017-07-03 14:08       ` Thomas Schwinge
2017-07-03 14:18         ` Jakub Jelinek
2017-07-03 14:24         ` Tom de Vries
2017-07-04 10:06           ` Tom de Vries
2017-07-04 10:16             ` [PATCH, 1/3] Handle GOMP_NVPTX_{DISASM,SAVE_TEMPS} " Tom de Vries
2017-07-04 10:19             ` [PATCH, 2/3] Handle GOMP_NVPTX_PTXRW " Tom de Vries
2017-07-04 10:23             ` [PATCH, 3/3] Handle GOMP_NVPTX_JIT={-O[0-4],-ori,-arch=<n>} " Tom de Vries
2017-08-29  9:02               ` [PING] " Tom de Vries
2017-11-07 14:54             ` [PATCH, 2/4] Handle GOMP_OPENACC_NVPTX_{DISASM,SAVE_TEMPS} " Cesar Philippidis
2017-11-07 15:31               ` Jakub Jelinek
2017-11-22  0:19                 ` [PATCH] Handle GOMP_NVPTX_PTXRW " Tom de Vries
2017-06-26 11:42 ` [PATCH, 0/4] Handle GOMP_OPENACC_NVPTX_{DISASM,SAVE_TEMPS,JIT} " Tom de Vries
2017-06-26 11:48   ` [PATCH, 3/4] Handle GOMP_OPENACC_NVPTX_JIT=-O[0-4] " Tom de Vries
2017-06-26 11:44 ` [PATCH, 4/4] Handle GOMP_OPENACC_NVPTX_JIT=-ori " Tom de Vries
2017-06-30 15:49   ` Tom de Vries
2017-06-27  9:17 ` [PATCH, 5/4] Handle GOMP_OPENACC_NVPTX_PTXRW " Tom de Vries
2017-06-30 15:59   ` Tom de Vries
2017-06-30 16:06 ` [PATCH, 6/4] Handle GOMP_OPENACC_NVPTX_JIT=-arch=<n> " Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).