You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NameError: global name 'xrange' is not defined in Python 3 - and solution proposal #14725
I think we use from six.moves import xrange elsewhere in the codebase to handle this incompatibility, without the potential for a performance regression on Python 2.7. Any file that uses xrange() should have this import at the top.
I think we use from six.moves import xrange elsewhere in the codebase to handle this incompatibility, without the potential for a performance regression on Python 2.7. Any file that uses xrange() should have this import at the top.
I think we use from six.moves import xrange elsewhere in the codebase to handle this incompatibility, without the potential for a performance regression on Python 2.7. Any file that uses xrange() should have this import at the top.
Activity
mrry commentedon Nov 20, 2017
I think we use
from six.moves import xrangeelsewhere in the codebase to handle this incompatibility, without the potential for a performance regression on Python 2.7. Any file that usesxrange()should have this import at the top.guyko81 commentedon Nov 20, 2017
It didn't work for me, that's why I used this workaround.
sshrdp commentedon Nov 20, 2017
This issue has already been fixed (cc2030d) but unfortunately didn't make it to 1.4.
guyko81 commentedon Nov 21, 2017
oh, thank you then :)
neel17 commentedon Dec 19, 2018
You can try to change the code line 44 in
for i in xrange(self.num_pages):change it to
for i in list(range(self.num_pages)):I hope this should work and kindly restart your python before running the code.
SUNILARAVA commentedon Jan 25, 2020
Thanks it worked for Python 2.7
ManuelNevado commentedon Dec 17, 2020
Thanks it worked for me :)
PR #14725: [XLA:GPU] Lowering FusedMHABackward thunk to command buffer
PR #14725: [XLA:GPU] Lowering FusedMHABackward thunk to command buffer
PR #14725: [XLA:GPU] Lowering FusedMHABackward thunk to command buffer