Skip to content

[VectorDistribute] Do not handle bit extend during matmul configuration - #21798

Merged
Groverkss merged 1 commit into
iree-org:mainfrom
Groverkss:fix-intrinsic-cast-check
Aug 30, 2025
Merged

Groverkss merged 1 commit into
iree-org:mainfrom
Groverkss:fix-intrinsic-cast-check

Conversation

@Groverkss

Copy link
Copy Markdown
Contributor

We shouldn't be handling bit extends outside of the contraction during configuration. The bit extend should be fused with the contraction for it to target intrinsics. This behavior matches what TileAndFuse does and prevents problems with cases like:


%lhs = linalg.generic {
  %ext = arith.extf %in
  %scaled = arith.mulf %ext, %scale
}

...

// mma
linalg.generic %lhs, %rhs

Here the scaling doesn't allow us to target intrinsics, but currently vector distribute will target intrinsics.

Fixes: #21434

@Groverkss

Copy link
Copy Markdown
Contributor Author

Depends on #21797 , please only review the top commit

@kuhar kuhar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooops, seems like I didn't read the instructions:

please only review the top commit

@Groverkss
Groverkss force-pushed the fix-intrinsic-cast-check branch from 842d14a to 5d8422f Compare August 30, 2025 16:17
@Groverkss
Groverkss enabled auto-merge (squash) August 30, 2025 16:17
@Groverkss
Groverkss merged commit c37c680 into iree-org:main Aug 30, 2025
sogartar pushed a commit to nod-ai/amd-shark-ai that referenced this pull request Sep 2, 2025
sogartar pushed a commit to nod-ai/amd-shark-ai that referenced this pull request Sep 2, 2025
sogartar pushed a commit to nod-ai/amd-shark-ai that referenced this pull request Sep 9, 2025
sogartar pushed a commit to nod-ai/amd-shark-ai that referenced this pull request Sep 10, 2025
hhkit pushed a commit to opencompl/iree that referenced this pull request Sep 11, 2025
…on (iree-org#21798)

We shouldn't be handling bit extends outside of the contraction during
configuration. The bit extend should be fused with the contraction for
it to target intrinsics. This behavior matches what TileAndFuse does and
prevents problems with cases like:

```

%lhs = linalg.generic {
  %ext = arith.extf %in
  %scaled = arith.mulf %ext, %scale
}

...

// mma
linalg.generic %lhs, %rhs
```

Here the scaling doesn't allow us to target intrinsics, but currently
vector distribute will target intrinsics.

Fixes: iree-org#21434
Signed-off-by: Ivan Ho <[email protected]>
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.

iree compile failed on mi355 for llama 8b fp8

2 participants