[PATCH] D70739: [OPENMP50]Add device/isa context selector support.
Alexey Bataev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 27 06:36:29 PST 2019
ABataev marked an inline comment as done.
ABataev added inline comments.
================
Comment at: clang/test/OpenMP/nvptx_declare_variant_device_isa_codegen.cpp:48
+
+#pragma omp declare variant(foo) match(device = {isa("nvptx64")})
+int bar() { return 1; }
----------------
jdoerfert wrote:
> I'm not sure we want these to be strings. I would have assumed `isa(nvptx64)`, similar to `vendor(arm)`, or `kind(host)` and `kind(gpu)`
Here is the message from Joachim Protze:
```
vendor and kind are special, because we define the kind-name and
vendor-name in the context definition side document. (We could change
that to "kind-name" or define kind-name as any of "cpu", "gpu", "fpga" ???)
For the others, according to the syntax diagram in the OpenMP Context
section, the content of the () can only be string or const-int-exp.
- Joachim
```
That's why we need to represent them as strings, this is per OpenMP standard.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70739/new/
https://reviews.llvm.org/D70739
More information about the cfe-commits
mailing list