Emit grid wrapper inlined with the user defined triton kernel (#120824)
Fixes #120801
Pull Request resolved: https://github.com/pytorch/pytorch/pull/120824
Approved by: https://github.com/chenyang78, https://github.com/jansel
ghstack dependencies: #120809