eholk / harlan

A language for GPU computing.
Other
1.19k stars 82 forks source link

global-id primitive #30

Open calvis opened 12 years ago

calvis commented 12 years ago

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.

eholk commented 12 years ago

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.

calvis commented 12 years ago

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.