Skip to content

Conversation

@jcranmer-intel
Copy link
Contributor

The target extension type for SPIR-V is essentially target("spirv.TypeName", , ).

Most of the work to support translation of these types has already happened beforehand, so the primary step here is to enable translation work in SPIRVWriter as well as making the SPIRVBuiltinHelpers work with target types as well.

Constructing LLVM IR from SPIR-V using these types is not yet supported, mainly out of uncertainty of the proper interface to let the resultant consumers indicate that they wish to support these types.

The target extension type for SPIR-V is essentially
target("spirv.TypeName", <image type>, <int params>).

Most of the work to support translation of these types has already happened
beforehand, so the primary step here is to enable translation work in
SPIRVWriter as well as making the SPIRVBuiltinHelpers work with target types as
well.

Constructing LLVM IR from SPIR-V using these types is not yet supported, mainly
out of uncertainty of the proper interface to let the resultant consumers
indicate that they wish to support these types.
@jcranmer-intel
Copy link
Contributor Author

The clang patch I wrote to generate these types is at https://reviews.llvm.org/D141008.

@MrSidims MrSidims self-requested a review January 5, 2023 13:42
Copy link
Contributor

@MrSidims MrSidims left a comment

Choose a reason for hiding this comment

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

LGTM, but I suggest to wait for clang patch first to make sure that IR format is approved.
I also believe, that some of the .cl tests might require to be updated when clang patch is merged.

@MrSidims
Copy link
Contributor

https://reviews.llvm.org/D141008 is accepted by Anastasia, hence merging the patch

@MrSidims MrSidims merged commit 951a6ad into KhronosGroup:main Mar 13, 2023
MrSidims pushed a commit that referenced this pull request Mar 16, 2023
)

The expected representation is:
target("spirv.JointMatrixINTEL", %element_type, %rows%, %cols%, %scope%,
%use%, (optional) %element_type_interpretation%)

TODO: figure out, how to deal with the switch from old API (Matrix has Layout) to new API (Layout was removed)

Depends on:
#1799
intel/llvm#8343
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.

3 participants