Artem-B wrote:

@cgmb 

> I would suggest that we should either (a) change the default GPU target to 
> native and make the failure to detect the user’s GPU into a hard compiler 
> error, or (b) change the default GPU target to SPIR-V so that it works on 
> every machine.

The thing is that the sensible GPU target default does not exist for the GPUs 
in principle, IMO. We're just arguing about the least terrible variant to 
choose.

* any fixed GPU version -- wrong for most users. It kind of forces everyone to 
explicitly specify what they need. Or they presumably don't care.
* `native` -- correct for many users doing local builds, wrong for the 
production builds that are often done on machines w/o GPU, or with some GPU 
that's irrelevant for the build.
* generic one-target-suits-all. Kind of functional, but likely a suboptimal 
choice for everyone.

I am personally biased towards the first variant, as it's consistently and 
predictably bad for everyone. Other options tend to create an illusion of "just 
working", but are prone to creating unwanted surprises. 

spir-v would probably be an OK alternative. It's not great (probably leases 
some performance on the table vs the native build), but the binary will 
presumably work on other machines.




https://github.com/llvm/llvm-project/pull/139281
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to