[PATCH] D155213: [HIP] Add `-fno-hip-uniform-block`

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 20 08:58:10 PDT 2023


yaxunl marked 2 inline comments as done.
yaxunl added inline comments.


================
Comment at: clang/include/clang/Driver/Options.td:1092
   ShouldParseIf<hip.KeyPath>;
+defm hip_uniform_block : BoolFOption<"hip-uniform-block",
+  LangOpts<"HIPUniformBlock">, DefaultTrue,
----------------
arsenm wrote:
> scchan wrote:
> > yaxunl wrote:
> > > arsenm wrote:
> > > > Can we avoid adding yet another language flag for something that's reusable for everything? Is there an --offload-<something> ?
> > > Currently, the naming convention for shared CUDA/HIP language options is `-fgpu-*` or `--gpu-* . The shared CUDA/HIP/OpenMP driver options are named `--offload-*`.
> > > 
> > > This option is named `-fhip-uniform-block` because AFAIK CUDA does not support non-uniform block size.
> > > 
> > > If we want to make it a generic option, it should be named as `-fgpu-uniform-block` by the current naming convention. Unless we want to change the naming convention for generic offloading language options.
> > > 
> > > @tra What do you think? Thanks.
> > Don't we need a different default value for some languages like OpenCL?
> Yes, but opencl already has a spec'd flag for this. If we're making up a new one, it could be something generic that aliases the opencl one in that case. Plus the +/- value of a new flag should work (the CL one only goes in one direction)
I am thinking, maybe it is time to start moving towards the final direction.

How about renaming it as `--offload-uniform-block` ?

@MaskRay @tra 



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155213/new/

https://reviews.llvm.org/D155213



More information about the cfe-commits mailing list