MLIR  22.0.0git
Public Attributes | List of all members
mlir::spirv::SerializationOptions Struct Reference

#include "mlir/Target/SPIRV/Serialization.h"

Public Attributes

bool emitSymbolName = true
 Whether to emit OpName instructions for SPIR-V symbol ops. More...
 
bool emitDebugInfo = false
 Whether to emit OpLine location information for SPIR-V ops. More...
 
bool saveModuleForValidation = false
 Whether to store a module to an additional file during serialization. More...
 
std::string validationFilePrefix = ""
 A prefix prepended to the file used when saveModuleForValidation is set to true. More...
 

Detailed Description

Definition at line 26 of file Serialization.h.

Member Data Documentation

◆ emitDebugInfo

bool mlir::spirv::SerializationOptions::emitDebugInfo = false

Whether to emit OpLine location information for SPIR-V ops.

Definition at line 30 of file Serialization.h.

◆ emitSymbolName

bool mlir::spirv::SerializationOptions::emitSymbolName = true

Whether to emit OpName instructions for SPIR-V symbol ops.

Definition at line 28 of file Serialization.h.

◆ saveModuleForValidation

bool mlir::spirv::SerializationOptions::saveModuleForValidation = false

Whether to store a module to an additional file during serialization.

This is used to store the SPIR-V module to the file in addition to writing it to os passed from the calling tool. This saved file is later used for validation.

Definition at line 35 of file Serialization.h.

◆ validationFilePrefix

std::string mlir::spirv::SerializationOptions::validationFilePrefix = ""

A prefix prepended to the file used when saveModuleForValidation is set to true.

This can either be a file prefix, or a relative or or an absolute path followed by the prefix. For example:

  • "foo" - Create files with a foo prefix in the current working directory. For example: fooXYZ123.spv, fooABC456.spv ... fooXXXXXX.spv. The last 6 characters will be a unique combination as generated by llvm::sys::fs::createUniqueFile.
  • "my/dir/foo" - Create files in my/dir with a foo prefix. The my/dir need to exists. For example: fooXYZ123.spv, fooABC456.spv ... fooXXXXXX.spv will be created and stored in /my/dir. Filenames follow the same pattern as above.
  • "/home/user/my/dir" - Same as above but using an absolute path.

Definition at line 51 of file Serialization.h.


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