Split single compiler into modular platform and device compilers