On 2013-09-09, at 2:00 , Kalle Raiskila <[email protected]> wrote: > ----- Alkuperäinen viesti ----- > Lähettäjä: Erik Schnetter <[email protected]> > Vastaanottaja: Pekka Jääskeläinen <[email protected]> > Kopio: Portable Computing Language development discussion > <[email protected]>; Kalle Raiskila <[email protected]> > Lähetetty: sunnuntai 8.syyskuuta 2013 23.53 > Aihe: Re: [pocl-devel] Triples, targets, cpus, and features... and HOST vs. > TARGET > >> The asm inline statements are gone (in Vecmathlib); it's all done via >> intrinsics and Clang extensions. > > No they are not. Some intrinsics are just inline assembly wrappers. > And e.g. lines like "atan.cc.ll: %2 = call <4 x float> > @llvm.x86.sse.sqrt.ps(<4 x float> %1) #0" > are left in the kernel.bc > Perhaps all these sort of inline assembly calls are actually defined as the > part of the minimum set that is x86_64? > But that still doesn't remove the issue. Binary distributions are compiled > with this minumum set, not with AVX.
I don't get your point here... Maybe you want to say that, although using builtins is good in general, some builtins exist only on some targets, so these builtins need to be avoided in generic code? That is true. No, there are builtins that e.g. exist only when AVX instructions are enabled. It is thus a build-time choice whether they can be used. >> Some CPU attributes influence the ABI. These need to be set correctly at all >> times, otherwise the executable won't work. This influences e.g. the calling >> conventions for functions, which > is explicitly represented in bytecode. >> That is, a fully generic bytecode library is not possible, but we may be >> able to get away with using just a few per architecture. > > But these ABIs and calling conventions are internal to the OCL kernel. The > only place we need to worry about it is in the call to the __kernel function. > And that is never one of the functions in the runtime kernel library. (right?) The ABI is used within the kernel, within the kernel library, and to call the kernel library from the kernel. Thus both kernel and kernel library must be built with the same ABI. There are also performance issues. ABI differences are usually introduced because they give better performance. In this case, we do want the "best possible" ABI for a particular CPU, not the "safe default choice" one would use in a binary Linux distribution. -erik -- Erik Schnetter <[email protected]> http://www.perimeterinstitute.ca/personal/eschnetter/ My email is as private as my paper mail. I therefore support encrypting and signing email messages. Get my PGP key from http://pgp.mit.edu/.
signature.asc
Description: Message signed with OpenPGP using GPGMail
------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________ pocl-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pocl-devel
