[PATCH] D26437: Use -fno-unit-at-a-time and -funit-at-a-time
Justin Lebar via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 13 03:22:00 PST 2016
jlebar added a comment.
In https://reviews.llvm.org/D26437#593762, @rampitec wrote:
> I have created a discardable barrier intrinsic and used it directly in the sub_group_barrier implementation. As expected that helped conformance test to pass.
You still plan to modify clang to insert this intrinsic during codegen at the top of every function marked with the convergent attribute, right?
You folks need to figure out the semantics for the convergent attribute in opencl, but I think it makes very little sense to require that convergent functions both (a) have the attribute and (b) have the nop barrier intrinsic. You should choose one or the other approach.
> Marking all functions as convergent seems to be an overkill to me
Again, I urge you to think about this in terms of the semantics of your programming language. Am I allowed to wrap a convergent function? (People do this in CUDA all the time.) If I am allowed to do so, must I mark the wrapper (and its wrapper, and so on) with the convergent attribute? (I know little about opencl, but I notice that "convergent" doesn't appear anywhere in the opencl 2.0 spec. This suggests maybe you don't expect end-users to use this attribute in their code?)
Only once you have defined the semantics of the language will you be able to make the correct decision about whether an approach is overkill or nit. But, as someone who spent a few months of his life tracking down bugs due to our CUDA support not handling this exact issue properly, I am very concerned with the above quote, because it sounds to me like you're judging solutions before figuring out what your language is supposed to do.
Repository:
rL LLVM
https://reviews.llvm.org/D26437
More information about the llvm-commits
mailing list