Hi, Yes, a pocl env in triple could be useful, but if possible, it'd be better to manage without any pocl-specific code in LLVM to have all (or most) LLVM targets out-of-the-box OpenCL-supported via pocl without LLVM modifications.
Was there a problem with -cl-ext= ? On 20.01.2017 09:37, Kalle Raiskila wrote: > Hi pocl-devs, > > seems the clang developers do not like the idea of enabling OpenCL-C pragmas > per default for every target, > which now left all but x86 (I think) broken for LLVM 3.9. > > Below is the forwarded suggestions from the clang devs. > > A worthy idea to consider is 'pocl' in the target triple. > When clang detects this, it could legitimately enable all OpenCL-C pragmas > (or do whatever else we deem necessary). > All sorts of things could be easier with this. > > I don't think I have enough time to commit to this. Any takers? > > > kalle > > > > -------- Forwarded Message -------- > Subject: RE: PATCH: re-enable OpenCL extensions > Date: Thu, 19 Jan 2017 21:43:26 +0000 > From: Liu, Yaxun (Sam) <[email protected]> > To: Anastasia Stulova <[email protected]>, Kalle Raiskila > <[email protected]> > CC: [email protected] <[email protected]>, nd <[email protected]> > > I think the supported extensions for a target should be as accurate as > possible, for it to be useful. Setting all > extensions to be supported on all targets will defeat its purpose. > > I recommend to introduce "pocl" as an environment in the triple and add > supported OpenCL extensions for different > targets based on that. > > Sam > > -----Original Message----- > From: Anastasia Stulova [mailto:[email protected]] Sent: Thursday, > January 19, 2017 12:31 PM > To: Kalle Raiskila <[email protected]> > Cc: [email protected]; Liu, Yaxun (Sam) <[email protected]>; nd > <[email protected]> > Subject: RE: PATCH: re-enable OpenCL extensions > > As mentioned on cfe-dev as well, although it doesn't seem too critical it is > generally not logical to enable all > extensions by default because most of the targets don't even support OpenCL. > But I understand your situation with using > x86 or ARM backends in a generic way. Do you think this can be solved instead > with the new " -cl-ext=" option: > http://clang.llvm.org/docs/UsersManual.html#opencl-specific-options > > May be Sam could comment more since he has done most work with the extensions > lately. > > Cheers, > Anastasia > > -----Original Message----- > From: cfe-commits [mailto:[email protected]] On Behalf Of > Kalle Raiskila via cfe-commits > Sent: 19 January 2017 08:03 > To: [email protected] > Subject: PATCH: re-enable OpenCL extensions > > Hi, > > I noticed a change from clang 3.8 to 3.9, that it disabled all OpenCL > extension pragmas per default. > This broke pocl on e.g. ARM for LLVM 3.9 > (https://github.com/pocl/pocl/issues/409). > > Example: > $ echo "#pragma OPENCL EXTENSION cl_khr_icd: enable" > hello.cl $ clang > -emit-llvm -x cl -o tmp.bc -c hello.cl > > works fine, but: > $ clang -emit-llvm -x cl -o tmp.bc -c hello.cl > --target=armv7-unknown-linux-gnueabihf > hello.cl:1:26: warning: unsupported OpenCL extension 'cl_khr_icd' - ignoring > [-Wignored-pragmas] #pragma OPENCL > EXTENSION cl_khr_icd: enable > ^ > 1 warning generated. > > > Attached is a patch that enables OpenCL extensions for all targets per > default, and then sets the status quo of > supported extensions for those targets that currently customize their > settings (i.e. > NVPTX and AMDGPU). > Most generic CPUs can handle all OpenCL extensions just fine. > > Please keep me as CC, I am not subscribed to the list. > thanks, > kalle > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > pocl-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/pocl-devel > -- Pekka ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ pocl-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pocl-devel
