[PATCH] D78655: [CUDA][HIP] Let lambda be host device by default

2020-07-08 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. yaxunl marked an inline comment as done. Closed by commit rG1eaad01046c8: [CUDA][HIP] Let lambda be host device by default (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D78655: [CUDA][HIP] Let lambda be host device by default

2020-07-08 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78655/new/ https://reviews.llvm.org/D78655 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D78655: [CUDA][HIP] Let lambda be host device by default

2020-07-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 3 inline comments as done. yaxunl added inline comments. Comment at: clang/lib/Sema/SemaCUDA.cpp:757-759 + // In host compilation, deferred diagnostics are only emitted for functions + // which are sure to be emitted on host side since there is no reliable + //

[PATCH] D78655: [CUDA][HIP] Let lambda be host device by default

2020-07-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 276417. yaxunl added a comment. revised by Artem's comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78655/new/ https://reviews.llvm.org/D78655 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/include/clang/Sema/Sema.h

[PATCH] D78655: [CUDA][HIP] Let lambda be host device by default

2020-07-07 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Sema/SemaCUDA.cpp:757-759 + // In host compilation, deferred diagnostics are only emitted for functions + // which are sure to be emitted on host side since there is no reliable + // way to check if a function is emitted on

[PATCH] D78655: [CUDA][HIP] Let lambda be host device by default

2020-07-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 276211. yaxunl added a comment. refactor CUDACheckLambdaCapture and add comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78655/new/ https://reviews.llvm.org/D78655 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D78655: [CUDA][HIP] Let lambda be host device by default

2020-07-06 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Sema/SemaLambda.cpp:1783 + + if (LangOpts.CUDA && LangOpts.CUDAIsDevice) +CUDACheckLambdaCapture(CallOperator, From); yaxunl wrote: > tra wrote: > > I would expect Sema-level diags to be produced

[PATCH] D78655: [CUDA][HIP] Let lambda be host device by default

2020-07-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 10 inline comments as done. yaxunl added inline comments. Comment at: clang/lib/Sema/SemaCUDA.cpp:750 +bool Sema::CUDACheckLambdaCapture(CXXMethodDecl *Callee, + const sema::Capture ) { tra wrote: > What does the

[PATCH] D78655: [CUDA][HIP] Let lambda be host device by default

2020-07-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 274774. yaxunl marked 4 inline comments as done. yaxunl added a comment. revised by Artem's and Paul's comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78655/new/ https://reviews.llvm.org/D78655 Files:

[PATCH] D78655: [CUDA][HIP] Let lambda be host device by default

2020-06-30 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added inline comments. Comment at: clang/test/SemaCUDA/lambda.cu:27 + +kernel<<<1,1>>>([&](){ hd(b); }); +// dev-error@-1 {{capture host side class data member by this pointer in device or host device lambda function}} Will this still produce

[PATCH] D78655: [CUDA][HIP] Let lambda be host device by default

2020-06-30 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Sema/SemaCUDA.cpp:750 +bool Sema::CUDACheckLambdaCapture(CXXMethodDecl *Callee, + const sema::Capture ) { What does the return value mean? We don't seem to check it anyways. If

[PATCH] D78655: [CUDA][HIP] Let lambda be host device by default

2020-06-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 274589. yaxunl retitled this revision from "[CUDA][HIP] Let non-caputuring lambda be host device" to "[CUDA][HIP] Let lambda be host device by default". yaxunl edited the summary of this revision. yaxunl added a comment. Added diagnostics for capturing host