Remove the xla_gpu_unsafe_fallback_to_driver_on_ptxas_error flag.

PiperOrigin-RevId: 313389132
Change-Id: Ic97116d9b471e96822ee28032ce0ddef5616a4f0
This commit is contained in:
Thomas Joerg 2020-05-27 07:59:16 -07:00 committed by TensorFlower Gardener
parent 463c3055ec
commit b1a712d40d
3 changed files with 10 additions and 27 deletions

View File

@ -73,7 +73,6 @@ DebugOptions DefaultDebugOptionsIgnoringFlags() {
opts.set_xla_cpu_enable_xprof_traceme(true);
// TODO(b/155295372): disable ptxas fallback by default.
opts.set_xla_gpu_unsafe_fallback_to_driver_on_ptxas_not_found(true);
opts.set_xla_gpu_unsafe_fallback_to_driver_on_ptxas_error(false);
return opts;
}
@ -567,15 +566,6 @@ static void AllocateFlags() {
"that falling back to the driver can have drawbacks like using more "
"memory and/or other bugs during compilation, so we recommend setting "
"this flag to false."));
flag_objects->push_back(tensorflow::Flag(
"xla_gpu_unsafe_fallback_to_driver_on_ptxas_error",
bool_setter_for(
&DebugOptions::set_xla_gpu_unsafe_fallback_to_driver_on_ptxas_error),
flag_values->xla_gpu_unsafe_fallback_to_driver_on_ptxas_error(),
"If true, XLA GPU falls back to the driver if there is an error when "
"running ptxas. Note that falling back to the driver can have drawbacks "
"like using more memory and/or other bugs during compilation, so we "
"recommend setting this flag to false."));
ParseFlagsFromEnvAndDieIfUnknown("XLA_FLAGS", *flag_objects);
}

View File

@ -411,17 +411,12 @@ std::vector<uint8> NVPTXCompiler::CompileGpuAsmOrGetCachedResult(
" Use at your own risk though, it has known drawbacks like "
"increased memory consumption.";
} else {
LOG(ERROR) << "Error during compilation of ptx to sass: "
<< maybe_cubin.status();
CHECK(hlo_module_config.debug_options()
.xla_gpu_unsafe_fallback_to_driver_on_ptxas_error())
<< "There was an error when trying to compile ptx into sass "
"code. Up until May 14 2020, XLA silently ignored such "
"errors and fell back to the GPU driver. This is likely to "
"trigger subtle runtime issues and is hence discouraged. "
"If you want to temporarily restore this behavior use the "
"flag --xla_gpu_unsafe_fallback_to_driver_on_ptxas_error "
"and file a bug in b/components/366096.";
LOG(FATAL) << "ptxas returned an error during compilation of ptx "
"to sass: '"
<< maybe_cubin.status() << "' "
<< "If the error message indicates that a file could "
"not be written, please verify that sufficient "
"filesystem space is provided.";
}
// We're going to use the driver to JIT our PTX->SASS, so warn if

View File

@ -287,18 +287,16 @@ message DebugOptions {
// memory, or have bugs.
bool xla_gpu_unsafe_fallback_to_driver_on_ptxas_not_found = 138;
// It is usually preferable to not fallback to the driver; it can consume more
// memory, or have bugs.
bool xla_gpu_unsafe_fallback_to_driver_on_ptxas_error = 139;
// Next id: 141
// Extra options to pass to the compilation backend (e.g. LLVM); specific
// interpretation of these values is left to the backend.
map<string, string> xla_backend_extra_options = 500;
reserved 5, 117, 133; // were xla_hlo_dump_as_graphdef, xla_dump_to, and
// xla_gpu_use_horizontal_fusion
reserved 5, 117, 133,
139; // were xla_hlo_dump_as_graphdef, xla_dump_to,
// xla_gpu_use_horizontal_fusion, and
// xla_gpu_unsafe_fallback_to_driver_on_ptxas_error
}
// These settings control how XLA compiles and/or runs code. Not all settings