GM is buying self-driving software to try to catch up to Google and Tesla