I am also suffering from this exact problem. Originally with a late 2013 MBPr, which had the problem from the outset, it took me almost a year of fighting Apple (2 full logic board + display replacements, clean OSX installs to prove it was not software related, several visits to the Genius Bar, local reseller and numerous long calls to AppleCare) to get acceptance and a replacement unit.
I received that replacement 2015 MBPr this week and it amazingly suffers the same problem.
This originally lead me back to believing that it could be a software issue causing the flicker, it's the same pattern as the posts above, put the machine under stress and the discreet GPU switches to the dedicated and there's a millisecond flicker, usually the top half of the screen. However, this is a fresh install, minimal software and I ran the last machine through clean installs.
The only conclusion I can draw is this is a deeper routed OSX problem, perhaps they haven't figured out how to perfectly hand off the screen from one GPU to the other and the result is the occasional flicker. I'm dealing with it for now as the amount of effort exuded on getting them to validate the replacement wasn't worth it.