diff options
| author | J <[email protected]> | 2018-08-17 15:57:03 -0700 |
|---|---|---|
| committer | J <[email protected]> | 2018-08-17 15:57:03 -0700 |
| commit | c8a823a4cd59f43a454411f6d3b949603a4d5ac4 (patch) | |
| tree | fc0c5b5c3e9dbb875df66d7c3920e9ac4c597006 /libcuda | |
| parent | ad445852809eadbfd934b656fe8541d4ca5826d9 (diff) | |
fixes and switch to using PYTORCH_BIN
Diffstat (limited to 'libcuda')
| -rw-r--r-- | libcuda/cuda_runtime_api.cc | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index b43a9ef..1c80941 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -780,7 +780,16 @@ __host__ cudaError_t CUDARTAPI cudaMemcpyFromSymbol(void *dst, const char *symbo return g_last_cudaError = cudaSuccess; } +__host__ cudaError_t CUDARTAPI cudaMemGetInfo (size_t *free, size_t *total){ + if(g_debug_execution >= 3){ + announce_call(__my_func__); + } + //placeholder; should interact with cudaMalloc and cudaFree? + *free = 10000000000; + *total = 10000000000; + return g_last_cudaError = cudaSuccess; +} /******************************************************************************* * * @@ -1893,7 +1902,7 @@ char* get_app_binary_name(std::string abs_path){ void extract_ptx_files_using_cuobjdump(){ extern bool g_cdp_enabled; char command[1000]; - char *pytorch_path = getenv("PYTORCH_PATH"); + char *pytorch_bin = getenv("PYTORCH_BIN"); std::string app_binary = get_app_binary(); @@ -1902,8 +1911,8 @@ void extract_ptx_files_using_cuobjdump(){ int fd2=mkstemp(ptx_list_file_name); close(fd2); - if (pytorch_path!=NULL && strlen(pytorch_path)!=0){ - app_binary = std::string(std::string(pytorch_path) + "/vectorAdd"); + if (pytorch_bin!=NULL && strlen(pytorch_bin)!=0){ + app_binary = std::string(pytorch_bin); } //only want file names @@ -1934,6 +1943,7 @@ void extract_ptx_files_using_cuobjdump(){ if(!no_of_ptx){ printf("WARNING: Number of ptx in the executable file are 0. One of the reasons might be\n"); printf("\t1. CDP is enabled\n"); + printf("\t2. When using PyTorch, PYTORCH_BIN is not set correctly\n"); } std::ifstream infile(ptx_list_file_name); |
