Skip to content

Commit

Permalink
Merge branch 'openxla:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
sdasgup3 authored Mar 15, 2024
2 parents 98b6c85 + dc4bc72 commit 988ec5c
Show file tree
Hide file tree
Showing 116 changed files with 9,685 additions and 2,602 deletions.
11 changes: 11 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,14 @@ build --features=layering_check
# Set the default compiler to the `clang` binary on the `PATH`.
# TODO(fzakaria): Make this a toolchain or hermetic somehow
build --repo_env=CC=clang

# Disabling runfiles links drastically increases performance in slow disk IO situations
# Do not build runfile trees by default. If an execution strategy relies on runfile
# symlink tree, the tree is created on-demand. See: https://github.com/bazelbuild/bazel/issues/6627
# and https://github.com/bazelbuild/bazel/commit/03246077f948f2790a83520e7dccc2625650e6df
build --nobuild_runfile_links
test --nobuild_runfile_links

# https://bazel.build/reference/command-line-reference#flag--legacy_external_runfiles
build --nolegacy_external_runfiles
test --nolegacy_external_runfiles
4 changes: 3 additions & 1 deletion .github/workflows/buildAndTestBazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ jobs:
uses: actions/cache@v3
with:
path: "~/.cache/bazel"
key: ${{ runner.os }}-stablehlo_build_assets-${{ steps.llvm-version.outputs.version }}-bazelbuild
key: ${{ runner.os }}-stablehlo_bazelbuild-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE', 'WORKSPACE.bazel', 'MODULE.bazel') }}
restore-keys: |
${{ runner.os }}-stablehlo_bazelbuild-
- name: Build StableHLO
shell: bash
Expand Down
8 changes: 8 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ cc_library(
":reference_ops",
":reference_process",
":reference_scope",
":reference_tensor",
":reference_value",
":register",
"@llvm-project//llvm:Support",
Expand Down Expand Up @@ -927,10 +928,13 @@ cc_library(
srcs = [
"stablehlo/transforms/ChloLegalizeToStablehlo.cpp",
"stablehlo/transforms/PassPipelines.cpp",
"stablehlo/transforms/ShapeLegalizeToStablehlo.cpp",
"stablehlo/transforms/StablehloAggressiveSimplification.cpp",
"stablehlo/transforms/StablehloCanonicalizeDynamism.cpp",
"stablehlo/transforms/StablehloInstrumentWithProbe.cpp",
"stablehlo/transforms/StablehloLegalizeCompositeToCall.cpp",
"stablehlo/transforms/StablehloLegalizeToVhlo.cpp",
"stablehlo/transforms/StablehloRefineArguments.cpp",
"stablehlo/transforms/StablehloRefineShapes.cpp",
"stablehlo/transforms/VhloLegalizeToStablehlo.cpp",
"stablehlo/transforms/VhloToVersion.cpp",
Expand All @@ -955,6 +959,8 @@ cc_library(
":vhlo_ops",
":vhlo_types",
"@llvm-project//llvm:Support",
"@llvm-project//mlir:ArithDialect",
"@llvm-project//mlir:AsmParser",
"@llvm-project//mlir:CommonFolders",
"@llvm-project//mlir:ComplexDialect",
"@llvm-project//mlir:FuncDialect",
Expand Down Expand Up @@ -1031,6 +1037,7 @@ cc_library(
":base",
":stablehlo_assembly_format",
"@llvm-project//llvm:Support",
"@llvm-project//mlir:FuncDialect",
"@llvm-project//mlir:IR",
"@llvm-project//mlir:InferTypeOpInterface",
"@llvm-project//mlir:QuantOps",
Expand Down Expand Up @@ -1127,6 +1134,7 @@ cc_binary(
":register",
":stablehlo_passes",
":tosa_passes",
"//stablehlo/tests:check_ops",
"//stablehlo/tests:test_utils",
"@llvm-project//mlir:AllExtensions",
"@llvm-project//mlir:AllPassesAndDialects",
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,4 @@ add_custom_target(check-stablehlo-quick)
add_dependencies(check-stablehlo-ci check-stablehlo-quick)

add_subdirectory(stablehlo)
add_subdirectory(examples)
24 changes: 24 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"version": 6,
"configurePresets": [
{
"name": "debug",
"displayName": "Debug w/ ccache",
"generator": "Ninja",
"binaryDir": "build/",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"LLVM_ENABLE_ASSERTIONS": "ON",
"LLVM_ENABLE_LLD": "ON",
"STABLEHLO_ENABLE_BINDINGS_PYTHON" : "OFF",
"STABLEHLO_ENABLE_SPLIT_DWARF": "ON",
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache",
"CMAKE_CXX_COMPILER": "clang++",
"CMAKE_C_COMPILER_LAUNCHER": "ccache",
"CMAKE_C_COMPILER": "clang",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"MLIR_DIR": "${sourceDir}/llvm-build/lib/cmake/mlir"
}
}
]
}
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ threatening or harassing, report it. We are dedicated to providing an environmen
where participants feel welcome and safe.

Reports should be directed to StableHLO's Project Stewards,
Thea Lamkin (thealamkin@google.com) and Eugene Burmako (burmako@google.com).
Kevin Gleason (gleasonk@google.com) and Farid Zakaria (fmzakari@google.com).
It is the Project Steward’s duty to receive and address reported violations of
the code of conduct.

Expand Down
Loading

0 comments on commit 988ec5c

Please sign in to comment.