MLIR
20.0.0git
|
A SPIR-V module serializer. More...
#include "Target/SPIRV/Deserialization/Deserializer.h"
Public Member Functions | |
Deserializer (ArrayRef< uint32_t > binary, MLIRContext *context) | |
Creates a deserializer for the given SPIR-V binary module. More... | |
LogicalResult | deserialize () |
Deserializes the remembered SPIR-V binary module. More... | |
OwningOpRef< spirv::ModuleOp > | collect () |
Collects the final SPIR-V ModuleOp. More... | |
A SPIR-V module serializer.
A SPIR-V binary module is a single linear stream of instructions; each instruction is composed of 32-bit words. The first word of an instruction records the total number of words of that instruction using the 16 higher-order bits. So this deserializer uses that to get instruction boundary and parse instructions and build a SPIR-V ModuleOp gradually.
Definition at line 120 of file Deserializer.h.
|
explicit |
Creates a deserializer for the given SPIR-V binary
module.
The SPIR-V ModuleOp will be created into `context.
Definition at line 51 of file Deserializer.cpp.
OwningOpRef< spirv::ModuleOp > spirv::Deserializer::collect | ( | ) |
Collects the final SPIR-V ModuleOp.
Definition at line 101 of file Deserializer.cpp.
Referenced by mlir::spirv::deserialize().
LogicalResult spirv::Deserializer::deserialize | ( | ) |
Deserializes the remembered SPIR-V binary module.
Definition at line 62 of file Deserializer.cpp.
Referenced by mlir::spirv::deserialize().