add store to buffer's addrspace (#16468)

This commit is contained in:
George Hotz 2026-06-01 22:07:43 -07:00 committed by GitHub
commit 7d8ed8d4d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -766,7 +766,7 @@ class UOp(OpMixin, metaclass=UOpMetaClass):
if self.op is Ops.DEFINE_LOCAL: return AddrSpace.LOCAL
if self.op is Ops.DEFINE_REG: return AddrSpace.REG
if self.op is Ops.LOAD: return AddrSpace.ANON # LOAD brings things into anonymous registers
if self.op in {Ops.INDEX, Ops.CAST, Ops.AFTER, Ops.REDUCE, Ops.GEP}:
if self.op in {Ops.INDEX, Ops.CAST, Ops.AFTER, Ops.REDUCE, Ops.GEP, Ops.STORE}:
return self.src[0].addrspace
if self.op in GroupOp.Movement: return self.src[0].addrspace
if self.op in {Ops.STACK, Ops.WMMA} or self.op in GroupOp.Elementwise: