#include "mlir/Target/SPIRV/Target.h"
#include "mlir/Dialect/GPU/IR/GPUDialect.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVAttributes.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVDialect.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVOps.h"
#include "mlir/Target/SPIRV/Serialization.h"
#include <cstdlib>
#include <cstring>
usingnamespacemlir;
usingnamespacemlir::spirv;
namespace {
class SPIRVTargetAttrImpl
: public gpu::TargetAttrInterface::FallbackModel<SPIRVTargetAttrImpl> { … };
}
void mlir::spirv::registerSPIRVTargetInterfaceExternalModels(
DialectRegistry ®istry) { … }
void mlir::spirv::registerSPIRVTargetInterfaceExternalModels(
MLIRContext &context) { … }
std::optional<SmallVector<char, 0>> SPIRVTargetAttrImpl::serializeToObject(
Attribute attribute, Operation *module,
const gpu::TargetOptions &options) const { … }
Attribute
SPIRVTargetAttrImpl::createObject(Attribute attribute, Operation *module,
const SmallVector<char, 0> &object,
const gpu::TargetOptions &options) const { … }