summaryrefslogtreecommitdiff
path: root/libcuda/cuda_runtime_api.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libcuda/cuda_runtime_api.cc')
-rw-r--r--libcuda/cuda_runtime_api.cc53
1 files changed, 51 insertions, 2 deletions
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc
index 95a3c24..e6b53c3 100644
--- a/libcuda/cuda_runtime_api.cc
+++ b/libcuda/cuda_runtime_api.cc
@@ -1199,6 +1199,26 @@ __host__ cudaError_t CUDARTAPI cudaGetDevice(int *device)
*device = g_active_device;
return g_last_cudaError = cudaSuccess;
}
+__host__ cudaError_t CUDARTAPI cudaDeviceGetLimit ( size_t* pValue, cudaLimit limit )
+{
+ if(g_debug_execution >= 3){
+ announce_call(__my_func__);
+ }
+ cuda_not_implemented(__my_func__,__LINE__);
+ return g_last_cudaError = cudaSuccess;
+
+}
+
+
+__host__ cudaError_t CUDARTAPI cudaStreamGetPriority ( cudaStream_t hStream, int* priority )
+{
+ if(g_debug_execution >= 3){
+ announce_call(__my_func__);
+ }
+ cuda_not_implemented(__my_func__,__LINE__);
+ return g_last_cudaError = cudaSuccess;
+
+}
__host__ cudaError_t CUDARTAPI cudaDeviceGetPCIBusId (
char *pciBusId,
@@ -1235,6 +1255,16 @@ __host__ cudaError_t cudaIpcOpenMemHandle(
return g_last_cudaError = cudaErrorUnknown;
}
+__host__ cudaError_t CUDARTAPI cudaDestroyTextureObject(cudaTextureObject_t texObject)
+{
+ if(g_debug_execution >= 3){
+ announce_call(__my_func__);
+ }
+ cuda_not_implemented(__my_func__,__LINE__);
+ return g_last_cudaError = cudaErrorUnknown;
+}
+
+
/*******************************************************************************
* *
* *
@@ -2552,8 +2582,17 @@ void** CUDARTAPI __cudaRegisterFatBinary( void *fatCubin )
// Making this a runtime variable based on the app, enables GPGPU-Sim compiled
// with a newer version of CUDA to run apps compiled with older versions of
// CUDA. This is especially useful for PTXPLUS execution.
- int app_cuda_version = get_app_cuda_version();
- assert( app_cuda_version == CUDART_VERSION / 1000 && "The app must be compiled with same major version as the simulator." );
+ //Skip cuda version check for pytorch application
+ std::string app_binary_path = get_app_binary();
+ int pos = app_binary_path.find("python");
+ if (pos==std::string::npos){
+ // Not pytorch app : checking cuda version
+ int app_cuda_version = get_app_cuda_version();
+ assert( app_cuda_version == CUDART_VERSION / 1000 && "The app must be compiled with same major version as the simulator." );
+ }
+
+ //int app_cuda_version = get_app_cuda_version();
+ //assert( app_cuda_version == CUDART_VERSION / 1000 && "The app must be compiled with same major version as the simulator." );
const char* filename;
#if CUDART_VERSION < 6000
// FatBin handle from the .fatbin.c file (one of the intermediate files generated by NVCC)
@@ -4447,6 +4486,16 @@ CUresult CUDAAPI cuPointerGetAttribute(void *data, CUpointer_attribute attribute
#endif /* CUDART_VERSION >= 4000 */
#if CUDART_VERSION >= 8000
+__host__ cudaError_t CUDARTAPI cudaCreateTextureObject ( cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc )
+{
+ if(g_debug_execution >= 3){
+ announce_call(__my_func__);
+ }
+ cuda_not_implemented(__my_func__,__LINE__);
+ return g_last_cudaError = cudaSuccess;
+
+}
+
CUresult CUDAAPI cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream)
{
if(g_debug_execution >= 3){