MLIR 22.0.0git
MeshOps.cpp
Go to the documentation of this file.
1//===- MeshOps.cpp - MLIR SPIR-V Mesh Ops --------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// Defines the mesh operations in the SPIR-V dialect.
10//
11//===----------------------------------------------------------------------===//
12
16
17using namespace mlir;
18
19//===----------------------------------------------------------------------===//
20// spirv.EXT.EmitMeshTasks
21//===----------------------------------------------------------------------===//
22
23LogicalResult spirv::EXTEmitMeshTasksOp::verify() {
24 if (Value payload = getPayload()) {
25 // The operand definition restricts type to be SPIRV_AnyPointer, so we can
26 // cast here safely.
27 auto payloadType = cast<spirv::PointerType>(payload.getType());
28 if (payloadType.getStorageClass() !=
29 spirv::StorageClass::TaskPayloadWorkgroupEXT)
30 return emitOpError("payload must be a variable with a storage class of "
31 "TaskPayloadWorkgroupEXT");
32 }
33 return success();
34}
return success()
p<< " : "<< getMemRefType()<< ", "<< getType();}static LogicalResult verifyVectorMemoryOp(Operation *op, MemRefType memrefType, VectorType vectorType) { if(memrefType.getElementType() !=vectorType.getElementType()) return op-> emitOpError("requires memref and vector types of the same elemental type")
Given a list of lists of parsed operands, populates uniqueOperands with unique operands.
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
Definition Value.h:96
Include the generated interface declarations.