Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cuda: Revert cuda component num_counters not supported by vendor #83

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading