Skip to content

Commit

Permalink
Fixing cuda 10.1 build errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
khuck committed Mar 22, 2021
1 parent abe99f9 commit 81a8d90
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/apex/activity_trace_async.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1002,10 +1002,10 @@ bool getBytesIfMalloc(CUpti_CallbackId id, const void* params, std::string conte
bool onHost = false;
bool managed = false;
void* ptr = nullptr;
static std::atomic<size_t> totalAllocated = 0.0;
static std::atomic<size_t> totalAllocated{0};
static std::unordered_map<void*,size_t> memoryMap;
std::mutex mapMutex;
static std::atomic<size_t> hostTotalAllocated = 0.0;
static std::atomic<size_t> hostTotalAllocated{0};
static std::unordered_map<void*,size_t> hostMemoryMap;
std::mutex hostMapMutex;
bool free = false;
Expand Down Expand Up @@ -1087,11 +1087,13 @@ bool getBytesIfMalloc(CUpti_CallbackId id, const void* params, std::string conte
onHost = true;
break;
}
#ifdef CUPTI_DRIVER_TRACE_CBID_cuMemAddressFree
case CUPTI_DRIVER_TRACE_CBID_cuMemAddressFree: {
ptr = (void*)((cuMemAddressFree_params_st*)(params))->ptr;
free = true;
break;
}
#endif
case CUPTI_DRIVER_TRACE_CBID_cuMemFree: {
size_t tmp = (size_t)((cuMemFree_params_st*)(params))->dptr;
ptr = (void*)(tmp);
Expand Down

0 comments on commit 81a8d90

Please sign in to comment.