Skip to content

Add support for the execution mode RegisterMapInterfaceINTEL#317

Merged
johnkslang merged 7 commits intoKhronosGroup:mainfrom
tiwaria1:register_map_interface
Mar 1, 2023
Merged

Add support for the execution mode RegisterMapInterfaceINTEL#317
johnkslang merged 7 commits intoKhronosGroup:mainfrom
tiwaria1:register_map_interface

Conversation

@tiwaria1
Copy link
Contributor

(Previous PR #309 was closed automatically by git when I synced my fork with Khronos repo - since I synced with the git hub UI and that required discarding my commit)

This SPIRV extension update will be introducing the new execution mode RegisterMapInterfaceINTEL. This PR adds support for this new mode.

NOTE

This execution mode is being added to an existing extension SPV_INTEL_kernel_attributes and is guarded by a new capability FPGAKernelAttributesv2INTEL which implicitly defines the existing capability FPGAKernelAttributesINTEL.

@tiwaria1
Copy link
Contributor Author

ping @MrSidims @bashbaug for review :)

Add

Co-authored-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
@tiwaria1 tiwaria1 requested a review from MrSidims January 27, 2023 15:51
@tiwaria1
Copy link
Contributor Author

tiwaria1 commented Feb 3, 2023

Friendly ping @bashbaug , @dneto0 for review :)

Comment on lines 14720 to 14726
{
"enumerant" : "FPGAKernelAttributesv2INTEL",
"value" : 6161,
"capabilities" : [ "FPGAKernelAttributesINTEL" ],
"extensions" : [ "SPV_INTEL_kernel_attributes" ],
"version" : "None"
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Did the headers generate correctly after this change? I see the new RegisterMapInterfaceINTEL enum, but not this new FPGAKernelAttributesv2INTEL capability.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How and where do I check that? Do I have to run something locally? @MrSidims do you know how I can check the generated headers? I am going to try the steps shown in the repo README file.

Copy link
Contributor Author

@tiwaria1 tiwaria1 Feb 7, 2023

Choose a reason for hiding this comment

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

Could be because I did not add FPGAKernelAttributesv2INTEL to include/spirv/unified1/spirv.hpp11. Adding now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for catching this, I realize now that FPGAKernelAttributesv2INTEL should have been added everywhere just like FPGAKernelAttributesINTEL. Updated all files.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, did you regenerate the headers after making this change? I'm seeing an error when I regenerate headers:

Error: "Capability" enumerant "FPGAMemoryAccessesINTEL" is out of order. It has value 5898 but follows the enumerant with value 6161

Instructions to regenerate the headers can be found here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No I did not. Looking into it now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like there is a positioning requirement. Updated, and now the header generation command does not error out.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, I don't see the out-of-order error anymore, but it looks like the FPGAKernelAttributesv2INTEL capability is now in the wrong place - see below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in all files.

Comment on lines 10727 to 10733
{
"enumerant" : "FPGAKernelAttributesv2INTEL",
"value" : 6161,
"capabilities" : [ "FPGAKernelAttributesINTEL" ],
"extensions" : [ "SPV_INTEL_kernel_attributes" ],
"version" : "None"
},
Copy link
Contributor

Choose a reason for hiding this comment

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

This enumerant is in the wrong place now - it is in the "Execution Mode" section and it needs to be in the "Capability" section. Be sure to maintain numerical order! Then regenerate headers after moving it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for catching this, moved FPGAKernelAttributesv2INTEL to capabilities section in all files, in the correct numerical order. Generated headers again and did not get any errors.

Copy link
Contributor

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

Thanks, all LGTM now! Needs a non-Intel reviewer to merge.

@tiwaria1
Copy link
Contributor Author

@dneto0 / @johnkslang / @alan-baker Kindly review this PR. Thanks! :)

@tiwaria1
Copy link
Contributor Author

tiwaria1 commented Feb 28, 2023

@dneto0 / @johnkslang / @alan-baker Kindly review this PR. Thanks! :)

Reminder ping :) @dneto0 / @johnkslang / @alan-baker thank you!

@johnkslang johnkslang merged commit 295cf5f into KhronosGroup:main Mar 1, 2023
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.

4 participants