Edit: I read the question wrong.
Many coolers fit a broad range of CPU's, you need to match the cooler to your socket, however SOME motherboards are tight so some coolers could interfere with heatsinks or even memory slots, and you need to be careful of this. There is no formula for this. Its hard to say for sure but asking the question here is helpful as some guys may have tried a cooler on a board and found it to not fit right.
The CPU cooler you chose has no relation to the GPU, you don't need to worry about that.