amd/registers: expose the canonicalize.py program as a function