My teacher said, "There isn't any difference between all and whole. They are synonyms."Although they are synonyms, they are used differently. For example, while you might say "I can't believe I ate the whole thing" you wouldn't say "I can't believe I ate the all thing".
If there is deffinite article "The", use whole, otherwise use all.