Page MenuHomePhabricator

[mlir][spirv] Add control for non-32-bit scalar type emulation

Authored by antiagainst on Apr 7 2021, 11:41 AM.



Non-32-bit scalar types require special hardware support that may not
exist on all GPUs. This is reflected in SPIR-V as that non-32-bit scalar
types require special capabilities or extensions.

Previously when there is a non-32-bit type and no native support, we
unconditionally emulate it with 32-bit ones. This isn't good given that
it can have implications over ABI and data layout consistency.

This commit introduces an option to control whether to use 32-bit
types to emulate.

Depends On D100058

Diff Detail

Event Timeline

antiagainst created this revision.Apr 7 2021, 11:41 AM
antiagainst requested review of this revision.Apr 7 2021, 11:41 AM

Add missing &

hanchung accepted this revision.Apr 7 2021, 11:24 PM

Haven't prototyped based on the patch, but overall it looks good to me.



This revision is now accepted and ready to land.Apr 7 2021, 11:24 PM