summaryrefslogtreecommitdiff
path: root/libcuda
diff options
context:
space:
mode:
authorspeverel <[email protected]>2016-06-02 11:28:15 -0700
committersspenst <[email protected]>2016-06-02 11:49:02 -0700
commit46aad91327a265c2fea2cfe629cc38eadb629200 (patch)
tree206a9ab7a5ebc82af672a5d5e593c6f9d35ba7d5 /libcuda
parentf9e25fed4a9f471525debd61300baab6ccdbe9d6 (diff)
Added handling of .cc option for arithmetic instructions. NOTE: Only made changes to parse instructions. Carry functionality NOT fully implemented; .cc instructions function like their unmodified ueqivelents. Also modified GTX750Ti config to model L1 data cache as simply not being used for global loads (instead of not existing at all). Changed ptxinfo parsing to avoid crashing when info includes texture information.
Diffstat (limited to 'libcuda')
-rw-r--r--libcuda/cuda_runtime_api.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc
index 910bebd..e2626d2 100644
--- a/libcuda/cuda_runtime_api.cc
+++ b/libcuda/cuda_runtime_api.cc
@@ -109,6 +109,7 @@
#include <stdarg.h>
#include <iostream>
#include <string>
+#include <regex>
#include <sstream>
#include <fstream>
#ifdef OPENGL_SUPPORT
@@ -1816,10 +1817,15 @@ void __cudaRegisterTexture(
int ext
) //passes in a newly created textureReference
{
+ std::string devStr (deviceName);
+ #if (CUDART_VERSION > 4020)
+ if (devStr.size() > 2 && devStr.data()[0] == ':' && devStr.data()[1] == ':')
+ devStr = devStr.replace(0, 2, "");
+ #endif
CUctx_st *context = GPGPUSim_Context();
gpgpu_t *gpu = context->get_device()->get_gpgpu();
printf("GPGPU-Sim PTX: in __cudaRegisterTexture:\n");
- gpu->gpgpu_ptx_sim_bindNameToTexture(deviceName, hostVar, dim, norm, ext);
+ gpu->gpgpu_ptx_sim_bindNameToTexture(devStr.data(), hostVar, dim, norm, ext);
printf("GPGPU-Sim PTX: int dim = %d\n", dim);
printf("GPGPU-Sim PTX: int norm = %d\n", norm);
printf("GPGPU-Sim PTX: int ext = %d\n", ext);