diff options
author | amonakov <amonakov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-11 12:55:31 +0000 |
---|---|---|
committer | amonakov <amonakov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-11 12:55:31 +0000 |
commit | d6be803f5dd491ddc507bdb1223433d7e1ebd67a (patch) | |
tree | 9e5efed6bfd5c03b33fb3b973ab51fdeae168032 /libgomp/plugin | |
parent | 1ef0270e330da4938f5cb3371a45f2fb528eb4c4 (diff) | |
download | gcc-d6be803f5dd491ddc507bdb1223433d7e1ebd67a.tar.gz |
nvptx plugin: do not force JIT target SM version
When link_ptx runs, a CUDA device is already bound to current thread, so the
driver library knows the target architecture. There isn't any benefit from
forcing a specific target here; on the contrary, hardcoding sm_30 breaks
offloading on later (Maxwell, sm_5x) devices.
* plugin/plugin-nvptx.c (link_ptx): Do not set CU_JIT_TARGET.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232227 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp/plugin')
-rw-r--r-- | libgomp/plugin/plugin-nvptx.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libgomp/plugin/plugin-nvptx.c b/libgomp/plugin/plugin-nvptx.c index 06184258067..7ec1810a046 100644 --- a/libgomp/plugin/plugin-nvptx.c +++ b/libgomp/plugin/plugin-nvptx.c @@ -712,8 +712,8 @@ static void 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]; @@ -742,10 +742,7 @@ link_ptx (CUmodule *module, const struct targ_ptx_obj *ptx_objs, 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)); |