You can write a module toggle os.platform (), and then run a command for each os to capture GPU information as follows:
// Mac OS: system_profiler | grep GeForce // Windows: wmic path win32_VideoController get name // Linux: sudo lshw -C display
source share