Skip to content

Commit

Permalink
Disable lazy backend tests if LTC is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniojkim committed Aug 12, 2022
1 parent b1276ea commit 09a605f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ endif()

option(TORCH_MLIR_ENABLE_LTC "Enables LTC backend" ON)

if(TORCH_MLIR_ENABLE_LTC)
set(ENV{TORCH_MLIR_ENABLE_LTC} 1)
else()
set(ENV{TORCH_MLIR_ENABLE_LTC} 0)
endif()

torch_mlir_add_llvm_external_project(
torch-mlir-dialects
TORCH_MLIR_DIALECTS
Expand Down
3 changes: 3 additions & 0 deletions python/test/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
# directories.
config.excludes = ['lit.cfg.py', 'Inputs', 'Examples', 'CMakeLists.txt', 'README.txt', 'LICENSE.txt']

if bool(int(os.environ.get("TORCH_MLIR_ENABLE_LTC", 0))):
config.excludes.append("lazy_backend")

# test_source_root: The root path where tests are located.
config.test_source_root = os.path.dirname(__file__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ std::ostream& string_join(std::ostream& out, const std::vector<T>& v, const std:
if ((i++) > 0) { out << delimiter; }
out << e;
}
return out;
}

template <typename T>
Expand Down

0 comments on commit 09a605f

Please sign in to comment.