Templated support for DOGE
Merged upstream/develop to raf-dev
Revert "Merged upstream/develop to raf-dev"

This reverts commit d0719bc885d1b0f4c6b9db74b992bfd5caf3c9d0, reversing
changes made to 39864d1a832b1719189337bd4041a89f0d47eb2d.