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

Question about OpGenericCastToPtr/OpPtrCastToGeneric expansion #73

Closed
MrSidims opened this issue Jun 10, 2020 · 1 comment
Closed

Question about OpGenericCastToPtr/OpPtrCastToGeneric expansion #73

MrSidims opened this issue Jun 10, 2020 · 1 comment

Comments

@MrSidims
Copy link
Contributor

MrSidims commented Jun 10, 2020

Hi,

Currently OpGenericCastToPtr/OpPtrCastToGeneric instructions provides casting from/to a pointer in Generic storage class to/from a pointer in Workgroup, CrossWorkgroup or Function storage classes.

In intel/llvm#1840 we added 2 more storage classes: DeviceOnlyINTEL/HostOnlyINTEL to represent global memory that can be allocated on device or host appropriately. Also we want to add in SPIR-V a possibility to cast from CrossWorkgroup pointer to DeviceOnlyINTEL/HostOnlyINTEL pointer and vice versa. There are basically two options how it can be achieved:

  1. Add new instructions for that;
  2. Expand OpGenericCastToPtr/OpPtrCastToGeneric potential in casting (under the extension).

The second option is slightly preferable for us, but taking in the account, that it will lead to addition of vendor customization in https://github.com/KhronosGroup/SPIRV-Tools which way is preferable for the community?

Thank you in advance.

@MrSidims
Copy link
Contributor Author

Tagging @GarveyJoe @bashbaug

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

No branches or pull requests

1 participant