message: Rename a variable for clarify and fix a comment typo.
diff: @@ -228,27 +228,27 @@ bool MaybeLoadPtxFromFile(const HloModule* module, std::string* ptx) {
  // If the xla_gpu_ptx_file options is set, be explicit when a file is used
  // and warn when a file is not used to ease catching typo in filename.
  std::string prefix = xla::FilenameFor(*module, *ptx);
  - std::string ptx_filename;
  + std::string matched_filename;
  for (const string filename : module->config().debug_options().xla_gpu_ptx_file()) {
  - // To ease comparing many PTX versions, accept different suffix then
  + // To ease comparing many PTX versions, accept different suffixes then
  // the original filename.
  if(absl::StartsWith(filename, prefix)) {
  - ptx_filename = filename;
  + matched_filename = filename;
  VLOG(0) << "RunBackend() - Will load PTX from file: " << filename;
  break;
  }
  }
  if (module->config().debug_options().xla_gpu_ptx_file().size() > 0 &&
  - ptx_filename.empty()) {
  + matched_filename.empty()) {
  VLOG(0) << "RunBackend() - For module with prefix '" << prefix
  << "', we did not found a PTX file to load.";
  }
  - if(!ptx_filename.empty()) {
  - std::ifstream ifs(ptx_filename, std::ifstream::in);
  + if(!matched_filename.empty()) {
  + std::ifstream ifs(matched_filename, std::ifstream::in);
  *ptx = std::string(std::istreambuf_iterator<char>(ifs),
  std::istreambuf_iterator<char>());
  - CHECK(!ptx->empty()) << "Empty or non existing PTX file: " << ptx_filename;
  + CHECK(!ptx->empty()) << "Empty or non existing PTX file: " << matched_filename;
  return true;
  }
  return false;
  