Hi, This patch removes the constraint whereby the PTX emitted was only for sm_30 GPU's. With this removal, the PTX emitted will be targeted for the current context (attached GPU).
This patch has been applied to gomp-4_0-branch. Thanks, Jim
Index: libgomp/ChangeLog.gomp =================================================================== --- libgomp/ChangeLog.gomp (revision 232139) +++ libgomp/ChangeLog.gomp (revision 232142) @@ -1,5 +1,10 @@ 2016-01-07 James Norris <jnor...@codesourcery.com> + Alexander Monakov <amona...@ispras.ru> + * plugin/plugin-nvptx.c (link_ptx): Remove link option. + +2016-01-07 James Norris <jnor...@codesourcery.com> + * testsuite/libgomp.oacc-c-c++-common/declare-4.c: Fix test. 2016-01-06 Cesar Philippidis <ce...@codesourcery.com> Index: libgomp/plugin/plugin-nvptx.c =================================================================== --- libgomp/plugin/plugin-nvptx.c (revision 232139) +++ libgomp/plugin/plugin-nvptx.c (revision 232142) @@ -693,8 +693,8 @@ link_ptx (CUmodule *module, const struct targ_ptx_obj *ptx_objs, unsigned num_objs) { - CUjit_option opts[7]; - void *optvals[7]; + CUjit_option opts[6]; + void *optvals[6]; float elapsed = 0.0; #define LOGSIZE 8192 char elog[LOGSIZE]; @@ -723,10 +723,7 @@ opts[5] = CU_JIT_LOG_VERBOSE; optvals[5] = (void *) 1; - opts[6] = CU_JIT_TARGET; - optvals[6] = (void *) CU_TARGET_COMPUTE_30; - - r = cuLinkCreate (7, opts, optvals, &linkstate); + r = cuLinkCreate (6, opts, optvals, &linkstate); if (r != CUDA_SUCCESS) GOMP_PLUGIN_fatal ("cuLinkCreate error: %s", cuda_error (r));