Skip to content

Commit

Permalink
Revert "utils: papi_component_avail does not support cuda component c…
Browse files Browse the repository at this point in the history
…ounters"

This reverts commit 4f15f3d.
  • Loading branch information
anustuvicl committed Sep 15, 2023
1 parent 2c816bd commit 93aced3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
5 changes: 1 addition & 4 deletions src/components/cuda/linux-cuda.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ papi_vector_t _cuda_vector = {
.version = "0.1",
.description = "CUDA profiling via NVIDIA CuPTI interfaces",
.num_mpx_cntrs = PAPI_CUDA_MPX_COUNTERS,
.num_cntrs = PAPI_CUDA_MAX_COUNTERS,
.default_domain = PAPI_DOM_USER,
.default_granularity = PAPI_GRN_THR,
.available_granularities = PAPI_GRN_THR,
Expand Down Expand Up @@ -122,10 +123,6 @@ static int cuda_init_component(int cidx)
_cuda_vector.cmp_info.disabled = PAPI_EDELAY_INIT;
sprintf(_cuda_vector.cmp_info.disabled_reason,
"Not initialized. Access component events to initialize it.");

_cuda_vector.cmp_info.num_cntrs = PAPI_ECMP;
sprintf(_cuda_vector.cmp_info.misc_info, "Not supported by vendor.");

return PAPI_EDELAY_INIT;
}

Expand Down
1 change: 0 additions & 1 deletion src/papi.h
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,6 @@ typedef void *vptr_t;
char support_version[PAPI_MIN_STR_LEN]; /**< Version of the support library */
char kernel_version[PAPI_MIN_STR_LEN]; /**< Version of the kernel PMC support driver */
char disabled_reason[PAPI_HUGE_STR_LEN]; /**< Reason for failure of initialization */
char misc_info[PAPI_2MAX_STR_LEN]; /**< Generic message that component can set */
int disabled; /**< 0 if enabled, otherwise error code from initialization */
int initialized; /**< Component is ready to use */
int CmpIdx; /**< Index into the vector array for this component; set at init time */
Expand Down
9 changes: 2 additions & 7 deletions src/utils/papi_component_avail.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,8 @@ main( int argc, char **argv )
if (cmpinfo->disabled) continue;

printf( "Name: %-23s %s\n", cmpinfo->name ,cmpinfo->description);
printf( " %-23s Native: %d, Preset: %d, Counters: ", " ", cmpinfo->num_native_events);
if (cmpinfo->num_cntrs == PAPI_ECMP) {
printf( "<%s>\n", cmpinfo->misc_info);
}
else {
printf( "%d\n", cmpinfo->num_cntrs);
}
printf( " %-23s Native: %d, Preset: %d, Counters: %d\n",
" ", cmpinfo->num_native_events, cmpinfo->num_preset_events, cmpinfo->num_cntrs);

int pmus=0;
for (i=0; i<PAPI_PMU_MAX; i++) { // Count pmus to print.
Expand Down

0 comments on commit 93aced3

Please sign in to comment.