override gcc version in cuda related test (#38675)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/38675
Test Plan: Imported from OSS
Differential Revision: D21626921
Pulled By: glaringlee
fbshipit-source-id: b645845aa831cb64078fe2309881038138abb443