MLIR  19.0.0git
Public Attributes | List of all members
mlir::SPIRVConversionOptions Struct Reference

#include "mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h"

Public Attributes

unsigned boolNumBits {8}
 The number of bits to store a boolean value. More...
 
SPIRVSubByteTypeStorage subByteTypeStorage {SPIRVSubByteTypeStorage::Packed}
 How sub-byte values are storaged in memory. More...
 
bool emulateLT32BitScalarTypes {true}
 Whether to emulate narrower scalar types with 32-bit scalar types if not supported by the target. More...
 
bool use64bitIndex {false}
 Use 64-bit integers when converting index types. More...
 

Detailed Description

Definition at line 35 of file SPIRVConversion.h.

Member Data Documentation

◆ boolNumBits

unsigned mlir::SPIRVConversionOptions::boolNumBits {8}

The number of bits to store a boolean value.

Definition at line 37 of file SPIRVConversion.h.

◆ emulateLT32BitScalarTypes

bool mlir::SPIRVConversionOptions::emulateLT32BitScalarTypes {true}

Whether to emulate narrower scalar types with 32-bit scalar types if not supported by the target.

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. This option controls whether to use 32-bit types to emulate < 32-bits-wide scalars, if a scalar type of a certain bitwidth is not supported in the target environment. This requires the runtime to also feed in data with a matched bitwidth and layout for interface types. The runtime can do that by inspecting the SPIR-V module.

If the original scalar type has less than 32-bit, a multiple of its values will be packed into one 32-bit value to be memory efficient.

Definition at line 56 of file SPIRVConversion.h.

◆ subByteTypeStorage

SPIRVSubByteTypeStorage mlir::SPIRVConversionOptions::subByteTypeStorage {SPIRVSubByteTypeStorage::Packed}

How sub-byte values are storaged in memory.

Definition at line 40 of file SPIRVConversion.h.

◆ use64bitIndex

bool mlir::SPIRVConversionOptions::use64bitIndex {false}

Use 64-bit integers when converting index types.

Definition at line 59 of file SPIRVConversion.h.

Referenced by mlir::SPIRVTypeConverter::getIndexTypeBitwidth().


The documentation for this struct was generated from the following file: