- So far, we only recognize the compilation with offloading and skip the offloading part.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Added Manuel as someone familiar with tooling.
clang/lib/Tooling/Tooling.cpp | ||
---|---|---|
126 | Is this still the right job for us to pick? I think we want this to be the host compilation. As things are right now my guess is that we're probably picking the first device-side compilation. |
clang/lib/Tooling/Tooling.cpp | ||
---|---|---|
126 | yes, OffloadAction is appended to the original host action. The corresponding first job is the host compilation. The frontend has similar handling in lib/Frontend/CreateInvocationFromCommandLine.cpp |
clang/lib/Tooling/Tooling.cpp | ||
---|---|---|
126 | Can we add an assert or diagnostics for that? I think the check below would not always be able to tell if it unintentionally picked a wrong kind of job. |
clang/lib/Tooling/Tooling.cpp | ||
---|---|---|
126 | It seems to me that the cast<> and check against "clang" @ L118 already did what I asked. |
clang/lib/Tooling/Tooling.cpp | ||
---|---|---|
126 | Device-side compilation would also use clang, so the check for clang is insufficient for ensuring that it's a *host* compilation. Furthermore, the order of jobs *will* change depending on whether -fsyntax-only is in effect. @klimek -- Manuel, Is tooling allowed to create an invocation w/o -fsyntax-only? AFAICT, runToolOnCodeWithArgs always adds it, but one could technically create an Invocation without it. |
clang/lib/Tooling/Tooling.cpp | ||
---|---|---|
126 | Generally, tooling is allowed to do it, but it's not super well supported or tested. |
clang/lib/Tooling/Tooling.cpp | ||
---|---|---|
126 | I added more offload compilation based on actions, which is more reliable that jobs. Is that sufficient? |
clang/lib/Tooling/Tooling.cpp | ||
---|---|---|
102 | that's the number of top-level actions. no matter how many GPUs are specified, that offload action is the top-level action masters all of them. |
I have no access to MacOS but try to fix that in r374478. Maybe that's a good excuse for a MacBook, ;)
Why 2? Will it not be different if user targeted multiple GPUs?