[PATCH] D92363: [HIP] Warn no --offload-arch option

2021-03-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D92363#2607072 , @yaxunl wrote: > @tra I got some issue with this patch. There are cases that an expression > using a host variable is compile-time constant, e.g. > > int x; > __device__ void fun() { > sizeof(x); > } >

[PATCH] D92363: [HIP] Warn no --offload-arch option

2021-03-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. @tra I got some issue with this patch. There are cases that an expression using a host variable is compile-time constant, e.g. int x; __device__ void fun() { sizeof(x); } Do we want to allow that? Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D92363: [HIP] Warn no --offload-arch option

2020-12-03 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D92363#2431812 , @yaxunl wrote: > > There are still valid use cases for not providing GPU arch. For example, > users would like to test syntax of a HIP program for which GPU arch does not > matter, or users would like to get P

[PATCH] D92363: [HIP] Warn no --offload-arch option

2020-12-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D92363#2426401 , @tra wrote: > While I agree that the default GPU choice is not likely to be correct, or > usable, for everyone, but the warning seems to be a half-measure. > If the default is not usable, then it should not be t

[PATCH] D92363: [HIP] Warn no --offload-arch option

2020-12-01 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. While I agree that the default GPU choice is not likely to be correct, or usable, for everyone, but the warning seems to be a half-measure. If the default is not usable, then it should not be the default. If it's usable, then we don't need a warning. Having a warning would

[PATCH] D92363: [HIP] Warn no --offload-arch option

2020-11-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. yaxunl requested review of this revision. This patch let clang emit a warning when no --offload-arch option is specified, which usually indicates that users forget to specify this option. https://reviews.llvm.org/D92363 Files: clang