message: Only print the ptxas not found if the error code is NOT_FOUND.
  In other error cases, print the error status instead.
diff: @@ -383,7 +383,6 @@ std::vector<uint8> NVPTXCompiler::CompileGpuAsmOrGetCachedResult(
  VLOG(2) << "Compiled PTX size:" << ptx.size()
  << " CUBIN size: " << cache_value->cubin_data.size();
  } else {
  - bool log_warning = true;
  if (maybe_cubin.status().code() ==
  tensorflow::error::Code::NOT_FOUND) {
  // Missing ptxas is expected in some environments where CUDA SDK
  @@ -393,16 +392,21 @@ std::vector<uint8> NVPTXCompiler::CompileGpuAsmOrGetCachedResult(
  // TODO(jlebar): we should implement a LOG_FIRST_N and LOG_EVERY_N
  // for more general usage.
  static std::atomic<bool> warning_done(false);
  - log_warning = !warning_done.exchange(true);
  - }
  + bool log_warning = !warning_done.exchange(true);
  if (log_warning) {
  PrintCantFindCudaMessage(
  - "Can't find ptxas binary in ${CUDA_DIR}/bin. Will back to the "
  - "GPU driver for PTX -> sass compilation. This is OK so long "
  - "as you don't see a warning below about an out-of-date driver "
  - "version. Custom ptxas location can be specified using $PATH.",
  + "Can't find ptxas binary in ${CUDA_DIR}/bin. Will back to "
  + "the GPU driver for PTX -> sass compilation. This is OK so "
  + "long as you don't see a warning below about an out-of-date "
  + "driver version. Custom ptxas location can be specified "
  + "using $PATH.",
  hlo_module_config);
  }
  + } else {
  + LOG(ERROR) << "Error during compilation of ptx to sass: "
  + << maybe_cubin.status()
  + << ". Falling back to the GPU driver.";
  + }
  // We're going to use the driver to JIT our PTX->SASS, so warn if
  // the JIT in the driver has known bugs.
  