Skip to content

Verify index attribute provides mappings for all symbolic dimensions#879

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/check-index-attribute-verifier
Draft

Verify index attribute provides mappings for all symbolic dimensions#879
Copilot wants to merge 4 commits intomainfrom
copilot/check-index-attribute-verifier

Conversation

Copy link
Contributor

Copilot AI commented Feb 12, 2026

The index attribute verifier was not checking that mappings exist for all symbols used in operand and result types. Operations could have incomplete index attributes at verification time.

Changes

  • WaveInterfaces.cpp: Extended verifyWaveIndexMappings to walk operand and result types, collecting all symbolic dimensions and verifying each has a corresponding entry in the index attribute
  • ops-invalid.mlir: Added negative test cases covering missing operand symbols, missing result symbols, and partially-specified multi-dimensional cases

Example

// Now fails verification with clear error message
func.func @missing_symbol(%arg0: !wave.tensor<[@M, @N] of f32, <register>>) {
  // error: 'index' attribute does not provide a mapping for symbol '@N'
  %0 = wave.add %arg0, %arg0 index [{M : <[] -> (0, 1, 1)>}] 
    : (!wave.tensor<[@M, @N] of f32, <register>>, ...) -> ...
}

The verifier collects symbols in three phases: (1) extract symbol names from index attribute, (2) validate attribute structure and iterator symbols, (3) verify all type symbols have index mappings.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • iree.dev
    • Triggering command: /usr/bin/python python -m pip install -r requirements-iree-pinned.txt (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>[water] make index attribute verifier check that it provides index mappings for all symbols used in the operation</issue_title>
<issue_description>Walk the operand and result types and check that the index attribute, when present, has an entry for every symbolic dimension. If there are legitimate cases where it may be temporarily missing, this can be a normal form or a separate pass, but let's start by trying full verification first.</issue_description>

<agent_instructions>Please follow LLVM coding standards and add lit tests in ops-invalid.mlir
</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits February 12, 2026 14:11
Implement verification that ensures the index attribute provides
mappings for all symbols used in operand and result types.

- Add collectSymbolsFromTypes helper to extract symbols from types
- Extend verifyWaveIndexMappings to check all required symbols
- Add lit tests in ops-invalid.mlir for missing symbol cases

Co-authored-by: ftynse <1512299+ftynse@users.noreply.github.com>
Separate symbol collection from index attribute from validation logic
for better readability and separation of concerns.

Co-authored-by: ftynse <1512299+ftynse@users.noreply.github.com>
Co-authored-by: ftynse <1512299+ftynse@users.noreply.github.com>
Copilot AI changed the title [WIP] Add index attribute verifier for all symbols Verify index attribute provides mappings for all symbolic dimensions Feb 12, 2026
Copilot AI requested a review from ftynse February 12, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[water] make index attribute verifier check that it provides index mappings for all symbols used in the operation

2 participants