Skip to content

OpenMP reporting wrong device number when using amd64 as target #132549

Open
@KaruroChori

Description

@KaruroChori

Compiling with flags -fopenmp -g -fopenmp-targets=amd64 on an amd64 system results in the omp runtime returning 4 devices available for some strange reason, even if the current system has a single socket processor, so I don't really understand where that 4 is coming from.

#include <cstdio>
#include <omp.h>
int main()
{
    printf("%d %d\n", omp_get_num_devices(), omp_get_device_num());
    return 0;
}

Outputs 4 4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions