Roger Federer has announced that he has pulled out of next week's ATP Masters series tournament in Montreal.