[XLA:GPU] Warn on more broken CUDA versions.

We've received additional data on which CUDA versions contain a ptx
assembler bug that affects XLA.  Warn if you're using any of these.

PiperOrigin-RevId: 182675055
This commit is contained in:
Justin Lebar 2018-01-20 18:13:15 -08:00 committed by TensorFlower Gardener
parent b239206701
commit e00ba24c40

View File

@ -281,14 +281,16 @@ void WarnIfBadPtxasVersion(const string& ptxas_path) {
return; return;
} }
// ptxas 9.0 before 9.0.276 miscompiles some address calculations with large // ptxas 9.0 before 9.0.276 and ptxas 9.1 before 9.1.121 miscompile some
// offsets (e.g. "load ptr + large_constant"), b/70245379. // address calculations with large offsets (e.g. "load ptr + large_constant"),
if (vmaj == 9 && vmin == 0 && vdot < 276) { // b/70245379.
if ((vmaj == 9 && vmin == 0 && vdot < 276) ||
(vmaj == 9 && vmin == 1 && vdot < 121)) {
LOG(WARNING) << "*** WARNING *** You are using ptxas " << vmaj << "." LOG(WARNING) << "*** WARNING *** You are using ptxas " << vmaj << "."
<< vmin << "." << vdot << vmin << "." << vdot
<< ", which is in range [9.0.0, 9.0.276). These versions are " << ", which is in range [9.0.0, 9.0.276) + [9.1.0, 9.1.121). "
"known to miscompile XLA code, leading to incorrect " "These versions are known to miscompile XLA code, leading "
"results or invalid-address errors."; "to incorrect results or invalid-address errors.";
} }
} }
@ -309,16 +311,24 @@ void WarnIfBadDriverJITVersion() {
} }
se::cuda::DriverVersion version = version_or_status.ValueOrDie(); se::cuda::DriverVersion version = version_or_status.ValueOrDie();
// The driver JIT in 384 before 384.108 miscompiles some address // The following versions of the driver JIT miscompile some address
// calculations with large offsets (e.g. "load ptr + large_constant"), // calculations with large offsets (e.g. "load ptr + large_constant"),
// b/70245379. // b/70245379:
if (std::get<0>(version) == 384 && std::get<1>(version) < 108) { //
// - 384.x before 384.108
// - 387.x before 387.40
// - 390.x before 390.10.
auto vmaj = std::get<0>(version);
auto vmin = std::get<1>(version);
if ((vmaj == 384 && vmin < 108) || //
(vmaj == 387 && vmin < 40) || //
(vmaj == 390 && vmin < 10)) {
LOG(WARNING) LOG(WARNING)
<< "*** WARNING *** Invoking the PTX->SASS JIT from driver version " << "*** WARNING *** Invoking the PTX->SASS JIT from driver version "
<< se::cuda::DriverVersionToString(version) << se::cuda::DriverVersionToString(version)
<< ", which is in range [384.0.0, 384.108.0). These versions are " << ", which is in range [384.0.0, 384.108.0) + [387.0.0, 387.40.0) + "
"known to miscompile XLA code, leading to incorrect results or " "[390.0.0, 390.10.0). These versions are known to miscompile XLA "
"invalid-address errors."; "code, leading to incorrect results or invalid-address errors.";
} }
}); });
} }