[XLA:GPU] Fix old-ptxas-version detection logic.

This was completely broken for CUDA versions > 9 and resulted in spurious warnings.

Reported in #22706#issuecomment-426861394 -- thank you!

PiperOrigin-RevId: 215841354
This commit is contained in:
Justin Lebar 2018-10-04 18:46:53 -07:00 committed by TensorFlower Gardener
parent 4a00f2fc65
commit 83ff640fa5

View File

@ -401,7 +401,7 @@ void WarnIfBadPtxasVersion(const string& ptxas_path) {
"prefers >= 9.2.88). Compilation of XLA kernels below will likely " "prefers >= 9.2.88). Compilation of XLA kernels below will likely "
"fail.\n\nYou do not need to update CUDA; cherry-picking the ptxas " "fail.\n\nYou do not need to update CUDA; cherry-picking the ptxas "
"binary is sufficient."; "binary is sufficient.";
} else if ((vmaj < 9 || vmin < 2 || vdot < 88)) { } else if (std::make_tuple(vmaj, vmin, vdot) < std::make_tuple(9, 2, 88)) {
LOG(WARNING) LOG(WARNING)
<< "*** WARNING *** You are using ptxas " << vmaj << "." << vmin << "." << "*** WARNING *** You are using ptxas " << vmaj << "." << vmin << "."
<< vdot << vdot