Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
6687498
Added pattern rewriter and lit tests for Torch::HigherOrderFlexAttent…
keshavvinayak01 Nov 26, 2025
d4d4074
EOL added to lit
keshavvinayak01 Nov 26, 2025
b1feb97
Redundant change (Another PR)
keshavvinayak01 Nov 26, 2025
4c66033
Added Dynamic Head NYI check
keshavvinayak01 Nov 27, 2025
690d8b0
missing scope resiultion
keshavvinayak01 Nov 27, 2025
c6b9868
Added CHECK-NOT statements for no func references
keshavvinayak01 Dec 23, 2025
3820c28
Simplified FileCheck statements
keshavvinayak01 Dec 23, 2025
6eba854
Added verbose comments explaining computeDynamicSizes utility
keshavvinayak01 Dec 23, 2025
d0c09b3
Replaced Splat with linalg::fill
keshavvinayak01 Dec 23, 2025
115116f
SplatOp handles dynamic shapes
keshavvinayak01 Dec 23, 2025
930182d
Merge remote-tracking branch 'personal/users/keshavvinayak01/linalgex…
keshavvinayak01 Jan 16, 2026
3c0187e
Added toggle for using useexp2 for onlineAttention Decomposition
keshavvinayak01 Nov 27, 2025
f14f00b
Added useExp2 as pass option to DecomposeAttention
keshavvinayak01 Nov 27, 2025
d3845c4
Removed Typo
keshavvinayak01 Nov 27, 2025
9c36968
Simplified FileChecks; Added check of log2e vs 1.0 scaling
keshavvinayak01 Dec 16, 2025
2b7083f
Newline at EOF
keshavvinayak01 Dec 16, 2025
a4dfdfa
Mask scaling is conditional to useExp2
keshavvinayak01 Dec 16, 2025
d80d115
Bug in code: Overwriting the existing DecompositionAttr, we want to a…
keshavvinayak01 Dec 16, 2025
dabdd86
Added docs for Decomposition Configuration:
keshavvinayak01 Dec 16, 2025
2dde237
Nit comment
keshavvinayak01 Dec 16, 2025
4972d7a
Refactor computeSubAndExp2 to computeSubAndExp
keshavvinayak01 Dec 23, 2025
162dcf4
Formatting
keshavvinayak01 Dec 23, 2025
354c71a
Integrate llvm-project@f9a8096067 [ours 31f0e3e644] (#23101)
krzysz00 Jan 13, 2026
dd4c159
[NFC] Add tablegen_compile_commands.yml to .gitignore (#23104)
krzysz00 Jan 13, 2026
4f866d4
[Stream] Handle all stream tensor ops in UnifyEncodingForGlobals (#23…
hanhanW Jan 13, 2026
91c344f
Unifying VM testing infrastructure to allow better scaling. (#23099)
benvanik Jan 13, 2026
47b5511
[Preprocessing] Refine checks in ConvertConvFilterToChannelsLast (#23…
yzhang93 Jan 13, 2026
de9fddb
Update iree-test-suites (#23112)
amd-eochoalo Jan 13, 2026
1e45fd4
[LLVMGPU] Handle mixed-precision matmuls by returning nullopt (#23116)
IanWood1 Jan 13, 2026
4a82fc2
Move SinkTransposeThroughPad preprocessing pass to PropagateLinalgTra…
yzhang93 Jan 14, 2026
cf770a7
[Encoding] Add dynamic encoding dims to (Un)SetEncodingOp (#22907)
jtuyls Jan 14, 2026
7be5671
Reapply "[GPU][Codegen] Expand iteration space based on new `expand_d…
efric Jan 14, 2026
7c47359
[LinalgExt] Implement generateScalarImplementation for map_gather (#2…
Abhishek-Varma Jan 14, 2026
c4b6725
[GPU] Account for scale operands in shared memory calculation (#23111)
Yu-Zhewen Jan 14, 2026
d585465
Adding vm.optimization_barrier and on-demand ordinal analysis. (#23115)
benvanik Jan 14, 2026
4fa4196
Adding SplitParameterEncoderPass and iree-encode-parameters. (#22814)
benvanik Jan 14, 2026
e440a88
Bump sarisia/actions-status-discord from 1.15.5 to 1.16.0 in the gith…
dependabot[bot] Jan 14, 2026
5b7ceb2
Adding libFuzzer-based fuzzing infrastructure. (#23122)
benvanik Jan 14, 2026
bde140b
[Docs] Add `iree-fusilli-write` team to contributing doc (#23107)
sjain-stanford Jan 14, 2026
5a68681
[GPU] Remove slice guard when doing pad producer fusion in FuseAndHoi…
nirvedhmeshram Jan 14, 2026
ff055cc
[LinalgExt] Add map_gather e2e tests for CPU/VMVX/ROCM (#23124)
Abhishek-Varma Jan 15, 2026
511ce88
Revert "[GPU] Remove slice guard when doing pad producer fusion in Fu…
Groverkss Jan 15, 2026
9e2efd4
[Codegen] Implement reshape propagation by expansion for inner_tiled …
Max191 Jan 15, 2026
06ecabd
Reapply [GPU] Remove slice guard when doing pad producer fusion in Fu…
nirvedhmeshram Jan 15, 2026
7dddeb2
Enforce braces in plugins and bindings. NFC. 1/n (#23143)
kuhar Jan 15, 2026
b7a46df
[bazel][NFC] Add `# keep sorted` to enforce_glob calls in BUILD.bazel…
hanhanW Jan 15, 2026
dc3cf93
Add braces in Codegen/Common (core). NFC. 2/n (#23144)
kuhar Jan 15, 2026
dbfa48e
Add braces in Codegen backends (GPU/CPU/SPIRV). NFC. 3/n (#23145)
kuhar Jan 15, 2026
bf6b22b
Add braces in Flow, HAL, and Stream dialects. NFC. 4/n (#23146)
kuhar Jan 15, 2026
3884ee6
Add braces in Util, VM, and supporting dialects. NFC. 5/n (#23147)
kuhar Jan 15, 2026
4da5287
Add braces in API, Bindings, and infrastructure code. NFC. 6/n (#23148)
kuhar Jan 15, 2026
5287d0d
Enforce braces around control flow statements in clang-format. 7/7. (…
kuhar Jan 15, 2026
1e3ee62
Reapply "[Util] Implement InferIntDivisibilityOpInterface for affine …
Max191 Jan 15, 2026
edb0411
[Samples] Fix hal.executable.export syntax in custom dispatch samples…
hanhanW Jan 15, 2026
f650b08
[Codegen][MXFP4] Add attribute to lowering_config for XOR swizzle sup…
Muzammiluddin-Syed-ECE Jan 15, 2026
312c7a6
Implement to-nearest-even for denormals (#23134)
bjacob Jan 15, 2026
676c0ac
Disable bf16 ukernel Clang workaround on newer Clang. (#23071)
bjacob Jan 15, 2026
331a3d0
[CI] Update iree-test-suite (#23135)
amd-eochoalo Jan 15, 2026
71c48c8
[CI] Add rdna4 / gfx1201 / r9700 tests (#23156)
kuhar Jan 16, 2026
3d20ed0
[Codegen][MXFP4] Add folding patterns for tensor.empty op that can by…
Muzammiluddin-Syed-ECE Jan 16, 2026
1cb1cf6
[Codegen][MXFP4] Adding SwizzleHintOp alloc flattening pass (#23083)
Muzammiluddin-Syed-ECE Jan 16, 2026
68284a2
Add build flag to enable reverse iteration over llvm maps (#23161)
kuhar Jan 16, 2026
fc6f680
[Codegen] Fix compiler errors in LinkTuningSpecsPass (#23169)
kuhar Jan 16, 2026
97a9fd8
[CI] Update torch_ops config file and run tests when config files are…
amd-eochoalo Jan 16, 2026
604eb3e
[Codegen] fixes typo in assert statement (#23170)
Muzammiluddin-Syed-ECE Jan 16, 2026
487d98f
[Codegen] Add pass to remove iree_codegen.index_hint ops (#23139)
Max191 Jan 16, 2026
46557fd
Enable passing e2e tests for ROCM, VMVX, and Vulkan backends (#23174)
hanhanW Jan 16, 2026
75d7ce6
[GPU] Inject index hints during MMA lane distribution (#23152)
Max191 Jan 16, 2026
d92664a
Fix test failures revealed by reverse iteration (nondeterminism) (#23…
kuhar Jan 17, 2026
1695fb9
[CI] Enable reverse iteration in UBsan workflow (#23178)
kuhar Jan 17, 2026
c8d7515
[CPU] Fix nondeterminism in host cpu features (#23179)
kuhar Jan 17, 2026
b47101f
Simplify quantifiers all_of, any_of, none_of. NFC. (#23180)
kuhar Jan 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/ci_linux_arm64_clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
run: ./build_tools/cmake/test_iree_dialects.sh "${BUILD_DIR}"

- name: Post to Discord on Failure
uses: sarisia/actions-status-discord@b8381b25576cb341b2af39926ab42c5056cc44ed # v1.15.5
uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0
if: failure() && github.ref_name == 'main' && github.repository_owner == 'iree-org'
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_linux_x64_clang_byollvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: ./build_tools/cmake/build_and_test_byo_llvm.sh

- name: Post to Discord on Failure
uses: sarisia/actions-status-discord@b8381b25576cb341b2af39926ab42c5056cc44ed # v1.15.5
uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0
if: failure() && github.ref_name == 'main' && github.repository_owner == 'iree-org'
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_linux_x64_clang_debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
# would add 10+ minutes to the job.

- name: Post to Discord on Failure
uses: sarisia/actions-status-discord@b8381b25576cb341b2af39926ab42c5056cc44ed # v1.15.5
uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0
if: failure() && github.ref_name == 'main' && github.repository_owner == 'iree-org'
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_linux_x64_clang_tsan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
sccache --show-stats

- name: Post to Discord on Failure
uses: sarisia/actions-status-discord@b8381b25576cb341b2af39926ab42c5056cc44ed # v1.15.5
uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0
if: failure() && github.ref_name == 'main' && github.repository_owner == 'iree-org'
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/ci_linux_x64_clang_ubsan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

name: CI - Linux x64 clang UBSan
name: CI - Linux x64 clang UBSan and Reverse Iteration

on:
workflow_call:
Expand All @@ -29,6 +29,9 @@ jobs:
# Use a modern clang explicitly.
CC: clang-19
CXX: clang++-19
# Enable reverse iteration of unordered LLVM containers. This helps
# catch non-determinism bugs.
IREE_REVERSE_ITERATE: "ON"
SCCACHE_AZURE_CONNECTION_STRING: "${{ secrets.AZURE_CCACHE_CONNECTION_STRING }}"
SCCACHE_AZURE_BLOB_CONTAINER: ccache-container
SCCACHE_CACHE_ZSTD_LEVEL: 10
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_linux_x64_gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
run: ./build_tools/cmake/build_all.sh "${BUILD_DIR}"

- name: Post to Discord on Failure
uses: sarisia/actions-status-discord@b8381b25576cb341b2af39926ab42c5056cc44ed # v1.15.5
uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0
if: failure() && github.ref_name == 'main' && github.repository_owner == 'iree-org'
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_macos_arm64_clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
run: bash ./build_tools/cmake/build_all.sh "${BUILD_DIR}"

- name: Post to Discord on Failure
uses: sarisia/actions-status-discord@b8381b25576cb341b2af39926ab42c5056cc44ed # v1.15.5
uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0
if: failure() && github.ref_name == 'main' && github.repository_owner == 'iree-org'
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_macos_x64_clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
run: bash ./build_tools/cmake/ctest_all.sh "${BUILD_DIR}"

- name: Post to Discord on Failure
uses: sarisia/actions-status-discord@b8381b25576cb341b2af39926ab42c5056cc44ed # v1.15.5
uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0
if: failure() && github.ref_name == 'main' && github.repository_owner == 'iree-org'
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/pkgci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ jobs:
if: contains(fromJson(needs.setup.outputs.enabled-jobs), 'test_amd_w7900')
uses: ./.github/workflows/pkgci_test_amd_w7900.yml

test_amd_r9700:
name: Test AMD R9700
needs: [setup, build_packages]
if: contains(fromJson(needs.setup.outputs.enabled-jobs), 'test_amd_r9700')
uses: ./.github/workflows/pkgci_test_amd_r9700.yml

# TODO(#18238): migrate to new runner cluster
# test_nvidia_t4:
# name: Test NVIDIA T4
Expand Down Expand Up @@ -135,6 +141,7 @@ jobs:
- test_amd_mi250
- test_amd_mi325
- test_amd_w7900
- test_amd_r9700
# - test_nvidia_t4
- test_android
- test_riscv64
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/pkgci_test_amd_r9700.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Copyright 2026 The IREE Authors
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

name: PkgCI Test AMD R9700
on:
workflow_call:
inputs:
artifact_run_id:
type: string
default: ""
workflow_dispatch:
inputs:
artifact_run_id:
type: string
default: ""

jobs:
test_r9700:
runs-on: [Linux, X64, iree-r9700]
env:
PACKAGE_DOWNLOAD_DIR: ${{ github.workspace }}/.packages
BUILD_DIR: build-tests
VENV_DIR: ${{ github.workspace }}/.venv
GH_TOKEN: ${{ github.token }}
IREE_CPU_DISABLE: 1
IREE_VULKAN_DISABLE: 0
IREE_CUDA_ENABLE: 0
IREE_HIP_ENABLE: 1
IREE_HIP_TEST_TARGET_CHIP: "gfx1201"
steps:
- name: Check out repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
submodules: false
- name: Check out runtime submodules
run: ./build_tools/scripts/git/update_runtime_submodules.sh
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
# Must match the subset of versions built in pkgci_build_packages.
python-version: "3.11"
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
if: ${{ inputs.artifact_run_id == '' }}
with:
name: linux_x86_64_release_packages
path: ${{ env.PACKAGE_DOWNLOAD_DIR }}
- name: Setup base venv
run: |
./build_tools/pkgci/setup_venv.py ${VENV_DIR} \
--artifact-path=${PACKAGE_DOWNLOAD_DIR} \
--fetch-gh-workflow=${{ inputs.artifact_run_id }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build tests
run: ./build_tools/pkgci/build_tests_using_package.sh ${VENV_DIR}/bin
- name: Run GPU tests
env:
CTEST_PARALLEL_LEVEL: 1
IREE_CTEST_LABEL_REGEX: ^requires-gpu|^driver=vulkan$|^driver=hip$
IREE_AMD_RDNA4_TESTS_DISABLE: 0
IREE_NVIDIA_GPU_TESTS_DISABLE: 0
IREE_NVIDIA_SM80_TESTS_DISABLE: 1
IREE_MULTI_DEVICE_TESTS_DISABLE: 0
run: ./build_tools/cmake/ctest_all.sh ${BUILD_DIR}
12 changes: 10 additions & 2 deletions .github/workflows/pkgci_test_onnx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ jobs:
numprocesses: 1
config-file: onnx_ops_gpu_hip_rdna3_O3.json
runs-on: [Linux, X64, gfx1100]
# TODO(#23160): Fix the onnx ops test suite for gfx1201.
# - name: amdgpu_hip_rdna4_O3
# numprocesses: 1
# config-file: onnx_ops_gpu_hip_rdna4_O3.json
# runs-on: [Linux, X64, gfx1201]
- name: amdgpu_vulkan_O0
numprocesses: 1
config-file: onnx_ops_gpu_vulkan_O0.json
Expand Down Expand Up @@ -103,7 +108,7 @@ jobs:
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: iree-org/iree-test-suites
ref: 17a391dc3882f136e567bf2687806ef6af46ad64
ref: 17ead09be6d84bf46d80e6192dc12e45ba776045
path: iree-test-suites
- name: Install ONNX ops test suite requirements
run: |
Expand Down Expand Up @@ -154,6 +159,9 @@ jobs:
- name: amdgpu_hip_rdna3
config-file: onnx_models_gpu_hip_rdna3.json
runs-on: [Linux, X64, gfx1100, persistent-cache]
- name: amdgpu_hip_rdna4
config-file: onnx_models_gpu_hip_rdna4.json
runs-on: [Linux, X64, gfx1201, persistent-cache]
- name: amdgpu_vulkan
config-file: onnx_models_gpu_vulkan.json
# TODO(#22579): Remove `shark10-ci` label. There are vulkan driver issues on other runners.
Expand Down Expand Up @@ -189,7 +197,7 @@ jobs:
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: iree-org/iree-test-suites
ref: 17a391dc3882f136e567bf2687806ef6af46ad64
ref: 17ead09be6d84bf46d80e6192dc12e45ba776045
path: iree-test-suites
- name: Install ONNX models test suite requirements
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pkgci_test_sharktank.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: iree-org/iree-test-suites
ref: 17a391dc3882f136e567bf2687806ef6af46ad64
ref: 17ead09be6d84bf46d80e6192dc12e45ba776045
path: iree-test-suites
lfs: true

Expand Down Expand Up @@ -197,7 +197,7 @@ jobs:
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: iree-org/iree-test-suites
ref: 17a391dc3882f136e567bf2687806ef6af46ad64
ref: 17ead09be6d84bf46d80e6192dc12e45ba776045
path: iree-test-suites
lfs: true

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/pkgci_test_torch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
- name: amdgpu_hip_gfx1100_O3
config-file: torch_ops_gpu_hip_gfx1100_O3.json
runs-on: [Linux, X64, gfx1100]
- name: amdgpu_hip_gfx1201_O3
config-file: torch_ops_gpu_hip_gfx1201_O3.json
runs-on: [Linux, X64, gfx1201]
- name: amdgpu_vulkan_O3
config-file: torch_ops_gpu_vulkan_O3.json
# TODO(#22579): Remove `shark10-ci` label. There are vulkan driver issues on other runners.
Expand Down Expand Up @@ -74,7 +77,7 @@ jobs:
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: iree-org/iree-test-suites
ref: 132f91e49d629c35f98492a9f619017b83782aba
ref: 17ead09be6d84bf46d80e6192dc12e45ba776045
path: iree-test-suites
- name: Install Torch ops test suite requirements
run: |
Expand Down Expand Up @@ -138,7 +141,7 @@ jobs:
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: iree-org/iree-test-suites
ref: 17a391dc3882f136e567bf2687806ef6af46ad64
ref: 17ead09be6d84bf46d80e6192dc12e45ba776045
path: iree-test-suites
# Don't need lfs for torch models yet.
lfs: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/workflow_summary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
exit 1
fi
- name: Post to Discord on Failure
uses: sarisia/actions-status-discord@b8381b25576cb341b2af39926ab42c5056cc44ed # v1.15.5
uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0
if: failure() && github.ref_name == 'main' && github.repository_owner == 'iree-org'
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ imgui.ini

# Source indexing files
compile_commands.json
tablegen_compile_commands.yml
.cache/clangd

# Language server configuration files
Expand Down
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -523,11 +523,13 @@ option(IREE_ENABLE_ASAN "Enable address sanitizer" OFF)
option(IREE_ENABLE_MSAN "Enable memory sanitizer" OFF)
option(IREE_ENABLE_TSAN "Enable thread sanitizer" OFF)
option(IREE_ENABLE_UBSAN "Enable undefined behavior sanitizer" OFF)
option(IREE_ENABLE_FUZZING "Enable libFuzzer-based fuzz targets" OFF)
option(IREE_ENABLE_SPLIT_DWARF "Enable gsplit-dwarf for debug information if the platform supports it" OFF)
option(IREE_ENABLE_THIN_ARCHIVES "Enables thin ar archives (elf systems only). Disable for released static archives" OFF)
option(IREE_LINK_COMPILER_SHARED_LIBRARY "Links IREE tools using the compiler compiled into a shared library" ON)
option(IREE_ENABLE_WERROR_FLAG "Enable `-Werror` flag, treat error as warning" ON)
option(IREE_ENABLE_POSITION_INDEPENDENT_CODE "Enable position independent code" TRUE)
option(IREE_REVERSE_ITERATION "Reverse iteration over in unordered LLVM containers" OFF)

if(IREE_LINK_COMPILER_SHARED_LIBRARY AND IREE_ENABLE_COMPILER_TRACING)
message(SEND_ERROR
Expand Down Expand Up @@ -569,6 +571,10 @@ if(IREE_ENABLE_RUNTIME_COVERAGE AND NOT _UPPERCASE_CMAKE_BUILD_TYPE STREQUAL "DE
message(FATAL_ERROR "IREE_ENABLE_*_COVERAGE requires building in Debug")
endif()

if(IREE_REVERSE_ITERATION)
set(LLVM_ENABLE_REVERSE_ITERATION ON CACHE BOOL "" FORCE)
endif()

#-------------------------------------------------------------------------------
# IREE assertions
# We don't love the way this is done, but we have to line it up with how LLVM
Expand Down Expand Up @@ -629,6 +635,7 @@ include(iree_copts)
include(iree_cc_binary)
include(iree_cc_library)
include(iree_cc_test)
include(iree_cc_fuzz)
include(iree_import_binary)
include(iree_install_support)
include(iree_external_cmake_options)
Expand Down
14 changes: 13 additions & 1 deletion build_tools/bazel/build_defs.oss.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,23 @@
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library", "gentbl_filegroup", "td_library")

# All load statements must come first in Starlark.
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
load(
"//build_tools/bazel:iree_cc_fuzz.bzl",
_iree_cc_fuzz = "iree_cc_fuzz",
_iree_compiler_cc_fuzz = "iree_compiler_cc_fuzz",
_iree_runtime_cc_fuzz = "iree_runtime_cc_fuzz",
)

"""Common Bazel definitions for IREE."""

load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library", "gentbl_filegroup", "td_library")
# Re-export fuzz rules for external use.
iree_cc_fuzz = _iree_cc_fuzz
iree_compiler_cc_fuzz = _iree_compiler_cc_fuzz
iree_runtime_cc_fuzz = _iree_runtime_cc_fuzz

def defaulting_select(selector):
"""Pass through to select() with special semantics when converting to CMake.
Expand Down
29 changes: 19 additions & 10 deletions build_tools/bazel/iree.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,17 @@ build:msvc_release --compilation_mode=opt
# https://github.com/google/sanitizers/wiki/AddressSanitizer
###############################################################################

# Don't strip debug info
build:sanitizer --strip=never
# Ignore settings of `linkopts = ["-static"]` which can screw up the sanitizer.
# We don't use this in IREE (that's what linkstatic is for), but it could show
# up in dependencies.
build:sanitizer --force_ignore_dash_static
# sanitizer tests tend to take longer, so increase the timeouts
build:sanitizer --test_timeout=120,600,1800,-1
# Get better stack traces
build:sanitizer --copt=-fno-omit-frame-pointer

# ASAN (address sanitizer)
# https://clang.llvm.org/docs/AddressSanitizer.html
build:asan --config=sanitizer
Expand Down Expand Up @@ -216,16 +227,14 @@ build:ubsan --linkopt=-fsanitize=undefined
build:ubsan --linkopt=-lubsan
build:ubsan --cc_output_directory_tag=ubsan

# Don't strip debug info
build:sanitizer --strip=never
# Ignore settings of `linkopts = ["-static"]` which can screw up the sanitizer.
# We don't use this in IREE (that's what linkstatic is for), but it could show
# up in dependencies.
build:sanitizer --force_ignore_dash_static
# sanitizer tests tend to take longer, so increase the timeouts
build:sanitizer --test_timeout=120,600,1800,-1
# Get better stack traces
build:sanitizer --copt=-fno-omit-frame-pointer
# Fuzzer (libFuzzer) configuration
# https://llvm.org/docs/LibFuzzer.html
# Includes ASAN by default - there's no reason to fuzz without memory sanitization.
build:fuzzer --config=asan
build:fuzzer --copt=-fsanitize=fuzzer-no-link
build:fuzzer --linkopt=-fsanitize=fuzzer-no-link
build:fuzzer --cc_output_directory_tag=asan-fuzzer
build:fuzzer --copt=-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION

###############################################################################
# Architecture specific options
Expand Down
Loading