Skip to content

Add new execution mode to SPV_INTEL_kernel_attributes #176

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

Merged
merged 2 commits into from
Feb 15, 2023

Conversation

tiwaria1
Copy link
Contributor

@tiwaria1 tiwaria1 commented Dec 8, 2022

FPGA kernels can have two types of interfaces - streaming based or register based. This PR adds a new execution mode (RegisterMapInterfaceINTEL) which specifies a 'register' based interface.

RegisterMapInterfaceINTEL is being added to the existing SPV_INTEL_kernel_attributes extension as this extension already has the other execution mode (StreamingInterfaceINTEL) that represents the streaming based interface. We want to keep these two related modes together in one extension document.

To allow backwards compatibility, the new mode is guarded by a new capability FPGAKernelAttributesv2INTEL.

@tiwaria1 tiwaria1 marked this pull request as ready for review December 8, 2022 16:47
@tiwaria1
Copy link
Contributor Author

tiwaria1 commented Dec 8, 2022

The html file was updated using the VSCode AsciiDoc extension.

@tiwaria1
Copy link
Contributor Author

Please take a look, @johnkslang / @alan-baker , thank you!

@bashbaug
Copy link
Collaborator

Can you please add a link to this extension in the README also?

@tiwaria1
Copy link
Contributor Author

Can you please add a link to this extension in the README also?

The readme already seems to have this extension linked since it's an existing extension.

@tiwaria1
Copy link
Contributor Author

tiwaria1 commented Feb 2, 2023

ping @bashbaug , @johnkslang (I am unable add you as git reviewers)

Copy link
Collaborator

@bashbaug bashbaug left a comment

Choose a reason for hiding this comment

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

The readme already seems to have this extension linked since it's an existing extension.

Whoops, I'd missed that, sorry!

LGTM, needs a non-Intel reviewer before merging.

@tiwaria1
Copy link
Contributor Author

tiwaria1 commented Feb 7, 2023

ping @johnkslang / @dneto0 / @alan-baker for review. Thank you!

@johnkslang johnkslang merged commit c214bf9 into KhronosGroup:main Feb 15, 2023
MrSidims pushed a commit to KhronosGroup/SPIRV-LLVM-Translator that referenced this pull request Mar 8, 2023
This PR adds the new execution mode RegisterMapInterfaceINTEL, see the Khronos
SPIRV spec here: KhronosGroup/SPIRV-Registry#176
This execution mode allows specifying a 'register' based interface for FPGA kernels.

The RegisterMapInterfaceINTEL execution mode is added with a 0/1 literal based on
the kernel metadata. When the metadata is:

!ip_interface !N
!N = !{!"csr"}
The translator emits RegisterMapInterfaceINTEL 0, and when the metadata is:

!ip_interface !N
!N = !{!"csr", !"accept_downstream_stall"}
The translator emits RegisterMapInterfaceINTEL 1

NOTE
The new mode is under capability FPGAKernelAttributesv2INTEL which implicitly defines the capability FPGAKernelAttributesv2INTEL.
This PR is very similar to Implement StreamingInterfaceINTEL execution mode #1218
FreddyLeaf pushed a commit to FreddyLeaf/llvm that referenced this pull request Mar 22, 2023
This PR adds the new execution mode RegisterMapInterfaceINTEL, see the Khronos
SPIRV spec here: KhronosGroup/SPIRV-Registry#176
This execution mode allows specifying a 'register' based interface for FPGA kernels.

The RegisterMapInterfaceINTEL execution mode is added with a 0/1 literal based on
the kernel metadata. When the metadata is:

!ip_interface !N
!N = !{!"csr"}
The translator emits RegisterMapInterfaceINTEL 0, and when the metadata is:

!ip_interface !N
!N = !{!"csr", !"accept_downstream_stall"}
The translator emits RegisterMapInterfaceINTEL 1

NOTE
The new mode is under capability FPGAKernelAttributesv2INTEL which implicitly defines the capability FPGAKernelAttributesv2INTEL.
This PR is very similar to Implement StreamingInterfaceINTEL execution mode intel#1218

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@a9f4f25
fveselov added a commit to fveselov/SPIRV-LLVM-Translator that referenced this pull request Feb 20, 2024
…ution mode

This PR adds the new execution mode RegisterMapInterfaceINTEL, see the Khronos
SPIRV spec here: KhronosGroup/SPIRV-Registry#176
This execution mode allows specifying a 'register' based interface for FPGA kernels.
fveselov added a commit to fveselov/SPIRV-LLVM-Translator that referenced this pull request Feb 27, 2024
…ution mode

This PR adds the new execution mode RegisterMapInterfaceINTEL, see the Khronos
SPIRV spec here: KhronosGroup/SPIRV-Registry#176
This execution mode allows specifying a 'register' based interface for FPGA kernels.
MrSidims pushed a commit to KhronosGroup/SPIRV-LLVM-Translator that referenced this pull request Feb 28, 2024
* Backport from llvm16 branch: Support FPGA function !spirv.Decoration metadata

Supporting the new FPGA kernel attribute pipelined needs the translator
to handle !spirv.Decoration metadata on functions as well as on global
variables. If the MD is found on the function, call the existing
translation of metadata.

* Backport from llvm16 branch: Implement RegisterMapInterfaceINTEL execution mode

This PR adds the new execution mode RegisterMapInterfaceINTEL, see the Khronos
SPIRV spec here: KhronosGroup/SPIRV-Registry#176
This execution mode allows specifying a 'register' based interface for FPGA kernels.

* Backport from llvm16 branch: Implement SPIR-V support for max_reinvocation_delay attribute

The attribute generates the llvm.loop.intel.max_reinvocation_delay.count metadata in LLVM IR.
There is one positive integer literal operand denoting the maximum number of cycles allowed
between loop invocations.

* Backport from llvm18 branch: Support sycl_ext_oneapi_prefetch

Handle new properties and decorate prefetch's arg.
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