summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgpgpu-sim <[email protected]>2016-05-16 14:49:52 -0700
committergpgpu-sim <[email protected]>2016-05-16 14:49:52 -0700
commit42115fbcbc6acd8c2faeb375d936c8a903889aaa (patch)
tree00b76420080ff4688f7ffbf04cb83634abf1026f /src
parentc6a19233a5cbf3ee2f89fbd54a0a2eb9375d4ca0 (diff)
parenta625477b025d21332368a5c31a9b779c6bb0351f (diff)
Merge pull request #17 from ElTantawy/dev
Initial support for 7.5 - tested on simple sdk benchmaks (e.g., template, vectorAdd, ...)
Diffstat (limited to 'src')
-rw-r--r--src/cuda-sim/ptx_loader.cc5
-rw-r--r--src/cuda-sim/ptx_loader.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/cuda-sim/ptx_loader.cc b/src/cuda-sim/ptx_loader.cc
index e293065..f7bf70e 100644
--- a/src/cuda-sim/ptx_loader.cc
+++ b/src/cuda-sim/ptx_loader.cc
@@ -182,7 +182,7 @@ symbol_table *gpgpu_ptx_sim_load_ptx_from_string( const char *p, unsigned source
return symtab;
}
-void gpgpu_ptxinfo_load_from_string( const char *p_for_info, unsigned source_num )
+void gpgpu_ptxinfo_load_from_string( const char *p_for_info, unsigned source_num, unsigned sm_version )
{
char fname[1024];
snprintf(fname,1024,"_ptx_XXXXXX");
@@ -216,7 +216,8 @@ void gpgpu_ptxinfo_load_from_string( const char *p_for_info, unsigned source_num
extra_flags[0]=0;
#if CUDART_VERSION >= 3000
- snprintf(extra_flags,1024,"--gpu-name=sm_20");
+ if (sm_version == 0) sm_version = 20;
+ snprintf(extra_flags,1024,"--gpu-name=sm_%u",sm_version);
#endif
snprintf(commandline,1024,"$CUDA_INSTALL_PATH/bin/ptxas %s -v %s --output-file /dev/null 2> %s",
diff --git a/src/cuda-sim/ptx_loader.h b/src/cuda-sim/ptx_loader.h
index cb02eda..d3d0c92 100644
--- a/src/cuda-sim/ptx_loader.h
+++ b/src/cuda-sim/ptx_loader.h
@@ -32,7 +32,7 @@
extern bool g_override_embedded_ptx;
class symbol_table *gpgpu_ptx_sim_load_ptx_from_string( const char *p, unsigned source_num );
-void gpgpu_ptxinfo_load_from_string( const char *p_for_info, unsigned source_num );
+void gpgpu_ptxinfo_load_from_string( const char *p_for_info, unsigned source_num, unsigned sm_version=20 );
char* gpgpu_ptx_sim_convert_ptx_and_sass_to_ptxplus(const std::string ptx_str, const std::string sass_str, const std::string elf_str);
bool keep_intermediate_files();