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

Fixing RAPL for AMD Milan CPU #141

Open
gitrepoidoscar opened this issue Dec 14, 2023 · 2 comments · May be fixed by #275
Open

Fixing RAPL for AMD Milan CPU #141

gitrepoidoscar opened this issue Dec 14, 2023 · 2 comments · May be fixed by #275
Assignees

Comments

@gitrepoidoscar
Copy link

"_rapl_init_component (cidx=) at components/rapl/linux-rapl.c:506
506 strCpy=strncpy(_rapl_vector.cmp_info.disabled_reason,
(gdb) list
501 msr_pkg_energy_status=MSR_AMD_PKG_ENERGY_STATUS;
502 msr_pp0_energy_status=MSR_AMD_PP0_ENERGY_STATUS;
503
504 if (hw_info->cpuid_family!=0x17) {
505 /* Not a family 17h machine */
506 strCpy=strncpy(_rapl_vector.cmp_info.disabled_reason,
507 "CPU family not supported",PAPI_MAX_STR_LEN);
508 _rapl_vector.cmp_info.disabled_reason[PAPI_MAX_STR_LEN-1]=0;
509 if (strCpy == NULL) HANDLE_STRING_ERROR;
510 retval = PAPI_ENOIMPL;"

The 0x17 check in 504 doesnt work for Milan. After disabling this check, RAPL worked.

@Treece-Burgess
Copy link
Contributor

I have been able to recreate this issue on an AMD Milan machine as well. I am going to look further into it.

@Treece-Burgess Treece-Burgess self-assigned this Oct 11, 2024
@jagode
Copy link
Collaborator

jagode commented Oct 14, 2024

We could update line 504 to:

if ((hw_info->cpuid_family!=0x17) && (hw_info->cpuid_family!=0x19))

BUT (and that's a big "but"), Family 25 includes multiple different Zen3 and Zen4 CPUs. This means that (a) it needs to be tested on all Family 25 CPUs, and it must work on all of them. Otherwise, the part after "AND" needs to be more restricted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants