reorder UOps.DEFINE_VAR in runtime [run_process_replay] (#5659)

prep rewrite SPECIAL using DEFINE_VAR
This commit is contained in:
chenyu 2024-07-23 14:32:10 -04:00 committed by GitHub
commit fdc72ba102
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 13 deletions

View file

@ -84,10 +84,8 @@ class PythonProgram:
elif uop is UOps.DEFINE_VAR:
ul[i] = [pvals.pop(0)] * warp_size
elif uop is UOps.SPECIAL:
if arg[1][0] == 'g':
ul[i] = [idxs[2-arg[0]]] * warp_size
elif arg[1][0] == 'l':
ul[i] = [x[2-arg[0]] for x in warp]
if arg[1][0] == 'g': ul[i] = [idxs[2-arg[0]]] * warp_size
elif arg[1][0] == 'l': ul[i] = [x[2-arg[0]] for x in warp]
elif uop is UOps.CONST:
ul[i] = [[arg] * warp_size for _ in range(dtype.count)] if dtype.count > 1 else [arg] * warp_size
elif uop is UOps.DEFINE_ACC: