harlan icon indicating copy to clipboard operation
harlan copied to clipboard

global-id primitive

Open calvis opened this issue 13 years ago • 2 comments

During optimization/fusing, we have to walk the kernel body to replace references to get-global-id when the dimension of the argument changes. It would be helpful if we could just refer to (global-id var), a primitive that could be expanded during make-vector-refs-explicit or something.

calvis avatar Apr 28 '12 17:04 calvis

This was basically to let us inline iota, which we managed to do already. I'm closing the issue for now, and we can reopen it if it seems like we need it later.

eholk avatar Jun 05 '12 18:06 eholk

No, I made this issue after inlining iota. This is when an iota is an argument to an inner kernel that is bumped up in dimension during fusion. We're walking the body looking for calls to global-id, which is pretty awful.

calvis avatar Jun 05 '12 18:06 calvis