Skip to content

Commit

Permalink
Merge pull request #205 from Treece-Burgess/2024-07-16_cuda-12.4-bug-fix
Browse files Browse the repository at this point in the history
Renaming cupti_common.* to papi_cupti_common.* to fix building in Cuda >=12.4
  • Loading branch information
Treece-Burgess authored Jul 24, 2024
2 parents 4b6a4f7 + 943e970 commit 80747c0
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions src/components/cuda/Rules.cuda
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ CUDA_MACS+= -DPAPI_CUDA_CUPTI=$(PAPI_CUDA_CUPTI) -DPAPI_CUDA_PERFWORKS=$(PAPI_CU
COMPSRCS += components/cuda/linux-cuda.c \
components/cuda/cupti_dispatch.c \
components/cuda/cupti_utils.c \
components/cuda/cupti_common.c \
components/cuda/papi_cupti_common.c \
components/cuda/cupti_profiler.c \
components/cuda/cupti_events.c \

COMPOBJS += linux-cuda.o cupti_dispatch.o cupti_utils.o cupti_common.o cupti_profiler.o cupti_events.o
COMPOBJS += linux-cuda.o cupti_dispatch.o cupti_utils.o papi_cupti_common.o cupti_profiler.o cupti_events.o

# CFLAGS specifies compile flags; need include files here, and macro defines.
CFLAGS += -I$(PAPI_CUDA_ROOT)/include -I$(PAPI_CUDA_ROOT)/extras/CUPTI/include -g $(CUDA_MACS)
Expand All @@ -27,8 +27,8 @@ cupti_dispatch.o: components/cuda/cupti_dispatch.c
cupti_utils.o: components/cuda/cupti_utils.c $(HEADERS)
$(CC) $(LIBCFLAGS) $(OPTFLAGS) -c components/cuda/cupti_utils.c -o cupti_utils.o

cupti_common.o: components/cuda/cupti_common.c
$(CC) $(LIBCFLAGS) $(OPTFLAGS) -c components/cuda/cupti_common.c -o cupti_common.o
papi_cupti_common.o: components/cuda/papi_cupti_common.c
$(CC) $(LIBCFLAGS) $(OPTFLAGS) -c components/cuda/papi_cupti_common.c -o papi_cupti_common.o

cupti_profiler.o: components/cuda/cupti_profiler.c
$(CC) $(LIBCFLAGS) $(OPTFLAGS) -c components/cuda/cupti_profiler.c -o cupti_profiler.o
Expand Down
2 changes: 1 addition & 1 deletion src/components/cuda/cupti_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

#include "cupti_config.h"
#include "cupti_common.h"
#include "papi_cupti_common.h"
#include "cupti_dispatch.h"
#include "lcuda_debug.h"

Expand Down
2 changes: 1 addition & 1 deletion src/components/cuda/cupti_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <papi.h>
#include "cupti_events.h"
#include "cupti_common.h"
#include "papi_cupti_common.h"

#pragma GCC diagnostic ignored "-Wunused-parameter"
/* Functions needed by CUPTI Events API */
Expand Down
2 changes: 1 addition & 1 deletion src/components/cuda/cupti_profiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <nvperf_cuda_host.h>
#include <nvperf_target.h>

#include "cupti_common.h"
#include "papi_cupti_common.h"
#include "cupti_profiler.h"
#include "lcuda_debug.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @file cupti_common.c
* @file papi_cupti_common.c
* @author Anustuv Pal
* anustuv@icl.utk.edu
*/
Expand All @@ -11,7 +11,7 @@
#include "papi_memory.h"

#include "cupti_config.h"
#include "cupti_common.h"
#include "papi_cupti_common.h"

static void *dl_drv, *dl_rt;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/**
* @file cupti_common.h
* @file papi_cupti_common.h
* @author Anustuv Pal
* anustuv@icl.utk.edu
*/

#ifndef __CUPTI_COMMON_H__
#define __CUPTI_COMMON_H__
#ifndef __PAPI_CUPTI_COMMON_H__
#define __PAPI_CUPTI_COMMON_H__

#include <stdio.h>
#include <cuda.h>
Expand Down Expand Up @@ -107,4 +107,4 @@ int cuptic_ctxarr_destroy(cuptic_info_t *pinfo);
int cuptic_device_acquire(cuptiu_event_table_t *evt_table);
int cuptic_device_release(cuptiu_event_table_t *evt_table);

#endif /* __CUPTI_COMMON_H__ */
#endif /* __PAPI_CUPTI_COMMON_H__ */

0 comments on commit 80747c0

Please sign in to comment.