Dnia 2013-09-09, pon o godzinie 21:01 +0200, Jerome Kieffer pisze: > On Mon, 09 Sep 2013 19:39:25 +0200 > Tomasz Rybak <tomasz.ry...@post.pl> wrote: > > > [cut] > > You can pass architecture (option "arch"), e.g. sm_21, to compiler. > > Unfortunately it seems that many high-level functionalities, > > including GPUArray, do not allow for passing this argument > > through to pycuda.compiler.compile. > > > > Question to the group - can you see any (easy) way of extending > > PyCUDA to allow for this? > > > > The easiest way for now would be to change line 209 in > > pycuda/compiler.py, in function compile(). > > Instead of > > arch = "sm_%d%d" % Context.get_device().compute_capability() > > put > > arch = "sm_10" > > or the highest computing capability you want that works. > > I tried something like this: > > if arch is None: > try: > from pycuda.driver import Context > arch = "sm_%d%d" % Context.get_device().compute_capability() > if "PYCUDA_MAX_CC" in os.environ: > arch = min(arch,os.environ["PYCUDA_MAX_CC"]) > except RuntimeError: > pass > > > But it failed somewhere else :( > > Well I tested with CC=10,20,21,22 and 23 (by the way, 22 and 23 have never > been described officially) >
Sorry for long silence. I've experimented a bit on GeForce 460 (CC 2.1) - I do not have access to anything newer. Instead of changing arch in compile(), I've changed it in SourceModule. Basically it looks like changing architecture only works when one keeps major version the same as hardware - I was not able to force PyCUDA to work with arch="sm_10", but succeeded with arch="sm_20". You might try with CC=30 - if it does not work I'm out of ideas. Best regards. -- Tomasz Rybak GPG/PGP key ID: 2AD5 9860 Fingerprint A481 824E 7DD3 9C0E C40A 488E C654 FB33 2AD5 9860 http://member.acm.org/~tomaszrybak
signature.asc
Description: This is a digitally signed message part
_______________________________________________ PyCUDA mailing list PyCUDA@tiker.net http://lists.tiker.net/listinfo/pycuda