[llvm-bugs] [Bug 47158] New: declare target device_type not work as expected
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Aug 13 14:07:46 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=47158
Bug ID: 47158
Summary: declare target device_type not work as expected
Product: OpenMP
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Clang Compiler Support
Assignee: unassignedclangbugs at nondot.org
Reporter: cchen at cray.com
CC: llvm-bugs at lists.llvm.org
1. Clang emit "error: function with 'device_type(host)' is not available on
device" when `nohost` is specified in device_type
(https://godbolt.org/z/zb5frT):
```
// clang -fopenmp -fopenmp-version=50 -fopenmp-targets=nvptx64 -emit-llvm -S
nohost.c
int device_fun() { return 100; }
#pragma omp declare target to(device_fun) device_type(nohost)
int main() {
#pragma omp target
{
device_fun();
}
}
```
2. Clang emit "function with 'device_type(host)' is not available on device"
when `host` is specified in device_type (https://godbolt.org/z/4M7j8E)
```
// clang -fopenmp -fopenmp-version=50 -fopenmp-targets=nvptx64 -emit-llvm -S
host.c
int host_fun() { return 100; }
#pragma omp declare target to(host_fun) device_type(host)
int main() {
host_fun();
}
```
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200813/64102a77/attachment.html>
More information about the llvm-bugs
mailing list