This patch introduces the `vector.mask` operation and the MaskableOpInterface as described in https://discourse.llvm.org/t/rfc-vector-masking-representation-in-mlir/64964. The `vector.mask` operation is used to predicate the execution of operations implementing the MaskableOpInterface. This interface will be implemented by maskable operations and provides information about its masking constraints and semantics. For now, only vector transfer and reduction ops implement the MaskableOpInterface for illustration and testing purposes. Reviewed By: nicolasvasilache, rriddle Differential Revision: https://reviews.llvm.org/D134939
17 lines
741 B
C++
17 lines
741 B
C++
//===- MaskingInterfaces.cpp - Masking interfaces ----------====-*- C++ -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "mlir/Dialect/Vector/Interfaces/MaskingInterfaces.h"
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// Masking Interfaces
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
/// Include the definitions of the masking interfaces.
|
|
#include "mlir/Dialect/Vector/Interfaces/MaskingInterfaces.cpp.inc"
|