Skip to content

Commit

Permalink
remove nvml dependency in cuda-wrapper3.c
Browse files Browse the repository at this point in the history
  • Loading branch information
yzs981130 committed Jul 18, 2019
1 parent 24a1892 commit f951ac0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cuda-wrapper3.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <string.h>
#include <pthread.h>
#include <cuda_runtime.h>
#include <nvml.h>
#include <sys/types.h>
#include <unistd.h>
#include <time.h>
Expand All @@ -28,8 +27,8 @@ static size_t pytorch_offset_size = 500000000L;
static pthread_mutex_t mem_cnt_lock;
char *error;
char timebuf[30];
nvmlReturn_t nvmlresult;
nvmlDevice_t nvmldevice;
//nvmlReturn_t nvmlresult;
//nvmlDevice_t nvmldevice;


struct HashArray
Expand Down Expand Up @@ -114,13 +113,15 @@ void set_quota() {
}
}

/*
void nvml_memquery() {
nvmlMemory_t nvmlmemory;
nvmlresult = nvmlDeviceGetMemoryInfo(nvmldevice, &nvmlmemory);
printf("\nTotal installed FB memory %lld bytes \n", nvmlmemory.total);
printf("Unallocated FB memory %lld bytes \n", nvmlmemory.free);
printf("Allocated FB memory %lld bytes \n\n", nvmlmemory.used);
}
*/

void init_func() {
if(open_flag == 0 && handle == NULL) {
Expand Down

0 comments on commit f951ac0

Please sign in to comment.