-
Notifications
You must be signed in to change notification settings - Fork 576
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
Add support for pointer types in vector when using extension SPV_INTEL_masked_gather_scatter #6041
base: main
Are you sure you want to change the base?
Add support for pointer types in vector when using extension SPV_INTEL_masked_gather_scatter #6041
Conversation
f47a194
to
79c0a9c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test for this change.
79c0a9c
to
568c47b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also please fix the formatting errors.
source/val/validate_type.cpp
Outdated
bool isPointer = component_type->opcode() == spv::Op::OpTypePointer; | ||
bool isScalar = spvOpcodeIsScalarType(component_type->opcode()); | ||
|
||
if (_.HasExtension(Extension::kSPV_INTEL_masked_gather_scatter) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think strictly speaking this should be capability gated by the spec:
if (_.HasExtension(Extension::kSPV_INTEL_masked_gather_scatter) && | |
if (_.HasCapability(spv::Capability::MaskedScatterGatherINTEL) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made the changes to use capability instead of extension
source/val/validate_type.cpp
Outdated
<< _.getIdName(component_id) | ||
<< ": Expected a scalar or pointer type when using the " | ||
"SPV_INTEL_masked_gather_scatter extension."; | ||
} else if (!_.HasExtension(Extension::kSPV_INTEL_masked_gather_scatter) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
} else if (!_.HasExtension(Extension::kSPV_INTEL_masked_gather_scatter) && | |
} else if (!_.HasCapability(spv::Capability::MaskedScatterGatherINTEL) && |
MaskedGatherScatterINTEL is enabled Add supporting tests for spv_intel_masked_gather_scatter Formatting changes for unrelated files
568c47b
to
62c6ecf
Compare
current checks in spirv-val only check for vector types that are scalar, on using extension SPV_INTEL_masked_gather_scatter OpTypeVector must also support pointer types
check spec: SPV_INTEL_masked_gather_scatter