diff options
| author | Amruth <[email protected]> | 2018-03-29 01:43:59 -0700 |
|---|---|---|
| committer | Amruth <[email protected]> | 2018-03-29 01:43:59 -0700 |
| commit | 24dc02cd1c46ff304fe7d8717c60c24c4b257785 (patch) | |
| tree | be8bd642a7cf9b6579a91cb755ed6746d1644191 | |
| parent | 66107577251189900ba06cce0e8bce036d13079d (diff) | |
arch is also not supported for cuda 5 or lower
| -rw-r--r-- | libcuda/cuda_runtime_api.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index 8426b8e..5452ed0 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -1520,10 +1520,15 @@ void extract_code_using_cuobjdump(){ snprintf(fname,1024,"_cuobjdump_complete_output_XXXXXX"); int fd=mkstemp(fname); close(fd); - if(!g_cdp_enabled) + if(!g_cdp_enabled) { +#if (CUDART_VERSION >= 6000) snprintf(command,1000,"$CUDA_INSTALL_PATH/bin/cuobjdump -ptx -elf -sass -arch=sm_%u %s > %s", forced_max_capability, app_binary.c_str(), fname); - else +#else + snprintf(command,1000,"$CUDA_INSTALL_PATH/bin/cuobjdump -ptx -elf -sass %s > %s", app_binary.c_str(), fname); +#endif + } else { snprintf(command,1000,"$CUDA_INSTALL_PATH/bin/cuobjdump -ptx -elf -sass -all %s > %s", app_binary.c_str(), fname); + } bool parse_output = true; result = system(command); if(result) { |
