[PATCH] D75811: [CUDA] Choose default architecture based on CUDA installation
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 9 09:41:19 PDT 2020
tra added a comment.
I'm not sure that's the problem worth solving.
Magically changing compiler target based on something external to compiler is a bad idea IMO. I would expect a compilation with exactly the same compiler options to do exactly the same thing. If we magically change default target, that will not be the case.
Also, there's no good default for a GPU. I can't think of anything that would work out of the box for most of the users.
In practice compilation for the GPU require specifying GPU target set that's specific to particular user.
It may make more sense to just bump the default to a sensible value. E.g. `sm_60`, warn users ahead of time and flip the default at some point later. This will shift the default towards the target that's useful for most of the GPUs that are currently out there (though there are still a lot of sm_35 GPUs in the clouds, so it may be a reasonable default, too).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75811/new/
https://reviews.llvm.org/D75811
More information about the cfe-commits
mailing list