public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105640] [OpenMP] Context selectors missing for PowerPC Date: Wed, 18 May 2022 10:02:16 +0000 [thread overview] Message-ID: <bug-105640-4-W9gEbT42UK@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-105640-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105640 --- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> --- Regarding LLVM, I have no idea, but doing some searching, I do see: * clang/test/OpenMP/declare_variant_clauses_ast_print.cpp: //PRINT: #pragma omp declare variant(foo_v2) match(construct={dispatch}, device={arch(ppc)}) adjust_args(need_device_ptr:AAA) * clang/test/OpenMP/declare_variant_messages.c: #pragma omp begin declare variant match(device={isa(sse2020), arch(ppc)}) * * * Otherwise, the following archs are supported according to llvm/include/llvm/Frontend/OpenMP/OMPKinds.def: __OMP_TRAIT_PROPERTY(device, arch, arm) __OMP_TRAIT_PROPERTY(device, arch, armeb) __OMP_TRAIT_PROPERTY(device, arch, aarch64) __OMP_TRAIT_PROPERTY(device, arch, aarch64_be) __OMP_TRAIT_PROPERTY(device, arch, aarch64_32) __OMP_TRAIT_PROPERTY(device, arch, ppc) __OMP_TRAIT_PROPERTY(device, arch, ppcle) __OMP_TRAIT_PROPERTY(device, arch, ppc64) __OMP_TRAIT_PROPERTY(device, arch, ppc64le) __OMP_TRAIT_PROPERTY(device, arch, x86) __OMP_TRAIT_PROPERTY(device, arch, x86_64) __OMP_TRAIT_PROPERTY(device, arch, amdgcn) __OMP_TRAIT_PROPERTY(device, arch, nvptx) __OMP_TRAIT_PROPERTY(device, arch, nvptx64) It is not quite clear what is permitted as ISA. That file has: OMP_TRAIT_PROPERTY(device_isa___ANY, device, device_isa, "<any, entirely target dependent>") and later in the .cc code: // We overwrite the isa trait as it is actually up to the OMPContext hook to // check the raw string(s). if (Property == TraitProperty::device_isa___ANY) IsActiveTrait = llvm::all_of(VMI.ISATraits, [&](StringRef RawString) { return Ctx.matchesISATrait(RawString); which in turn uses: bool TargetOMPContext::matchesISATrait(StringRef RawString) const { auto It = FeatureMap.find(RawString); if (It != FeatureMap.end()) return It->second; if (!FeatureValidityCheck(RawString)) DiagUnknownTrait(RawString); return false; which in turn is initialized via void ASTContext::getFunctionFeatureMap(llvm::StringMap<bool> &FeatureMap, const FunctionDecl *FD) const { if (FD) getFunctionFeatureMap(FeatureMap, GlobalDecl().getWithDecl(FD)); else Target->initFeatureMap(FeatureMap, getDiagnostics(), Target->getTargetOpts().CPU, Target->getTargetOpts().Features); } In my understanding, that matches: clang/lib/Basic/Targets/NVPTX.h: Features[CudaArchToString(GPU)] = true; clang/lib/Basic/Targets/NVPTX.h: Features["ptx" + std::to_string(PTXVersion)] = true; where the former comes from static const CudaArchToStringMap arch_names in clang/lib/Basic/Cuda.cpp and for PowerPC, there is clang/lib/Basic/Targets/PPC.cpp
prev parent reply other threads:[~2022-05-18 10:02 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-18 6:32 [Bug middle-end/105640] New: " burnus at gcc dot gnu.org 2022-05-18 6:38 ` [Bug target/105640] " jakub at gcc dot gnu.org 2022-05-18 6:40 ` jakub at gcc dot gnu.org 2022-05-18 6:51 ` jakub at gcc dot gnu.org 2022-05-18 7:05 ` jakub at gcc dot gnu.org 2022-05-18 10:02 ` burnus at gcc dot gnu.org [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-105640-4-W9gEbT42UK@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).