summaryrefslogtreecommitdiff
path: root/libcuda/cuda_runtime_api.cc
diff options
context:
space:
mode:
authorRoland Green <[email protected]>2019-08-26 16:28:51 -0400
committerGitHub <[email protected]>2019-08-26 16:28:51 -0400
commit93e98042f7c4a589bf0e4c7cfcc639c316c8a4b2 (patch)
tree1e32c07e932b3d3cc6b977e29a1327274f4f29a8 /libcuda/cuda_runtime_api.cc
parent6be23a1b36a3311c7dafc45a5e692e38cb351337 (diff)
parentb88c9e9a545960b7fcc1c373b60005612296158b (diff)
Merge pull request #28 from CoffeeBeforeArch/fix_warnings
Fix a bunch of outstanding warnings and undefined behavior. Fix single merge-error with Mahmoud's changes.
Diffstat (limited to 'libcuda/cuda_runtime_api.cc')
-rw-r--r--libcuda/cuda_runtime_api.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc
index e71db4c..716e297 100644
--- a/libcuda/cuda_runtime_api.cc
+++ b/libcuda/cuda_runtime_api.cc
@@ -548,7 +548,7 @@ __host__ cudaError_t CUDARTAPI cudaDeviceGetLimitInternal( size_t* pValue, cudaL
break;
}
else{
- printf("ERROR:Limit %s is not supported on this architecture \n",limit);
+ printf("ERROR:Limit %d is not supported on this architecture \n", limit);
abort();
}
case 4: // cudaLimitDevRuntimePendingLaunchCount
@@ -557,12 +557,12 @@ __host__ cudaError_t CUDARTAPI cudaDeviceGetLimitInternal( size_t* pValue, cudaL
break;
}
else{
- printf("ERROR:Limit %s is not supported on this architecture \n",limit);
+ printf("ERROR:Limit %d is not supported on this architecture \n",limit);
abort();
}
#endif
default:
- printf("ERROR:Limit %s unimplemented \n",limit);
+ printf("ERROR:Limit %d unimplemented \n",limit);
abort();
}
return g_last_cudaError = cudaSuccess;
@@ -2502,7 +2502,6 @@ void cuda_runtime_api::extract_ptx_files_using_cuobjdump(CUctx_st *context){
while (std::getline(infile, line))
{
//int pos = line.find(std::string(get_app_binary_name(app_binary)));
- const char *ptx_file = line.c_str();
int pos1 = line.find("sm_");
int pos2 = line.find_last_of(".");
if (pos1==std::string::npos&&pos2==std::string::npos){
@@ -2530,11 +2529,10 @@ void cuda_runtime_api::extract_ptx_files_using_cuobjdump(CUctx_st *context){
* */
void cuda_runtime_api::extract_code_using_cuobjdump(){
CUctx_st *context = GPGPUSim_Context();
- unsigned forced_max_capability = context->get_device()->get_gpgpu()->get_config().get_forced_max_capability();
//prevent the dumping by cuobjdump everytime we execute the code!
const char *override_cuobjdump = getenv("CUOBJDUMP_SIM_FILE");
- char command[1000], ptx_file[1000];
+ char command[1000];
std::string app_binary = get_app_binary();
//Running cuobjdump using dynamic link to current process
snprintf(command,1000,"md5sum %s ", app_binary.c_str());