Skip to content

Extend packed FP4/Int4 conversions for all container types#3618

Draft
vmaksimo wants to merge 1 commit intoKhronosGroup:mainfrom
vmaksimo:4bit-conversions
Draft

Extend packed FP4/Int4 conversions for all container types#3618
vmaksimo wants to merge 1 commit intoKhronosGroup:mainfrom
vmaksimo:4bit-conversions

Conversation

@vmaksimo
Copy link
Contributor

@vmaksimo vmaksimo commented Mar 3, 2026

processMiniFPOrInt4Type in SPIRVWriter was not handling i16, i64, and <N x i8> packed containers, causing an assert on forward translation.

OpSConvert with an Int4 source in SPIRVReader was falling through to the generic SExt/Trunc path, causing ConvertInt4ToInt8INTEL to round-trip as a bare sext.

Tests for SPV_INTEL_float4 and SPV_INTEL_int4 packed conversions are extended to cover all conversion instructions and container varieties.

`processMiniFPOrInt4Type` in SPIRVWriter was not handling `i16`, `i64`,
and `<N x i8>` packed containers, causing an assert on forward translation.

`OpSConvert` with an Int4 source in SPIRVReader was falling through to
the generic SExt/Trunc path, causing `ConvertInt4ToInt8INTEL` to
round-trip as a bare `sext`.

Tests for `SPV_INTEL_float4` and `SPV_INTEL_int4` packed conversions are
extended to cover all conversion instructions and container varieties.
@MrSidims
Copy link
Contributor

MrSidims commented Mar 3, 2026

Fix packed

=>

Extend packed

@vmaksimo vmaksimo changed the title Fix packed FP4/Int4 conversions for all container types Extend packed FP4/Int4 conversions for all container types Mar 3, 2026
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.

2 participants