diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2020-01-21 13:01:23 -0500 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2020-01-21 13:25:18 -0500 |
commit | 9148b8b734e7279c86a7a75883efdfdf48e8d148 (patch) | |
tree | 70aedca31bdb89c9e852860ebf8c7924f3d9bbbe /llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp | |
parent | 68122b5826b56f547e8fbae7cf4d455afeda8400 (diff) | |
download | llvm-9148b8b734e7279c86a7a75883efdfdf48e8d148.zip llvm-9148b8b734e7279c86a7a75883efdfdf48e8d148.tar.gz llvm-9148b8b734e7279c86a7a75883efdfdf48e8d148.tar.bz2 |
[OpenMP][Offloading] Fix the issue that omp_get_num_devices returns wrong number of devices, by Shiley Tian.
Summary:
This patch is to fix issue in the following simple case:
#include <omp.h>
#include <stdio.h>
int main(int argc, char *argv[]) {
int num = omp_get_num_devices();
printf("%d\n", num);
return 0;
}
Currently it returns 0 even devices exist. Since this file doesn't contain any
target region, the host entry is empty so further actions like initialization
will not be proceeded, leading to wrong device number returned by runtime
function call.
Reviewers: jdoerfert, ABataev, protze.joachim
Reviewed By: ABataev
Subscribers: protze.joachim
Tags: #openmp
Differential Revision: https://reviews.llvm.org/D72576
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp')
0 files changed, 0 insertions, 0 deletions