Whoops, forgot to send to the list. I'll remember one day. Ian ________________________________________ From: Andreas Klöckner [[email protected]] Sent: Wednesday, 20 May 2009 11:43 AM To: Ian Cullinan Subject: Re: [PyCuda] Why are Function.lmem, Function.smem, and Function.registers deprecated?
I'm torn. Doing it the attribute way here would create an inconsistency with Device.get_attribute(), too. Any more opinions? Andreas On Dienstag 19 Mai 2009, you wrote: > IMHO, it seems somewhat un-Pythonic to have to call a method (with a > magic-number-flag argument, no less) to access an attribute of an object, > when it could be just an attribute. I don't see any advantage to the > function-call way of doing things except that it more closely mirrors the > CUDA API - but the API looks like that because of a limitation of C, not > because it's a good way to do things. > > If you want to have only one way to do it, drop the ugly function-and-flags > way. > > Just my 2c, > > Ian Cullinan > ________________________________________ > From: [email protected] [[email protected]] On Behalf Of > Andreas Klöckner [[email protected]] Sent: Wednesday, 20 May 2009 > 9:10 AM > To: [email protected] > Subject: Re: [PyCuda] Why are Function.lmem, Function.smem, and > Function.registers deprecated? > > On Dienstag 19 Mai 2009, Bryan Catanzaro wrote: > > I was browsing the documentation and saw the note that > > pycuda.driver.Function.registers, etc. are deprecated and will be > > removed in PyCuda 0.94. That makes me a little sad, as that > > information is very useful to one of the projects I'm working on. The > > implication in the documentation is that this is Cuda 2.2's fault. > > But I'm a little confused as to why - the .cubin files produced by my > > nvcc 2.2 compiler still have that information, so I must be missing > > something important here... What changed to make these useful > > attributes deprecated? > > No, it's different--things are getting better, not worse! :) > > CUDA 2.2 introduces an official API to find these values: > http://is.gd/Bscw > > So, if you're running 0.93 against 2.2, you'll get a deprecation warning > for using .registers etc. The goal is to keep with the Zen of Python: > > There should be one-- and preferably only one --obvious way to do it. > > Since CUDA 2.2 brought us a second way, the first one gets deprecated. If > this meets enough resistance, I guess I could be convinced to keep > .registers et al around. I'd rather not though. On 2.2, all .registers does > now is call the new API anyway. > > I've added a note to the docs about what the "new way" is. > > Andreas _______________________________________________ PyCuda mailing list [email protected] http://tiker.net/mailman/listinfo/pycuda_tiker.net
