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

sysdetect: accounting for missing core ids. #269

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

adanalis
Copy link
Contributor

Pull Request Description

Some systems have non-contiguous numbering of cores, which affects the way we count the number of cores each numa node has.

Author Checklist

  • Description
    Why this PR exists. Reference all relevant information, including background, issues, test failures, etc
  • Commits
    Commits are self contained and only do one thing
    Commits have a header of the form: module: short description
    Commits have a body (whenever relevant) containing a detailed description of the addressed problem and its solution
  • Tests
    The PR needs to pass all the tests

@@ -119,8 +119,10 @@ fill_cpu_info( _sysdetect_cpu_info_t *info )
}

for (a = 0; a < info->threads * info->cores * info->sockets; ++a) {
CPU_CALL(cpu_get_attribute_at(CPU_ATTR__HWTHREAD_NUMA_AFFINITY, a, &info->numa_affinity[a]),
info->numa_affinity[a] = 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of setting numa_affinity[a]=0 in case of error we could have set it to -1 here?

Copy link
Contributor

@gcongiu gcongiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested it but it looks good

@willowec
Copy link
Contributor

I've just tested this on an Intel Raptorlake machine with heterogeneous cores, and it fixes #256.

@adanalis adanalis removed the status-work-in-progress PR is still being worked on label Oct 30, 2024
@adanalis adanalis merged commit 09fee01 into icl-utk-edu:master Oct 30, 2024
26 checks passed
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 this pull request may close these issues.

3 participants