[go: nahoru, domu]

Skip to content

Commit

Permalink
Refactor llvm_compiler_test.
Browse files Browse the repository at this point in the history
We can run the CpuCompiler and GPUCompiler related tests in separate test
targets.

PiperOrigin-RevId: 644307904
  • Loading branch information
akuegel authored and tensorflower-gardener committed Jun 19, 2024
1 parent 80059e4 commit 476dec8
Show file tree
Hide file tree
Showing 29 changed files with 491 additions and 1,154 deletions.
3 changes: 2 additions & 1 deletion third_party/xla/third_party/tsl/tsl/platform/env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,8 @@ absl::Status Env::HasAtomicMove(const string& path, bool* has_atomic_move) {
return fs->HasAtomicMove(path, has_atomic_move);
}

Status Env::CanCreateTempFile(const string& fname, bool* can_create_temp_file) {
absl::Status Env::CanCreateTempFile(const string& fname,
bool* can_create_temp_file) {
FileSystem* fs;
TF_RETURN_IF_ERROR(GetFileSystemForFile(fname, &fs));
return fs->CanCreateTempFile(fname, can_create_temp_file);
Expand Down
4 changes: 2 additions & 2 deletions third_party/xla/third_party/tsl/tsl/platform/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ class Env {
/// If this returns false, TensorFlow will write directly to output files
/// instead of creating a temporary file and swapping it in. This may mean
/// that incomplete writes are visible to consumers.
Status CanCreateTempFile(const std::string& fname,
bool* can_create_temp_file);
absl::Status CanCreateTempFile(const std::string& fname,
bool* can_create_temp_file);

/// Stores the size of `fname` in `*file_size`.
absl::Status GetFileSize(const std::string& fname, uint64* file_size);
Expand Down
6 changes: 3 additions & 3 deletions third_party/xla/third_party/tsl/tsl/platform/file_system.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ absl::Status FileSystem::HasAtomicMove(const string& path,
return absl::OkStatus();
}

Status FileSystem::CanCreateTempFile(const std::string& fname,
bool* can_create_temp_file) {
absl::Status FileSystem::CanCreateTempFile(const std::string& fname,
bool* can_create_temp_file) {
*can_create_temp_file = true;
return OkStatus();
return absl::OkStatus();
}

void FileSystem::FlushCaches(TransactionToken* token) {}
Expand Down
4 changes: 2 additions & 2 deletions third_party/xla/third_party/tsl/tsl/platform/file_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ class FileSystem {
/// to determine if there needs to be a temp location to safely write objects.
/// If the file system cannot create a temp file, it's possibile that
/// uncomplete result may appear in the given file.
virtual Status CanCreateTempFile(const std::string& fname,
bool* can_create_temp_file);
virtual absl::Status CanCreateTempFile(const std::string& fname,
bool* can_create_temp_file);

/// \brief Flushes any cached filesystem objects from memory.
virtual void FlushCaches() { FlushCaches(nullptr); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ class RetryingFileSystem : public FileSystem {
return base_file_system_->HasAtomicMove(path, has_atomic_move);
}

Status CanCreateTempFile(const std::string& fname,
bool* can_create_temp_file) override {
absl::Status CanCreateTempFile(const std::string& fname,
bool* can_create_temp_file) override {
// this method does not need to be retried
return base_file_system_->CanCreateTempFile(fname, can_create_temp_file);
}
Expand Down
1 change: 0 additions & 1 deletion third_party/xla/xla/client/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ filegroup(

cc_library(
name = "global_data",
srcs = ["global_data.cc"],
hdrs = ["global_data.h"],
deps = [
"//xla:types",
Expand Down
Loading

0 comments on commit 476dec8

Please sign in to comment.