Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OpaquePointers] Add support for translating target extension types. #1799

Merged
merged 1 commit into from Mar 13, 2023

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 added 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.

None yet

3 participants