add global variable for platform and device in global.h