yxsamliu wrote:

> > > I am not ok with this being an error by default.
> > 
> > 
> > I think compilation must fail when an unsupported and untested option is 
> > specified. And that includes when the target is SPIR-V.
> 
> I would call it a supported and used option. The unsupported and untested 
> pieces are in the HIP headers, and bugs in the downstream libraries should 
> not infect the compiler. Wave64 codegen should always work. Regressing the 
> option which already exists to require jumping through hoops to continue 
> using is unreasonable.
> 
> The option should not work for SPIRV, since it doesn't apply for the machine.
> 
> In short I don't think the compiler should be doing anything here. The 
> warning should be isolated to the problematic HIP headers

In this case, we intentionally removed predefined macros for wave 64 so that it 
is impossible to know it is wave 64 in HIP headers at compilation time. It is 
also too expensive to do assert at run time in device functions that are not 
working with wave 64. The only feasible way to diagnose that seems to be in 
compiler, and we could instead of saying "amdgpu target does not work with wave 
64", we could say "HIP is not supported with wave 64 due to lack of runtime 
support of certain device functions".

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

Reply via email to