Files
gps/tools/local/circt/include/mlir/Dialect/LLVMIR/NVVMOps.h.inc
T
2026-07-12 11:01:51 +03:00

57587 lines
3.0 MiB
Plaintext

/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
|* *|
|* Op Declarations *|
|* *|
|* Automatically generated file, do not edit! *|
|* From: NVVMOps.td *|
|* *|
\*===----------------------------------------------------------------------===*/
namespace mlir::NVVM {
/// Performs floating point addition of the given arguments `lhs` and `rhs`
/// The `nvvm.addf` operation performs floating point addition of two floating
/// point operands of the same type.
///
/// The rounding mode is specified by the `rnd` attribute, saturation mode by
/// the `sat` attribute, and flush-to-zero by the `ftz` attribute.
///
/// For more information, see PTX ISA:
/// - [floating point addition](https://docs.nvidia.com/cuda/parallel-thread-execution/#floating-point-instructions-add)
/// - [half-precision floating point addition](https://docs.nvidia.com/cuda/parallel-thread-execution/#half-precision-floating-point-instructions-add)
class AddFOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class AggrSmemSize;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Thread that executes this op announces their arrival at the barrier with
/// given id and continue their execution.
///
/// The default barrier id is 0 that is similar to `nvvm.barrier` Op. When
/// `barrierId` is not present, the default barrier id is used.
///
/// The `aligned` attribute, which defaults to `true`, generates the aligned
/// form of the barrier (all threads in the CTA execute the same barrier
/// instruction). When set to `false`, the unaligned form is generated.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-bar)
class BarrierArriveOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// CTA Barrier Synchronization Op
/// The `nvvm.barrier` operation performs barrier synchronization and communication
/// within a CTA (Cooperative Thread Array). It causes executing threads to wait for
/// all non-exited threads participating in the barrier to arrive.
///
/// The operation takes the following optional operands and attributes:
///
/// - `barrierId`: Specifies a logical barrier resource with value 0 through 15.
/// Each CTA instance has sixteen barriers numbered 0..15. Defaults to 0 if not specified.
/// - `numberOfThreads`: Specifies the number of threads participating in the barrier.
/// When specified, the value must be a multiple of the warp size. If not specified,
/// all threads in the CTA participate in the barrier.
/// - `aligned`: Selects between the `.aligned` and non-`.aligned` forms of the
/// underlying `@llvm.nvvm.barrier.cta.*` intrinsic family. Defaults to true,
/// which requires every thread in the CTA to reach this same barrier
/// instruction, otherwise the behavior is undefined. Set it to false to emit
/// the non-`.aligned` form.
///
/// Reduction variants of the barrier instruction are modeled by the
/// `nvvm.barrier.reduction` op.
///
/// The barrier operation guarantees that when the barrier completes, prior memory
/// accesses requested by participating threads are performed relative to all threads
/// participating in the barrier. It also ensures that no new memory access is
/// requested by participating threads before the barrier completes.
///
/// When a barrier completes, the waiting threads are restarted without delay, and
/// the barrier is reinitialized so that it can be immediately reused.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-bar)
class BarrierOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// CTA Barrier Reduction Op
/// The `nvvm.barrier.reduction` operation performs barrier synchronization with a
/// reduction across the per-thread predicates contributed by participating threads
/// in a CTA.
///
/// - `barrierId`: Specifies a logical barrier resource with value 0 through 15.
/// Optional; defaults to barrier id 0 when not specified.
/// - `reductionOp`: The reduction kind (`popc`, `and`, `or`) applied across the
/// per-thread predicates.
/// - `reductionPredicate`: The per-thread i32 predicate. It is compared against
/// zero to form the i1 value fed into the reduction.
/// - `aligned`: Selects between the `.aligned` and non-`.aligned` forms of the
/// underlying `@llvm.nvvm.barrier.cta.red.*` intrinsic family. Defaults to
/// true, which requires every thread in the CTA to reach this same barrier
/// instruction, otherwise the behavior is undefined. Set it to false to emit
/// the non-`.aligned` form.
///
/// The result is the i32 reduction value computed across all threads
/// participating in the barrier.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-bar)
class BarrierReductionOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class BlockDimXOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class BlockDimYOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class BlockDimZOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class BlockIdXOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class BlockIdYOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class BlockIdZOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class BlockInClusterIdXOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class BlockInClusterIdYOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class BlockInClusterIdZOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Breakpoint Op
/// Breakpoint suspends execution of the program for debugging.
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#miscellaneous-instructions-brkpt)
class Breakpoint;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Bulk Store Op
/// Initializes a region of shared memory at the address given by `addr`.
/// The `size` operand specifies the number of bytes to initialize and must be
/// a multiple of 8.
/// The `initVal` operand specifies the value to initialize the memory to. The
/// only supported value is 0.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#data-movement-and-conversion-instructions-st-bulk)
class BulkStoreOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class Clock64Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class ClockOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Cluster Barrier Arrive Op
/// The `cluster.arrive` can be used by the threads within the cluster for synchronization and
/// communication. The `cluster.arrive` instruction marks the warps' arrival at the barrier
/// without causing the executing thread to wait for other participating threads.
///
/// The `aligned` attribute, when provided, generates the .aligned version of the PTX instruction.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-barrier-cluster)
class ClusterArriveOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Cluster Barrier Relaxed Arrive Op
/// The `cluster.arrive` can be used by the threads within the cluster for synchronization and
/// communication. The `cluster.arrive` instruction marks the warps' arrival at the barrier
/// without causing the executing thread to wait for other participating threads.
///
/// The `aligned` attribute, when provided, generates the .aligned version of the PTX instruction.
/// The .relaxed qualifier on `cluster.arrive` specifies that there are no memory
/// ordering and visibility guarantees provided for the memory accesses performed prior to
/// `cluster.arrive`.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-barrier-cluster)
class ClusterArriveRelaxedOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class ClusterDim;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class ClusterDimBlocksXOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class ClusterDimBlocksYOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class ClusterDimBlocksZOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class ClusterDimXOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class ClusterDimYOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class ClusterDimZOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class ClusterId;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class ClusterIdXOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class ClusterIdYOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class ClusterIdZOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Query the response of a clusterlaunchcontrol.try.cancel operation
/// `clusterlaunchcontrol.query.cancel` queries the response of a
/// `clusterlaunchcontrol.try.cancel` operation specified by operand
/// `try_cancel_response`.
///
/// Operand `query_type` specifies the type of query to perform and can be one
/// of the following:
/// - `is_canceled` : Returns true if the try cancel request succeeded,
/// and false otherwise.
/// - `get_first_cta_id_{x/y/z}` : Returns the x, y, or z coordinate of the
/// first CTA in the canceled cluster. Behaviour is defined only if the try
/// cancel request succeeded.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#parallel-synchronization-and-communication-instructions-clusterlaunchcontrol-query-cancel)
class ClusterLaunchControlQueryCancelOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Request atomically canceling the launch of a cluster that has not started running yet
/// `clusterlaunchcontrol.try.cancel` requests atomically canceling the launch
/// of a cluster that has not started running yet. It asynchronously writes an
/// opaque response to shared memory indicating whether the operation succeeded
/// or failed.
///
/// Operand `smemAddress` specifies the naturally aligned address of the
/// 16-byte wide shared memory location where the request's response is written.
///
/// Operand `mbarrier` specifies the mbarrier object used to track the
/// completion of the asynchronous operation.
///
/// If `multicast` is specified, the response is asynchronously written to the
/// corresponding local shared memory location (specifed by `addr`) of each CTA
/// in the requesting cluster.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#parallel-synchronization-and-communication-instructions-clusterlaunchcontrol-try-cancel)
class ClusterLaunchControlTryCancelOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Cluster Barrier Wait Op
/// The `cluster.wait` causes the executing thread to wait for all non-exited threads
/// of the cluster to perform `cluster.arrive`. The `aligned` attribute, when provided,
/// generates the .aligned version of the PTX instruction.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-barrier-cluster)
class ClusterWaitOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Convert an bf16x2 input to f4x2
/// This Op converts each of the given BF16 inputs in an bf16x2 vector to the specified fp4 type.
/// The result `dst` is returned as an i8 type where the converted values are
/// packed such that the value converted from the first element of `a` is
/// stored in the lower 4 bits of `dst` and the value converted from the second
/// element of `a` is stored in the upper 4 bits of `dst`.
/// The `relu` attribute, when set, lowers to the '.relu' variant of
/// the cvt instruction.
class ConvertBF16x2ToF4x2Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Convert an bf16x2 input to f6x2
/// This Op converts each of the given BF16 inputs in an bf16x2 vector to the specified fp6 type. The result `dst` is
/// represented either as an i16 type or as a vector of two i8 types.
/// If `dst` is returned as an i16 type, the converted values are packed such
/// that the value converted from the first element of `a` is stored in the
/// lower 8 bits of `dst` with 2 MSB bits padded with zeros and the value
/// converted from the second element of `a` is stored in the upper 8 bits of
/// `dst` with 2 MSB bits padded with zeros.
/// If `dst` is returned as a vector type, each converted value is stored as an
/// i8 element in the vector with 2 MSB bits padded with zeros.
/// The `relu` attribute, when set, lowers to the '.relu' variant of
/// the cvt instruction.
class ConvertBF16x2ToF6x2Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Convert a pair of bf16 inputs to f8x2
/// This Op converts the given bf16 inputs in a bf16x2 vector to the specified
/// f8 type. The result `dst` is represented either as a packed i16 type or as
/// a vector of two i8 types.
/// If `dst` is returned as an i16 type, the converted values are packed such
/// that the value converted from the first element of `a` is stored in the
/// lower 8 bits of `dst` and the value converted from the second element of
/// `a` is stored in the upper 8 bits of `dst`.
/// If `dst` is returned as a vector type, each converted value is stored as an
/// i8 element in the vector.
/// The `rnd` and `sat` attributes specify the rounding and saturation modes
/// respectively.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cvt)
class ConvertBF16x2ToF8x2Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Convert a pair of BF16 inputs to S2F6x2
/// This Op converts each of the given BF16 inputs in a bf16x2 vector to the
/// S2F6x2 type. The result `dst` can be either a packed i16 type or a vector
/// of two i8 types.
/// If `dst` is returned as an i16 type, the converted values are packed such
/// that the value converted from the first element of `a` is stored in the
/// lower 8 bits of `dst` and the value converted from the second element of
/// `a` is stored in the upper 8 bits of `dst`.
/// If `dst` is returned as a vector type, each converted value is stored as an
/// i8 element in the vector.
/// The `relu` attribute, when set, lowers to the '.relu' variant
/// of the cvt instruction.
/// The optional scaling-factors for each of the inputs are provided through
/// the operand `scaleFactor` as a packed i16 type. Only `ue8m0` is supported
/// as the type of the scale-factor currently.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cvt)
class ConvertBF16x2ToS2F6x2Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Convert an f16x2 input to f4x2
/// This Op converts each of the given F16 inputs in an f16x2 vector to the specified fp4 type.
/// The result `dst` is returned as an i8 type where the converted values are
/// packed such that the value converted from the first element of `a` is
/// stored in the lower 4 bits of `dst` and the value converted from the second
/// element of `a` is stored in the upper 4 bits of `dst`.
/// The `relu` attribute, when set, lowers to the '.relu' variant of
/// the cvt instruction.
class ConvertF16x2ToF4x2Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Convert an f16x2 input to f6x2
/// This Op converts each of the given F16 inputs in an f16x2 vector to the specified fp6 type. The result `dst` is
/// represented either as an i16 type or as a vector of two i8 types.
/// If `dst` is returned as an i16 type, the converted values are packed such
/// that the value converted from the first element of `a` is stored in the
/// lower 8 bits of `dst` with 2 MSB bits padded with zeros and the value
/// converted from the second element of `a` is stored in the upper 8 bits of
/// `dst` with 2 MSB bits padded with zeros.
/// If `dst` is returned as a vector type, each converted value is stored as an
/// i8 element in the vector with 2 MSB bits padded with zeros.
/// The `relu` attribute, when set, lowers to the '.relu' variant of
/// the cvt instruction.
class ConvertF16x2ToF6x2Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Convert an f16x2 input to f8x2
/// This Op converts the given f16 inputs in an f16x2 vector to the specified
/// f8 type.
/// The result `dst` is represented as an i16 type or as a vector
/// of two i8 types.
/// If `dst` is returned as an i16 type, the converted values from `a`
/// are packed such that the value converted from the first element of `a`
/// is stored in the upper 8 bits of `dst` and the value converted from the
/// second element of `a` is stored in the lower 8 bits of `dst`.
/// If `dst` is returned as a vector type, each converted value is stored as an
/// i8 element in the vector.
/// The `relu` attribute, when set, lowers to the '.relu' variant of
/// the cvt instruction.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cvt)
class ConvertF16x2ToF8x2Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Convert two F32 values to packed bf16x2.
/// Converts two F32 values to packed bf16x2 format with
/// the specified rounding mode. The `src_hi` and `src_lo` parameters
/// correspond to operands `a` and `b` in the PTX ISA, respectively.
///
/// The `random_bits` parameter is required for stochastic rounding and
/// provides the [random bits](https://docs.nvidia.com/cuda/parallel-thread-execution/#cvt-rs-rbits-layout-bf16) to be used for the conversion.
///
/// The `relu` attribute clamps negative results to 0.
///
/// The `sat` attribute determines saturation behavior.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cvt)
class ConvertF32x2ToBF16x2Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Convert two F32 values to packed f16x2.
/// Converts two F32 values to packed f16x2 format with
/// the specified rounding mode. The `src_hi` and `src_lo` parameters
/// correspond to operands `a` and `b` in the PTX ISA, respectively.
///
/// The `random_bits` parameter is required for stochastic rounding and
/// provides the [random bits](https://docs.nvidia.com/cuda/parallel-thread-execution/#cvt-rs-rbits-layout-f16) to be used for the conversion.
///
/// The `relu` attribute clamps negative results to 0.
///
/// The `sat` attribute determines saturation behavior.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cvt)
class ConvertF32x2ToF16x2Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Convert a pair of float inputs to f4x2
/// This Op converts each of the given float inputs to the specified fp4 type.
/// The result `dst` is returned as an i8 type where the converted values are
/// packed such that the value converted from `a` is stored in the upper 4 bits
/// of `dst` and the value converted from `b` is stored in the lower 4 bits of
/// `dst`.
/// The `relu` attribute, when set, lowers to the '.relu' variant of
/// the cvt instruction.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cvt)
class ConvertF32x2ToF4x2Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Convert a pair of float inputs to f6x2
/// This Op converts each of the given float inputs to the specified fp6 type.
/// The result `dst` is represented either as an i16 type or as a vector
/// of two i8 types.
/// If `dst` is returned as an i16 type, the converted values are packed such
/// that the value converted from `a` is stored in the upper 8 bits of `dst`
/// with 2 MSB bits padded with zeros and the value converted from `b` is
/// stored in the lower 8 bits of `dst` with 2 MSB bits padded with zeros.
/// If `dst` is returned as a vector type, each converted value is stored as an
/// i8 element in the vector.
/// The `relu` attribute, when set, lowers to the '.relu' variant of
/// the cvt instruction.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cvt)
class ConvertF32x2ToF6x2Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Convert a pair of float inputs to f8x2
/// This Op converts each of the given float inputs to the specified fp8 type.
/// The result `dst` is represented as an i16 type or as a vector
/// of two i8 types.
/// If `dst` is returned as an i16 type, the converted values are packed such
/// that the value converted from `a` is stored in the upper 8 bits of `dst`
/// and the value converted from `b` is stored in the lower 8 bits of `dst`.
/// If `dst` is returned as a vector type, each converted value is stored as an
/// i8 element in the vector.
/// The `rnd` and `sat` attributes specify the rounding and saturation modes respectively.
/// The `relu` attribute, when set, lowers to the '.relu' variant of
/// the cvt instruction.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cvt)
class ConvertF32x2ToF8x2Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Convert a pair of f32 inputs to S2F6x2
/// This Op converts each of the given f32 inputs to the
/// S2F6x2 type. The result `dst` can be either a packed i16 type or a vector
/// of two i8 types.
/// If `dst` is returned as an i16 type, the converted values are packed such
/// that the value converted from `a` is stored in the upper 8 bits of `dst`
/// and the value converted from `b` is stored in the lower 8 bits of `dst`.
/// If `dst` is returned as a vector type, each converted value is stored as an
/// i8 element in the vector.
/// The `relu` attribute, when set, lowers to the '.relu' variant
/// of the cvt instruction.
/// The optional scaling-factors for each of the inputs are provided through
/// the operand `scaleFactor` as a packed i16 type. Only `ue8m0` is supported
/// as the type of the scale-factor currently.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cvt)
class ConvertF32x2ToS2F6x2Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Convert vector<4xf32> to packed f4x4 with stochastic rounding (.rs) and satfinite
/// Converts a vector<4xf32> to packed f4x4 format using
/// stochastic rounding (.rs) mode with SATFINITE saturation. Randomness is
/// provided by the `rbits` parameter. The `dstTy` attribute specifies the
/// target floating-point format. The `relu` attribute clamps negative results to 0.
///
/// Note: These operations always use RS rounding mode and SATFINITE saturation mode.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cvt)
class ConvertF32x4ToF4x4Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Convert vector<4xf32> to packed f6x4 with stochastic rounding (.rs) and satfinite
/// Converts a vector<4xf32> to packed f6x4 format using
/// stochastic rounding (.rs) mode with SATFINITE saturation. Randomness is
/// provided by the `rbits` parameter. The `dstTy` attribute specifies the
/// target floating-point format. The `relu` attribute clamps negative results to 0.
///
/// Note: These operations always use RS rounding mode and SATFINITE saturation mode.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cvt)
class ConvertF32x4ToF6x4Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Convert vector<4xf32> to packed f8x4 with stochastic rounding (.rs) and satfinite
/// Converts a vector<4xf32> to packed f8x4 format using
/// stochastic rounding (.rs) mode with SATFINITE saturation. Randomness is
/// provided by the `rbits` parameter. The `dstTy` attribute specifies the
/// target floating-point format. The `relu` attribute clamps negative results to 0.
///
/// Note: These operations always use RS rounding mode and SATFINITE saturation mode.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cvt)
class ConvertF32x4ToF8x4Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Convert a pair of f4 inputs to bf16x2
/// This Op converts the given f4 inputs in a packed i8 to bf16.
///
/// The result `dst` is represented as a vector of bf16 elements.
///
/// The `relu` attribute, when set, lowers to the '.relu' variant of
/// the cvt instruction.
///
/// The `sat` attribute specifies the saturation mode.
///
/// The optional scaling-factors for each of the inputs are provided through
/// the operand `scaleFactor` as a packed i16 type. Only `ue8m0` is supported
/// as the type of the scale-factor currently.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cvt)
///
///
/// Example:
///
/// ```mlir
/// // Basic conversion; the f4x2 source is packed in a single i8.
/// %res1 = nvvm.convert.f4x2.to.bf16x2 %src
/// : i8 (f4E2M1FN) -> vector<2xbf16>
///
/// // Conversion with relu and saturation.
/// %res2 = nvvm.convert.f4x2.to.bf16x2 %src
/// {relu = true, sat = #nvvm.sat_mode<satfinite>}
/// : i8 (f4E2M1FN) -> vector<2xbf16>
///
/// // Conversion with a packed ue8m0 scale-factor.
/// %res3 = nvvm.convert.f4x2.to.bf16x2 %src, %scaleFactor
/// : i8 (f4E2M1FN) -> vector<2xbf16>
/// ```
class ConvertF4x2ToBF16x2Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Convert a pair of f4 inputs to f16x2
/// This Op converts the given f4 inputs in a packed i8 to f16.
///
/// The result `dst` is represented as a vector of f16 elements.
///
/// The `relu` attribute, when set, lowers to the '.relu' variant of
/// the cvt instruction.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cvt)
class ConvertF4x2ToF16x2Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Convert a pair of f6 inputs to bf16x2
/// This Op converts the given f6 inputs in a i8x2 vector to bf16.
///
/// The result `dst` is represented as a vector of bf16 elements.
///
/// The `relu` attribute, when set, lowers to the '.relu' variant of
/// the cvt instruction.
///
/// The `sat` attribute specifies the saturation mode.
///
/// The optional scaling-factors for each of the inputs are provided through
/// the operand `scaleFactor` as a packed i16 type. Only `ue8m0` is supported
/// as the type of the scale-factor currently.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cvt)
///
///
/// Example:
///
/// ```mlir
/// // Basic conversion from f6E2M3FN.
/// %res1 = nvvm.convert.f6x2.to.bf16x2 %src
/// : vector<2xi8> (f6E2M3FN) -> vector<2xbf16>
///
/// // Conversion from f6E3M2FN with relu and saturation.
/// %res2 = nvvm.convert.f6x2.to.bf16x2 %src
/// {relu = true, sat = #nvvm.sat_mode<satfinite>}
/// : vector<2xi8> (f6E3M2FN) -> vector<2xbf16>
///
/// // Conversion with a packed ue8m0 scale-factor.
/// %res3 = nvvm.convert.f6x2.to.bf16x2 %src, %scaleFactor
/// : vector<2xi8> (f6E2M3FN) -> vector<2xbf16>
/// ```
class ConvertF6x2ToBF16x2Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Convert a pair of f6 inputs to f16x2
/// This Op converts the given f6 inputs in a i8x2 vector to f16.
///
/// The result `dst` is represented as a vector of f16 elements.
///
/// The `relu` attribute, when set, lowers to the '.relu' variant of
/// the cvt instruction.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cvt)
class ConvertF6x2ToF16x2Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Convert a pair of f8 inputs to bf16x2
/// This Op converts the given f8 inputs in a i8x2 vector to bf16.
///
/// The result `dst` is represented as a vector of bf16 elements.
///
/// The `relu` attribute, when set, lowers to the '.relu' variant of
/// the cvt instruction.
///
/// The `sat` attribute specifies the saturation mode.
///
/// The optional scaling-factors for each of the inputs are provided through
/// the operand `scaleFactor` as a packed i16 type. Only `ue8m0` is supported
/// as the type of the scale-factor currently.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cvt)
///
///
/// Example:
///
/// ```mlir
/// // Basic conversion from f8E4M3FN.
/// %res1 = nvvm.convert.f8x2.to.bf16x2 %src
/// : vector<2xi8> (f8E4M3FN) -> vector<2xbf16>
///
/// // Conversion from f8E5M2 with relu and saturation.
/// %res2 = nvvm.convert.f8x2.to.bf16x2 %src
/// {relu = true, sat = #nvvm.sat_mode<satfinite>}
/// : vector<2xi8> (f8E5M2) -> vector<2xbf16>
///
/// // Conversion with a packed ue8m0 scale-factor.
/// %res3 = nvvm.convert.f8x2.to.bf16x2 %src, %scaleFactor
/// : vector<2xi8> (f8E4M3FN) -> vector<2xbf16>
/// ```
class ConvertF8x2ToBF16x2Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Convert a pair of f8 inputs to f16x2
/// This Op converts the given f8 inputs in a i8x2 vector to f16.
///
/// The result `dst` is represented as a vector of f16 elements.
///
/// The `relu` attribute, when set, lowers to the '.relu' variant of
/// the cvt instruction.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cvt)
class ConvertF8x2ToF16x2Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Convert the given float input to TF32
/// This Op converts the given f32 input to tf32.
/// The result `res` is represented as an i32 type.
/// The `relu` attribute, when set, lowers to the '.relu' variant of
/// the cvt instruction. The `rnd` and `sat` attributes specify the
/// the rounding and saturation modes respectively.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cvt)
class ConvertFloatToTF32Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Convert s2f6x2 to bf16x2
/// This Op converts a pair of s2f6x2 inputs to bf16x2 type. The result `dst`
/// is represented as a vector of two bf16 elements.
///
/// The `relu` attribute, when set, lowers to the '.relu' variant
/// of the cvt instruction.
///
/// The optional scaling-factors for each of the inputs are provided through
/// the operand `scaleFactor` as a packed i16 type. Only `ue8m0` is supported
/// as the type of the scale-factor currently.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cvt)
class ConvertS2F6x2ToBF16x2Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Cosine (fast approximation)
/// Computes a fast approximation of the cosine of the input value (in
/// radians). The `ftz` attribute, when set, flushes subnormal inputs
/// and results to sign-preserving zero.
class CosOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// This Op commits all prior initiated but uncommitted cp.async.bulk
/// instructions into a cp.async.bulk-group.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cp-async-bulk-commit-group)
class CpAsyncBulkCommitGroupOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Async bulk copy from global to Shared {cta or cluster} memory
/// Initiates an asynchronous copy operation from global memory to shared
/// memory or shared_cluster memory.
///
/// The `multicastMask` operand is optional and can be used only when the
/// destination is shared::cluster memory. When it is present, this Op copies
/// data from global memory to shared memory of multiple CTAs in the cluster.
/// Operand `multicastMask` specifies the destination CTAs in the cluster such
/// that each bit position in the 16-bit `multicastMask` operand corresponds to
/// the `nvvm.read.ptx.sreg.ctaid` of the destination CTA.
///
/// The `l2CacheHint` operand is optional, and it is used to specify cache
/// eviction policy that may be used during the memory access.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cp-async-bulk)
class CpAsyncBulkGlobalToSharedClusterOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Async bulk prefetch from global memory to L2 cache
/// Initiates an asynchronous prefetch of data from the location
/// specified by `srcMem` to the L2 cache.
///
/// The `l2CacheHint` operand is optional, and it is used to specify cache
/// eviction policy that may be used during the memory access.
///
/// Example:
/// ```mlir
/// nvvm.cp.async.bulk.prefetch %src, %size : !llvm.ptr<1>
///
/// // with l2_cache_hint
/// nvvm.cp.async.bulk.prefetch %src, %size l2_cache_hint = %ch : !llvm.ptr<1>
/// ```
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cp-async-bulk-prefetch)
class CpAsyncBulkPrefetchOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Async bulk copy from Shared CTA memory to Global memory
/// Initiates an asynchronous copy operation from Shared CTA memory to
/// global memory. The 32-bit operand `size` specifies the amount of
/// memory to be copied, in terms of number of bytes. `size` must be a
/// multiple of 16. The `l2CacheHint` operand is optional, and it is used
/// to specify cache eviction policy that may be used during the memory
/// access. The `byteMask` operand is optional. The i-th bit in the 16-bit
/// wide `byteMask` specifies whether the i-th byte of each 16-byte wide
/// chunk of source data is copied to the destination. If the bit is set,
/// the byte is copied.
///
/// Example:
/// ```mlir
/// nvvm.cp.async.bulk.global.shared.cta %dst, %src, %size
/// : !llvm.ptr<1>, !llvm.ptr<3>
///
/// // with l2_cache_hint
/// nvvm.cp.async.bulk.global.shared.cta %dst, %src, %size l2_cache_hint = %ch
/// : !llvm.ptr<1>, !llvm.ptr<3>
///
/// // with byte_mask
/// nvvm.cp.async.bulk.global.shared.cta %dst, %src, %size byte_mask = %mask
/// : !llvm.ptr<1>, !llvm.ptr<3>
///
/// // with both l2_cache_hint and byte_mask
/// nvvm.cp.async.bulk.global.shared.cta %dst, %src, %size l2_cache_hint = %ch byte_mask = %mask
/// : !llvm.ptr<1>, !llvm.ptr<3>
/// ```
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cp-async-bulk)
class CpAsyncBulkSharedCTAToGlobalOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Async bulk copy from Shared CTA memory to Shared cluster memory
/// Initiates an asynchronous copy operation from Shared CTA memory to Shared
/// cluster memory.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cp-async-bulk)
class CpAsyncBulkSharedCTAToSharedClusterOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Initiates an asynchronous copy operation on the tensor data from global
/// memory to shared::cluster (or) shared::cta memory. This Op supports all
/// the load modes specified in `TMALoadMode`.
///
/// The `multicastMask` operand is optional. When it is present, the Op copies
/// data from global memory to shared memory of multiple CTAs in the cluster.
/// Operand `multicastMask` specifies the destination CTAs in the cluster such
/// that each bit position in the 16-bit `multicastMask` operand corresponds to
/// the `nvvm.read.ptx.sreg.ctaid` of the destination CTA.
///
/// The `l2CacheHint` operand is optional, and it is used to specify cache
/// eviction policy that may be used during the memory access.
///
/// When the `isCTAOnly` attribute is set to true, the destination is
/// shared::cta only. Hence, `multicastMask` and `CTAGroup` are not applicable
/// when `isCTAOnly` is true.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cp-async-bulk-tensor)
class CpAsyncBulkTensorGlobalToSharedClusterOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Initiates an asynchronous prefetch operation on the tensor data from global
/// memory to L2 cache. This Op supports all the load modes specified in
/// `TMALoadMode`.
///
/// The `l2CacheHint` operand is optional, and it is used to specify cache
/// eviction policy that may be used during the memory access.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cp-async-bulk-prefetch-tensor)
class CpAsyncBulkTensorPrefetchOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Initiates an asynchronous reduction operation of tensor data in
/// global memory with tensor data in shared memory.
///
/// The `mode` attribute indicates whether the copy mode is tile or im2col.
/// The `redOp` attribute specifies the reduction operations applied.
/// The supported reduction operations are:
/// {add, min, max, inc, dec, and, or, xor}
///
/// The `l2CacheHint` operand is optional, and it is used to specify cache
/// eviction policy that may be used during the memory access.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cp-reduce-async-bulk-tensor)
class CpAsyncBulkTensorReduceOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Initiates an asynchronous copy of the tensor data from shared::cta
/// memory to global memory. This Op supports all the store modes specified in
/// `TMAStoreMode`.
///
/// The `l2CacheHint` operand is optional, and it is used to specify cache
/// eviction policy that may be used during the memory access.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#data-movement-and-conversion-instructions-cp-async-bulk-tensor)
class CpAsyncBulkTensorSharedCTAToGlobalOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Op waits for completion of the most recent bulk async-groups.
///
/// The `$group` operand tells waiting has to be done until for $group or fewer
/// of the most recent bulk async-groups. If `$group` is 0, the op wait until
/// all the most recent bulk async-groups have completed.
///
/// The `$read` indicates that the waiting has to be done until all the bulk
/// async operations in the specified bulk async-group have completed reading
/// from their source locations.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cp-async-bulk-wait-group)
class CpAsyncBulkWaitGroupOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class CpAsyncCommitGroupOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// NVVM Dialect Op for cp.async.mbarrier.arrive
/// The `cp.async.mbarrier.arrive` Op makes the *mbarrier object* track
/// all prior cp.async operations initiated by the executing thread.
/// The `addr` operand specifies the address of the *mbarrier object*
/// in generic or shared::cta address space. When it is generic, the
/// underlying memory should fall within the shared::cta space;
/// otherwise the behavior is undefined. The `noinc` attr impacts
/// how the mbarrier's state is updated.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-cp-async-mbarrier-arrive)
class CpAsyncMBarrierArriveOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class CpAsyncOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class CpAsyncWaitGroupOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Divide one value by another
/// Divides lhs by rhs, stores result in res (`res = lhs / rhs`).
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#floating-point-instructions-div)
class DivFOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Two-way 16-bit to 8-bit dot product-accumulate instruction
/// Performs a two-way 16-bit to 8-bit dot-product which is accumulated in a
/// 32-bit result.
/// Operand `a` is a vector of two 16-bit elements and operand `b` a vector
/// of four 8-bit elements between which the dot product is computed.
///
/// The `a_type` and `b_type` attributes specify the type of the elements in `a`
/// and `b` respectively.
/// If `a_type` or `b_type` is `s`, then the elements in the corresponding
/// vector are sign-extended to 32-bit before the dot product is computed.
/// If `a_type` or `b_type` is `u`, then the elements in the corresponding
/// vector are zero-extended to 32-bit instead.
///
/// The `b_hi` boolean attribute specifies which two bytes of `b` are used for
/// the dot product. If `b_hi` is true, then the dot product is computed
/// between `a` and elements at indices 2 and 3 of `b`. If `b_hi` is false,
/// then the dot product is computed between `a` and elements at indices 0 and
/// 1 of `b`.
///
/// Operand `c` is a 32-bit integer to which the result is accumulated. It is
/// treated as holding a signed integer if any of `a_type` or `b_type` is
/// signed.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#integer-arithmetic-instructions-dp2a)
class DotAccumulate2WayOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Four-way byte dot product-accumulate instruction
/// Performs a four-way byte dot-product which is accumulated in a 32-bit
/// result.
/// Operand `a` and `b` are vectors of 4 bytes between which the dot product is
/// computed.
///
/// The `a_type` and `b_type` attributes specify the type of the elements in `a`
/// and `b` respectively.
/// If `a_type` or `b_type` is `signed`, then the elements in the corresponding
/// vector are sign-extended to 32-bit before the dot product is computed.
/// If `a_type` or `b_type` is `unsigned`, then the elements in the
/// corresponding vector are zero-extended to 32-bit instead.
///
/// Operand `c` is a 32-bit integer to which the result is accumulated. It is
/// treated as holding a signed integer if any of `a_type` or `b_type` is `s8`.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#integer-arithmetic-instructions-dp4a)
class DotAccumulate4WayOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class DynamicSmemSize;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Elect one leader thread
/// The `elect.sync` instruction elects one predicated active leader
/// thread from among a set of threads specified in the `membermask`.
/// When the `membermask` is not provided explicitly, a default value
/// of `0xFFFFFFFF` is used. The predicate result is set to `True` for
/// the leader thread, and `False` for all other threads.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-elect-sync)
class ElectSyncOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg0Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg10Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg11Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg12Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg13Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg14Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg15Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg16Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg17Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg18Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg19Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg1Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg20Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg21Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg22Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg23Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg24Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg25Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg26Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg27Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg28Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg29Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg2Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg30Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg31Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg3Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg4Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg5Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg6Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg7Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg8Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class EnvReg9Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Base-2 exponential (fast approximation)
/// Computes a fast approximation of 2 raised to the power of the input
/// value. The `ftz` attribute, when set, flushes subnormal inputs and
/// results to sign-preserving zero.
class Ex2Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Exit Op
/// Ends execution of a thread.
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#control-flow-instructions-exit)
class Exit;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Fence operation that applies on the prior nvvm.mbarrier.init
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-membar)
class FenceMbarrierInitOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Uni-directional proxy fence operation with acquire semantics
/// `fence.proxy.acquire` is a uni-directional fence used to establish ordering
/// between a prior memory access performed via the generic proxy and a
/// subsequent memory access performed via the tensormap proxy
///
/// The address operand `addr` and the operand `size` together specify the
/// memory range `[addr, addr+size)` on which the ordering guarantees on the
/// memory accesses across the proxies is to be provided. The only supported
/// value for the `size` operand is 128 and must be an immediate. Generic Addressing
/// is used unconditionally, and the address specified by the operand `addr` must
/// fall within the `.global` state space. Otherwise, the behavior is undefined
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-membar)
class FenceProxyAcquireOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Fence operation with proxy to establish an ordering between memory accesses
/// that may happen through different proxies.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-membar)
class FenceProxyOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Uni-directional proxy fence operation with release semantics
/// `fence.proxy.release` is a uni-directional fence used to establish ordering
/// between a prior memory access performed via the generic proxy and a
/// subsequent memory access performed via the tensormap proxy. `fence.proxy.release`
/// operation can form a release sequence that synchronizes with an acquire
/// sequence that contains the fence.proxy.acquire proxy fence operation
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-membar)
class FenceProxyReleaseOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Uni-directional proxy fence operation with sync_restrict
/// The `nvvm.fence.proxy.sync_restrict` Op used to establish
/// ordering between a prior memory access performed between proxies. Currently,
/// the ordering is only supported between async and generic proxies. `sync_restrict`
/// restricts `acquire` memory semantics to `shared_cluster` and `release` memory
/// semantics to `shared_cta` with cluster scope.
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-membar)
class FenceProxySyncRestrictOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class FenceScClusterOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Uni-directional thread fence operation
/// The `nvvm.fence.sync_restrict` Op restricts the class of memory
/// operations for which the fence instruction provides the memory ordering guarantees.
/// `sync_restrict` restricts `acquire` memory semantics to `shared_cluster` and
/// `release` memory semantics to `shared_cta` with cluster scope.
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-membar)
class FenceSyncRestrictOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Performs floating point fused multiply-add operation with support for mixed
/// precision operands
/// The `nvvm.fma` operation performs floating point fused multiply-add of
/// three operands of the same type.
///
/// The rounding mode is specified by the `rnd` attribute, saturation mode by
/// the `sat` attribute, flush-to-zero by the `ftz` attribute, and ReLU by the
/// `relu` attribute.
///
/// Out-of-bounds (OOB) behavior is controlled by the `oob` attribute. `oob`
/// clamps the result to 0 if either of the operands is `OOB NaN` (see [Tensors](https://docs.nvidia.com/cuda/parallel-thread-execution/#tensors)).
///
/// For more information, see PTX ISA:
/// - [floating point fused multiply-add](https://docs.nvidia.com/cuda/parallel-thread-execution/#floating-point-instructions-fma)
/// - [half-precision floating point fused multiply-add](https://docs.nvidia.com/cuda/parallel-thread-execution/#half-precision-floating-point-instructions-fma)
class FmaOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class GlobalTimerLoOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class GlobalTimerOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class GridDimXOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class GridDimYOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class GridDimZOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class GridIdOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// If the $kind attribute is set to `wait`, it causes the
/// executing thread to wait until all prerequisite grids in flight
/// have completed and all the memory operations from the prerequisite grids
/// are performed and made visible to the current grid.
///
/// When the $kind is launch_dependents, it signals that specific dependents
/// the runtime system designated to react to this instruction can be scheduled
/// as soon as all other CTAs in the grid issue the same instruction or have
/// completed.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#parallel-synchronization-and-communication-instructions-griddepcontrol)
class GriddepcontrolOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Inline PTX Op
/// This op allows using PTX directly within the NVVM
/// dialect, while greatly simplifying llvm.inline_asm generation. It
/// automatically handles register size selection and sets the correct
/// read/write access for each operand. The operation leverages the
/// `BasicPtxBuilderInterface` to abstract away low-level details of
/// PTX assembly formatting.
///
/// The `predicate` attribute is used to specify a predicate for the
/// PTX instruction.
///
/// Example 1: Read-only Parameters
/// ```mlir
/// nvvm.inline_ptx "mbarrier.init.b64 [$0], $1;" (%barrier_gen, %count) : !llvm.ptr, i32
///
/// // Lowers to:
/// llvm.inline_asm has_side_effects asm_dialect = att
/// "mbarrier.init.b64 [$0], $1;", "l,r" %arg0, %arg2 : (!llvm.ptr, i32) -> ()
/// ```
///
/// Example 2: Read-only and Write-only Parameters
/// ```mlir
/// %0 = nvvm.inline_ptx "ex2.approx.ftz.f32 $0, $1;" (%input) : f32 -> f32
///
/// // Lowers to:
/// %0 = llvm.inline_asm has_side_effects asm_dialect = att
/// "ex2.approx.ftz.f32 $0, $1;", "=f,f" %arg0 : (f32) -> f32
/// ```
///
/// Example 3: Predicate Usage
/// ```mlir
/// nvvm.inline_ptx "mbarrier.init.b64 [$0], $1;" (%barrier_gen, %count),
/// predicate = %pred : !llvm.ptr, i32, i1
///
/// // Lowers to:
/// llvm.inline_asm has_side_effects asm_dialect = att
/// "@$2 mbarrier.init.b64 [$0], $1;", "l,r,b" %arg0, %arg2, %arg3
/// : (!llvm.ptr, i32, i1) -> ()
/// ```
class InlinePtxOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class LaneIdOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class LaneMaskEqOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class LaneMaskGeOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class LaneMaskGtOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class LaneMaskLeOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class LaneMaskLtOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// cooperative matrix load
class LdMatrixOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Base-2 logarithm (fast approximation)
/// Computes a fast approximation of the base-2 logarithm of the input
/// value. The `ftz` attribute, when set, flushes subnormal inputs and
/// results to sign-preserving zero.
class Log2Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// MBarrier arrive_drop with expected transaction count
/// The `nvvm.mbarrier.arrive_drop.expect_tx` operation is similar to the
/// `nvvm.mbarrier.arrive.expect_tx` operation except that it performs an
/// `arrive_drop` operation instead of only an `arrive` operation.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-mbarrier-arrive-drop)
class MBarrierArriveDropExpectTxOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// MBarrier Arrive-Drop No-Complete Operation
/// The `nvvm.mbarrier.arrive_drop.nocomplete` operation decrements the expected
/// arrival count of the *mbarrier object* by the amount `count` and then performs
/// an arrive-on operation on the *mbarrier object* with the guarantee that it
/// will not cause the barrier to complete its current phase.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-mbarrier-arrive-drop)
class MBarrierArriveDropNocompleteOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// MBarrier Arrive-Drop Operation
/// The `nvvm.mbarrier.arrive_drop` operation decrements the expected arrival
/// count of the *mbarrier object* by `count` and then performs an arrive-on
/// operation. When `count` is not specified, it defaults to 1. The decrement
/// of the expected arrival count applies to all the subsequent phases of the
/// *mbarrier object*. The remaining semantics are identical to those of the
/// `nvvm.mbarrier.arrive` operation.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-mbarrier-arrive-drop)
class MBarrierArriveDropOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// MBarrier Arrive with Expected Transaction Count
/// The `nvvm.mbarrier.arrive.expect_tx` operation performs an expect-tx operation
/// followed by an arrive-on operation on the *mbarrier object*. Uses the default
/// `.release.cta` semantics. This release pattern establishes memory ordering for
/// operations occurring in program order before this arrive instruction by making
/// operations from the current thread visible to subsequent operations in other
/// threads within the CTA. When other threads perform corresponding acquire operations
/// (like 'mbarrier.test.wait'), they synchronize with this release pattern.
///
/// This operation first performs an expect-tx operation with the specified transaction
/// count, then performs an arrive-on operation with an implicit count of 1. The
/// expect-tx operation increases the expect-count of the *mbarrier object* by the
/// specified value (i.e. `txcount`), setting the current phase to expect and track
/// the completion of additional asynchronous transactions.
///
/// The operation takes the following operands:
/// - `addr`: A pointer to the memory location of the *mbarrier object*. Uses generic
/// addressing, but the address must still be in the shared memory space.
/// - `txcount`: An unsigned integer specifying the expected transaction count
/// for the expect-tx operation. This represents the number of asynchronous transactions
/// expected to complete before the barrier phase completes.
/// - `scope`: This specifies the set of threads that directly observe the memory
/// synchronizing effect of the `mbarrier.test.wait` operation.
/// - `relaxed`: When set to true, the `arrive` operation has relaxed memory semantics
/// and does not provide any ordering or visibility guarantees.
/// - `predicate`: Optional predicate for conditional execution used only when lowering to
/// inline-ptx.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-mbarrier-arrive-drop)
class MBarrierArriveExpectTxOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// MBarrier Arrive No-Complete Operation
/// The `nvvm.mbarrier.arrive.nocomplete` operation performs an arrive-on operation
/// on the *mbarrier object* with the guarantee that it will not cause the barrier to
/// complete its current phase. Uses the default `.release.cta` semantics. This release
/// pattern establishes memory ordering for operations occurring in program order before
/// this arrive instruction by making operations from the current thread visible to
/// subsequent operations in other threads within the CTA. When other threads perform
/// corresponding acquire operations (like 'mbarrier.test.wait'), they synchronize with
/// this release pattern.
///
/// This operation causes the executing thread to signal its arrival at the barrier
/// with a specified count, but ensures that the barrier phase will not complete as
/// a result of this operation. The operation returns an opaque value that
/// captures the phase of the *mbarrier object* prior to the arrive-on operation.
///
/// The operation takes the following operands:
/// - `addr`: A pointer to the memory location of the *mbarrier object*. The `addr`
/// must be a pointer to generic or shared::cta memory. When it is generic, the
/// underlying address must be within the shared::cta memory space; otherwise
/// the behavior is undefined.
/// - `count`: Integer specifying the count argument to the arrive-on operation.
/// Must be in the valid range as specified in the *mbarrier object* contents.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-mbarrier-arrive)
class MBarrierArriveNocompleteOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// MBarrier Arrive Operation
/// The `nvvm.mbarrier.arrive` operation performs an arrive-on operation on the
/// *mbarrier object* at the specified address. Uses the default `.release.cta` semantics.
/// This release pattern establishes memory ordering for operations occurring in program
/// order before this arrive instruction by making operations from the current thread
/// visible to subsequent operations in other threads within the CTA. When other threads
/// perform corresponding acquire operations (like 'mbarrier.test.wait'), they synchronize
/// with this release pattern.
///
/// This operation causes the executing thread to signal its arrival at the barrier.
///
/// - `res`: When the `space` is not shared_cluster, this operation returns an
/// opaque 64-bit value capturing the phase of the *mbarrier object* prior to
/// the arrive-on operation. The contents of this return value are
/// implementation-specific. An *mbarrier object* located in the shared_cluster
/// space cannot return a value.
///
/// The operation takes the following operands:
/// - `addr`: A pointer to the memory location of the *mbarrier object*. The `addr`
/// must be a pointer to generic or shared_cta or shared_cluster memory. When it
/// is generic, the underlying address must be within the shared_cta memory space;
/// otherwise the behavior is undefined.
/// - `count`: This specifies the amount by which the pending arrival count is
/// decremented. If the `count` argument is not specified, the pending arrival
/// count is decremented by 1.
/// - `scope`: This specifies the set of threads that directly observe the memory
/// synchronizing effect of the `mbarrier.arrive` operation.
/// - `space`: This indicates the memory space where the mbarrier object resides.
/// - `relaxed`: When set to true, the `arrive` operation has relaxed memory semantics
/// and does not provide any ordering or visibility guarantees.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-mbarrier-arrive)
class MBarrierArriveOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// MBarrier complete-tx Operation
/// The `nvvm.mbarrier.complete_tx` operation decrements the transaction
/// count of the *mbarrier object* at `addr` by `txcount`. It also signals
/// the completion of asynchronous transactions that were tracked by the
/// current phase. The `scope` specifies the set of threads that can directly
/// observe the memory synchronizing effect of the `mbarrier.complete_tx`
/// operation. `CTA` and `CLUSTER` are the only allowed values for `scope`.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-mbarrier-complete-tx)
class MBarrierCompleteTxOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// MBarrier expect-tx Operation
/// The `nvvm.mbarrier.expect_tx` operation increases the transaction count
/// of the mbarrier located at `addr` by `txcount` amount. The `scope`
/// specifies the set of threads that can directly observe the memory
/// synchronizing effect of the `mbarrier.expect_tx` operation. `CTA`
/// and `CLUSTER` are the only allowed values for `scope`.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-mbarrier-expect-tx)
class MBarrierExpectTxOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// MBarrier Initialization Op
/// The `nvvm.mbarrier.init` operation initializes an *mbarrier object* at the specified
/// memory location.
///
/// This operation initializes the *mbarrier object* with the following state:
/// - Current phase: 0
/// - Expected arrival count: `count`
/// - Pending arrival count: `count`
/// - Transaction count (tx-count): 0
///
/// The operation takes the following operands:
/// - `addr`: A pointer to the memory location of the *mbarrier object*. The `addr`
/// must be a pointer to generic or shared::cta memory. When it is generic, the
/// underlying address must be within the shared::cta memory space; otherwise
/// the behavior is undefined.
/// - `count`: Integer specifying the number of threads that will participate in barrier
/// synchronization. Must be in the range [1, 2²⁰ - 1].
/// - `predicate`: Optional predicate for conditional execution.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-mbarrier-init)
class MBarrierInitOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// MBarrier Invalidation Operation
/// The `nvvm.mbarrier.inval` operation invalidates an *mbarrier object* at the
/// specified memory location.
///
/// This operation marks the *mbarrier object* as invalid, making it safe to repurpose
/// the memory location for other uses or to reinitialize it as a new *mbarrier object*.
/// It is undefined behavior if the *mbarrier object* is already invalid.
///
/// The operation takes the following operand:
/// - `addr`: A pointer to the memory location of the *mbarrier object*. The `addr`
/// must be a pointer to generic or shared::cta memory. When it is generic, the
/// underlying address must be within the shared::cta memory space; otherwise
/// the behavior is undefined.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-mbarrier-inval)
class MBarrierInvalOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// MBarrier Non-Blocking Test Wait Operation
/// The `nvvm.mbarrier.test.wait` operation performs a non-blocking test for the
/// completion of a specific phase of an *mbarrier object*. It uses the default
/// `.acquire.cta` semantics. This acquire pattern establishes memory ordering for
/// operations occurring in program order after this wait instruction by making
/// operations from other threads in the CTA visible to subsequent operations in the current
/// thread. When this wait completes, it synchronizes with the corresponding release
/// pattern from the `mbarrier.arrive` operation, establishing memory ordering within
/// the CTA.
///
/// This operation tests whether the mbarrier phase specified by the state operand
/// has completed. It is a non-blocking instruction that immediately returns the
/// completion status without suspending the executing thread.
///
/// The operation takes the following operands:
/// - `addr`: A pointer to the memory location of the *mbarrier object*. Uses generic
/// addressing, but the address must still be in the shared memory space.
/// - `stateOrPhase`: This argument represents a `state` when it is a 64-bit value
/// and represents a `phase` when it is a 32-bit value. The `state` is an opaque
/// value returned by a previous `mbarrier.arrive` operation on the same
/// *mbarrier object* during the current or immediately preceding phase.
/// The `phase` is an integer specifying the phase parity (0 or 1).
/// Even phases have parity 0, odd phases have parity 1.
/// - `scope`: This specifies the set of threads that directly observe the memory
/// synchronizing effect of the `mbarrier.test.wait` operation.
/// - `relaxed`: When set to true, the `arrive` operation has relaxed memory semantics
/// and does not provide any ordering or visibility guarantees.
///
/// The operation returns a boolean value indicating whether the specified phase
/// has completed:
/// - `true`: The immediately preceding phase has completed
/// - `false`: The phase is still incomplete (current phase)
///
/// **Memory ordering guarantees**: When this wait returns true, the following
/// ordering guarantees hold:
///
/// 1. All memory accesses (except async operations) requested prior to
/// `mbarrier.arrive` having release semantics by participating CTA threads
/// are visible to the executing thread.
/// 2. All `cp.async` operations requested prior to `cp.async.mbarrier.arrive`
/// by participating CTA threads are visible to the executing thread.
/// 3. All `cp.async.bulk` operations using the same *mbarrier object* requested
/// prior to `mbarrier.arrive` having release semantics by participating CTA
/// threads are visible to the executing thread.
/// 4. Memory accesses requested after this wait are not visible to memory
/// accesses performed prior to `mbarrier.arrive` by other participating
/// threads.
/// 5. No ordering guarantee exists for memory accesses by the same thread
/// between `mbarrier.arrive` and this wait.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#parallel-synchronization-and-communication-instructions-mbarrier-test-wait-try-wait)
class MBarrierTestWaitOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// MBarrier try wait on state or phase with an optional timelimit
/// The `nvvm.mbarrier.try_wait` operation checks whether the specified
/// *mbarrier object* at `addr` has completed the given phase. Note that
/// unlike the `nvvm.mbarrier.test.wait` operation, the try_wait operation
/// is a potentially-blocking one. If the phase is not yet complete, the
/// calling thread may be suspended. A suspended thread resumes execution
/// once the phase completes or when a system-defined timeout occurs.
/// Optionally, the `ticks` operand can be used to provide a custom timeout
/// (in nanoseconds), overriding the system-defined one. The semantics of
/// this operation and its operands are otherwise similar to those of the
/// `nvvm.mbarrier.test.wait` Op.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#parallel-synchronization-and-communication-instructions-mbarrier-test-wait-try-wait)
class MBarrierTryWaitOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// MBarrier Potentially-Blocking Try Wait with Phase Parity
/// The `nvvm.mbarrier.try_wait.parity` operation performs a potentially-blocking
/// test for the completion of a specific phase of an *mbarrier object* using phase
/// parity. It uses the default `.acquire.cta` semantics. This acquire pattern
/// establishes memory ordering for operations occurring in program order after this
/// wait instruction by making operations from other threads in the CTA visible to subsequent
/// operations in the current thread. When this wait completes, it synchronizes with
/// the corresponding release pattern from the `mbarrier.arrive` operation, establishing
/// memory ordering within the CTA.
///
/// This operation waits for the completion of the mbarrier phase indicated by the
/// phase parity. While it uses the underlying PTX `mbarrier.try_wait.parity`
/// instruction, this MLIR operation generates a loop that enforces the test to
/// complete before continuing execution, ensuring the barrier phase is actually
/// completed rather than potentially timing out.
///
/// The operation takes the following operands:
/// - `addr`: A pointer to the memory location of the *mbarrier object*. Uses generic
/// addressing, but the address must still be in the shared memory space.
/// - `phase`: An integer specifying the phase parity (0 or 1). Even phases
/// have parity 0, odd phases have parity 1.
/// - `ticks`: An unsigned integer specifying the suspend time hint in
/// nanoseconds. This may be used instead of the system-dependent time limit.
///
/// **Memory ordering guarantees**: When this wait returns true, the following
/// ordering guarantees hold:
///
/// 1. All memory accesses (except async operations) requested prior to
/// `mbarrier.arrive` having release semantics by participating CTA threads
/// are visible to the executing thread.
/// 2. All `cp.async` operations requested prior to `cp.async.mbarrier.arrive`
/// by participating CTA threads are visible to the executing thread.
/// 3. All `cp.async.bulk` operations using the same *mbarrier object* requested
/// prior to `mbarrier.arrive` having release semantics by participating CTA
/// threads are visible to the executing thread.
/// 4. Memory accesses requested after this wait are not visible to memory
/// accesses performed prior to `mbarrier.arrive` by other participating
/// threads.
/// 5. No ordering guarantee exists for memory accesses by the same thread
/// between `mbarrier.arrive` and this wait.
///
/// **Implementation behavior**:
/// This operation generates a PTX loop that repeatedly calls the underlying
/// `mbarrier.try_wait.parity` instruction until the barrier phase completes.
/// Unlike the raw PTX instruction which may return without completion after a
/// timeout, this MLIR operation guarantees completion by continuing to loop until
/// the specified phase is reached.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#parallel-synchronization-and-communication-instructions-mbarrier-test-wait-try-wait)
class MBarrierTryWaitParityOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class MapaOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Broadcast and compare a value across threads in warp
/// The `match.sync` op performs broadcast and compare of operand `val` across
/// all non-exited threads in `thread_mask` and returns a mask depending on the
/// kind and an optional predicate.
///
/// The matching operation kinds are:
/// - `any`: Returns a mask corresponding to the non-exited threads in the
/// `thread_mask` that have the same value of operand `val`.
/// - `all`: Returns a mask and a predicate. If all non-exited threads in the
/// `thread_mask` have the same value of operand `val`, the predicate is set to
/// true and the mask corresponds to the non-exited threads in the
/// `thread_mask`. Otherwise, the predicate is set to false and the mask is 0.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#parallel-synchronization-and-communication-instructions-match-sync)
class MatchSyncOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Memory barrier operation
/// `membar` operation guarantees that prior memory accesses requested by this
/// thread are performed at the specified `scope`, before later memory
/// operations requested by this thread following the membar instruction.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#parallel-synchronization-and-communication-instructions-membar)
class MembarOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// cooperative matrix-multiply and accumulate with block scaling
/// The `nvvm.mma.block_scale` operation collectively performs the operation
/// `D = matmul(A * SF_A, B * SF_B) + C` using all threads in a warp.
///
/// A, B, C and D are dense matrices and SF_A and SF_B are scaling factors.
/// Dimensions of SF_A and SF_B are based on scale vector sizes (x1, x2, x4),
/// and the data type must be either ue8m0 or ue4m3.
///
/// All the threads in the warp must execute the same `mma.block_scale` operation.
///
/// This operation follows the same design pattern as `nvvm.mma.sync`, with additional
/// scaling operands for both A and B matrices.
///
/// Example:
/// ```mlir
/// %d = nvvm.mma.block_scale A[%a0, %a1] B[%b0, %b1] C[%c0, %c1]
/// scaleA[%scaleAData, %byteIdA, %threadIdA]
/// scaleB[%scaleBData, %byteIdB, %threadIdB]
/// {shape = #nvvm.shape<m = 16, n = 8, k = 64>,
/// multiplicandAPtxType = #nvvm.mma_type<e2m1>,
/// multiplicandBPtxType = #nvvm.mma_type<e2m1>,
/// scaleVecSize = #nvvm.scale_vec_size<x2>,
/// blockScaleFormat = #nvvm.block_scale_format<ue8m0>,
/// kind = #nvvm.block_scale_kind<mxf4nvf4>}
/// : (vector<4xf16>, vector<2xf16>, vector<2xf32>) -> !llvm.struct<(f32, f32)>
/// ```
class MmaBlockScaleOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// cooperative matrix-multiply and accumulate
/// The `nvvm.mma.sync` operation collectively performs the operation
/// `D = matmul(A, B) + C` using all threads in a warp.
///
/// All the threads in the warp must execute the same `mma.sync` operation.
///
/// For each possible multiplicand PTX data type, there are one or more possible
/// instruction shapes given as "mMnNkK". The below table describes the posssibilities
/// as well as the types required for the operands. Note that the data type for
/// C (the accumulator) and D (the result) can vary independently when there are
/// multiple possibilities in the "C/D Type" column.
///
/// When an optional attribute cannot be immediately inferred from the types of
/// the operands and the result during parsing or validation, an error will be
/// raised.
///
/// `b1Op` is only relevant when the binary (b1) type is given to
/// `multiplicandDataType`. It specifies how the multiply-and-acumulate is
/// performed and is either `xor_popc` or `and_poc`. The default is `xor_popc`.
///
/// `intOverflowBehavior` is only relevant when the `multiplicandType` attribute
/// is one of `u8, s8, u4, s4`, this attribute describes how overflow is handled
/// in the accumulator. When the attribute is `satfinite`, the accumulator values
/// are clamped in the int32 range on overflow. This is the default behavior.
/// Alternatively, accumulator behavior `wrapped` can also be specified, in
/// which case overflow wraps from one end of the range to the other.
///
/// `layoutA` and `layoutB` are required and should generally be set to
/// `#nvvm.mma_layout<row>` and `#nvvm.mma_layout<col>` respectively, but other
/// combinations are possible for certain layouts according to the table below.
///
/// ```
/// | A/B Type | Shape | ALayout | BLayout | A Type | B Type | C/D Type |
/// |----------|-----------|---------|---------|----------|----------|-------------------|
/// | f64 | .m8n8k4 | row | col | 1x f64 | 1x f64 | 2x f64 |
/// | f16 | .m8n8k4 | row/col | row/col | 2x f16x2 | 2x f16x2 | 4x f16x2 or 8xf32 |
/// | | .m16n8k8 | row | col | 2x f16x2 | 1x f16x2 | 2x f16x2 or 4 f32 |
/// | | .m16n8k16 | row | col | 4x f16x2 | 2x f16x2 | 2x f16x2 or 4 f32 |
/// | bf16 | .m16n8k8 | row | col | 2x i32 | 1x i32 | 4x f32 |
/// | | .m16n8k16 | row | col | 4x i32 | 2x i32 | 4x f32 |
/// | tf32 | .m16n8k4 | row | col | 2x i32 | 1x i32 | 4x f32 |
/// | | .m16n8k8 | row | col | 4x i32 | 2x i32 | 2x f16x2 or 4 f32 |
/// | u8/s8 | .m8n8k16 | row | col | 1x i32 | 1x i32 | 2x i32 |
/// | | .m16n8k16 | row | col | 2x i32 | 1x i32 | 4x i32 |
/// | | .m16n8k32 | row | col | 4x i32 | 2x i32 | 4x i32 |
/// | u4/s4 | .m8n8k32 | row | col | 1x i32 | 1x i32 | 2x i32 |
/// | | m16n8k32 | row | col | 2x i32 | 1x i32 | 4x i32 |
/// | | m16n8k64 | row | col | 4x i32 | 2x i32 | 4x i32 |
/// | b1 | m8n8k128 | row | col | 1x i32 | 1x i32 | 2x i32 |
/// | | m16n8k128 | row | col | 2x i32 | 1x i32 | 4x i32 |
/// ```
///
///
/// Example:
/// ```mlir
///
/// %128 = nvvm.mma.sync A[%120, %121, %122, %123]
/// B[%124, %125]
/// C[%126, %127]
/// {layoutA = #nvvm.mma_layout<row>,
/// layoutB = #nvvm.mma_layout<col>,
/// shape = {k = 16 : i32, m = 16 : i32, n = 8 : i32}}
/// : (vector<2xf16>, vector<2xf16>, vector<2xf16>)
/// -> !llvm.struct<(vector<2xf16>, vector<2xf16>)>
/// ```
class MmaOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// cooperative sparse matrix-multiply and accumulate with block scaling
/// The `nvvm.mma.sp.block_scale` operation collectively performs the operation
/// `D = matmul(A_sparse * SF_A, B * SF_B) + C` using all threads in a warp.
///
/// A is a sparse matrix, and B, C and D are dense matrices.
/// SF_A and SF_B are scaling factors.
/// Dimensions of SF_A and SF_B are based on scale vector sizes (x1, x2, x4),
/// and the data type must be either ue8m0 or ue4m3.
///
/// This operation is similar to `nvvm.mma.block_scale` but with structured sparsity
/// in the A operand. The sparsity follows the 2:4 structured sparse pattern
/// where 2 out of every 4 elements are non-zero.
///
/// All the threads in the warp must execute the same `mma.sp.block_scale` operation.
///
/// The `sparseMetadata` operand provides the sparsity indices that indicate
/// which elements in the A operand are non-zero. The `sparsitySelector`
/// controls how the indices are distributed among threads in the warp and
/// should typically be 0 or 1.
///
/// This operation follows the same design pattern as `nvvm.mma.sp.sync`, with additional
/// scaling operands for both A and B matrices. Note that sparse block scale operations
/// always use ordered metadata (sm_90+).
///
/// Example:
/// ```mlir
/// %d = nvvm.mma.sp.block_scale A[%a0, %a1] B[%b0, %b1] C[%c0, %c1]
/// sparseMetadata[%meta] selector[%sel]
/// scaleA[%scaleAData, %byteIdA, %threadIdA]
/// scaleB[%scaleBData, %byteIdB, %threadIdB]
/// {shape = #nvvm.shape<m = 16, n = 8, k = 128>,
/// multiplicandAPtxType = #nvvm.mma_type<e2m1>,
/// multiplicandBPtxType = #nvvm.mma_type<e2m1>,
/// scaleVecSize = #nvvm.scale_vec_size<x2>,
/// blockScaleFormat = #nvvm.block_scale_format<ue8m0>,
/// kind = #nvvm.block_scale_kind<mxf4>}
/// : (vector<2xf16>, vector<2xf16>, vector<2xf32>) -> !llvm.struct<(f32, f32)>
/// ```
class MmaSpBlockScaleOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// cooperative sparse matrix-multiply and accumulate
/// The `nvvm.mma.sp.sync` operation collectively performs the sparse operation
/// `D = matmul(A_sparse, B) + C` using all threads in a warp.
///
/// This operation is similar to `nvvm.mma.sync` but with structured sparsity
/// in the A operand. The sparsity follows the 2:4 structured sparse pattern
/// where 2 out of every 4 elements are non-zero.
///
/// All the threads in the warp must execute the same `mma.sp.sync` operation.
///
/// The `sparseMetadata` operand provides the sparsity indices that indicate
/// which elements in the A operand are non-zero. The `sparsitySelector`
/// controls how the indices are distributed among threads in the warp and
/// should typically be 0 or 1.
///
/// The optional `orderedMetadata` attribute specifies the metadata ordering:
/// - Absence (default): Uses standard sparse metadata ordering
/// - Presence: Uses ordered metadata (PTX ISA 8.5+, sm_90+)
///
/// The optional `kind` attribute specifies mixed-precision modes for FP8 operations:
/// - `f8f6f4`: Enables e3m2, e2m3, e2m1 FP8 types and f16 accumulator (PTX ISA 8.7+, sm_90+)
/// - Only valid with ordered metadata and m16n8k64 shape
///
/// The shapes, layouts, and data types follow the same constraints as the
/// regular `nvvm.mma.sync` operation, but the A operand contains only the
/// non-zero elements in compressed format.
///
/// Example:
/// ```mlir
/// %d = nvvm.mma.sp.sync A[%a0, %a1] B[%b0, %b1] C[%c0, %c1]
/// sparseMetadata[%meta] selector[%sel]
/// {shape = {k = 32 : i32, m = 16 : i32, n = 8 : i32}}
/// : (vector<2xf16>, vector<2xf16>, vector<2xf16>) -> !llvm.struct<(vector<2xf16>, vector<2xf16>)>
///
/// // With ordered metadata:
/// %d = nvvm.mma.sp.sync A[%a0, %a1] B[%b0, %b1] C[%c0, %c1]
/// sparseMetadata[%meta] selector[%sel]
/// {orderedMetadata, shape = {k = 32 : i32, m = 16 : i32, n = 8 : i32}}
/// : (vector<2xf16>, vector<2xf16>, vector<2xf16>) -> !llvm.struct<(vector<2xf16>, vector<2xf16>)>
/// ```
class MmaSpOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Warp-level matrix transpose
/// Moves a row-major matrix across all threads in a warp, reading elements
/// from source `$src`, and writing the transposed elements to destination
/// `$dst`.
///
/// The `shape` attribute indicates the dimensions of the matrix being
/// transposed. Each matrix element holds 16-bit data as indicated by the
/// `eltType` attribute.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#warp-level-matrix-movmatrix-instruction)
///
/// Example:
/// ```mlir
/// %dst = nvvm.movmatrix %src {shape = #nvvm.ld_st_matrix_shape<m = 8, n = 8>,
/// eltType = #nvvm.ld_st_matrix_elt_type<b16>} : i32
/// ```
class MovMatrixOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Suspends the thread for a specified duration.
/// The op suspends the thread for a sleep duration approximately close to the
/// delay `$duration`, specified in nanoseconds.
///
/// The sleep duration is approximated, but guaranteed to be in the
/// interval [0, 2*t]. The maximum sleep duration is 1 millisecond.
/// The implementation may reduce the sleep duration for individual threads
/// within a warp such that all sleeping threads in the warp wake up together.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#miscellaneous-instructions-nanosleep)
class NanosleepOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Trigger one or more Performance Monitor events.
/// Triggers one or more of a fixed number of performance monitor events, with
/// event index or mask specified by immediate operand.
///
/// Without `mask` it triggers a single performance monitor event indexed by
/// immediate operand a, in the range 0..15.
///
/// With `mask` it triggers one or more of the performance monitor events. Each
/// bit in the 16-bit immediate operand controls an event.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#miscellaneous-instructions-pmevent)
class PMEventOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Permute bytes from two 32-bit registers
/// The `nvvm.prmt` operation constructs a permutation of the
/// bytes of the first one or two operands, selecting based on
/// the 2 least significant bits of the final operand.
///
/// The bytes in the first one or two source operands are numbered.
/// The first source operand (%lo) is numbered {b3, b2, b1, b0},
/// in the case of the '``default``', '``f4e``' and '``b4e``' variants,
/// the second source operand (%hi) is numbered {b7, b6, b5, b4}.
///
/// Modes:
/// - `default`: Index mode - each nibble in `selector` selects a byte from the 8-byte pool
/// - `f4e` : Forward 4 extract - extracts 4 contiguous bytes starting from position in `selector`
/// - `b4e` : Backward 4 extract - extracts 4 contiguous bytes in reverse order
/// - `rc8` : Replicate 8 - replicates the lower 8 bits across the 32-bit result
/// - `ecl` : Edge clamp left - clamps out-of-range indices to the leftmost valid byte
/// - `ecr` : Edge clamp right - clamps out-of-range indices to the rightmost valid byte
/// - `rc16` : Replicate 16 - replicates the lower 16 bits across the 32-bit result
///
/// Depending on the 2 least significant bits of the %selector operand, the result
/// of the permutation is defined as follows:
///
/// +------------+----------------+--------------+
/// | Mode | %selector[1:0] | Output |
/// +------------+----------------+--------------+
/// | '``f4e``' | 0 | {3, 2, 1, 0} |
/// | +----------------+--------------+
/// | | 1 | {4, 3, 2, 1} |
/// | +----------------+--------------+
/// | | 2 | {5, 4, 3, 2} |
/// | +----------------+--------------+
/// | | 3 | {6, 5, 4, 3} |
/// +------------+----------------+--------------+
/// | '``b4e``' | 0 | {5, 6, 7, 0} |
/// | +----------------+--------------+
/// | | 1 | {6, 7, 0, 1} |
/// | +----------------+--------------+
/// | | 2 | {7, 0, 1, 2} |
/// | +----------------+--------------+
/// | | 3 | {0, 1, 2, 3} |
/// +------------+----------------+--------------+
/// | '``rc8``' | 0 | {0, 0, 0, 0} |
/// | +----------------+--------------+
/// | | 1 | {1, 1, 1, 1} |
/// | +----------------+--------------+
/// | | 2 | {2, 2, 2, 2} |
/// | +----------------+--------------+
/// | | 3 | {3, 3, 3, 3} |
/// +------------+----------------+--------------+
/// | '``ecl``' | 0 | {3, 2, 1, 0} |
/// | +----------------+--------------+
/// | | 1 | {3, 2, 1, 1} |
/// | +----------------+--------------+
/// | | 2 | {3, 2, 2, 2} |
/// | +----------------+--------------+
/// | | 3 | {3, 3, 3, 3} |
/// +------------+----------------+--------------+
/// | '``ecr``' | 0 | {0, 0, 0, 0} |
/// | +----------------+--------------+
/// | | 1 | {1, 1, 1, 0} |
/// | +----------------+--------------+
/// | | 2 | {2, 2, 1, 0} |
/// | +----------------+--------------+
/// | | 3 | {3, 2, 1, 0} |
/// +------------+----------------+--------------+
/// | '``rc16``' | 0 | {1, 0, 1, 0} |
/// | +----------------+--------------+
/// | | 1 | {3, 2, 3, 2} |
/// | +----------------+--------------+
/// | | 2 | {1, 0, 1, 0} |
/// | +----------------+--------------+
/// | | 3 | {3, 2, 3, 2} |
/// +------------+----------------+--------------+
///
/// [For more information, see PTX ISA]
/// (https://docs.nvidia.com/cuda/parallel-thread-execution/#data-movement-and-conversion-instructions-prmt)
class PermuteOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Brings the cache line containing an address into the specified cache level
/// Prefetches the cache line containing the address given by `addr`. The
/// operand may be a global, local, or generic pointer. When `tensormap` is
/// specified, the operand may instead be a constant or generic pointer. If the
/// address maps to shared memory, the operation has no effect.
///
/// At most one of `cacheLevel` or `tensormap` may be present. The `cacheLevel`
/// attribute selects the target cache level. When combined with `uniform`, the
/// prefetch is performed to the uniform cache, in which case `addr` must be a
/// generic pointer.
///
/// When `tensormap` is used, the line containing `addr` is brought from the
/// constant or parameter state space for later use by `cp.async.bulk.tensor`.
/// If `in_param_space` is specified, the generic pointer is interpreted as
/// referring to the parameter state space.
///
/// `uniform` can be specified after the `cacheLevel` to indicate that the
/// prefetch is performed to the specified uniform cache level. If `uniform` is
/// specified, `addr` must be a generic address pointer and no operation is
/// performed if `addr` maps to a `const`, `local`, or `shared` memory location.
///
/// The `evictPriority` attribute is optional and specifies the cache eviction
/// priority when `cacheLevel` is L2.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#data-movement-and-conversion-instructions-prefetch-prefetchu)
class PrefetchOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class RcpApproxFtzF32Op;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Redux Sync Op
/// `redux.sync` performs a reduction operation `kind` of the 32 bit source
/// register across all non-exited threads in the membermask.
///
/// The `abs` and `nan` attributes can be used in the case of f32 input type,
/// where the `abs` attribute causes the absolute value of the input to be used
/// in the reduction operation, and the `nan` attribute causes the reduction
/// operation to return NaN if any of the inputs to participating threads are
/// NaN.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#parallel-synchronization-and-communication-instructions-redux-sync)
class ReduxOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Reciprocal square root (fast approximation)
/// Computes an approximation of the reciprocal of the square root of the
/// input value: `d = 1 / sqrt(a)`. Supports both f32 and f64. The maximum
/// relative error for the f32 form over the entire positive finite range
/// is 2^-22.9.
///
/// The `ftz` attribute, when set, flushes subnormal inputs and results to
/// sign-preserving zero. For f64 inputs, `ftz=true` selects a coarser
/// approximation that uses only the upper 32 bits of the input (the lower
/// 32 bits of the result are zeroed).
///
/// For more information, see PTX ISA:
/// [rsqrt](https://docs.nvidia.com/cuda/parallel-thread-execution/#floating-point-instructions-rsqrt)
class RsqrtOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class SetMaxRegisterOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// NVVM Dialect Op for shfl.sync
/// The `shfl.sync` Op implements data shuffle within threads of a warp.
/// The `thread_mask` denotes the threads participating in the Op where
/// the bit position corresponds to a particular thread's laneid.
/// The `offset` specifies a source lane or source lane offset
/// (depending on `kind`). The `val` is the input value to be copied from
/// the source. The `mask_and_clamp` contains two packed values specifying
/// a mask for logically splitting warps into sub-segments and an upper bound
/// for clamping the source lane index.
///
/// The `return_value_and_is_valid` unit attribute can be specified to indicate
/// that the return value is a two-element struct, where the first element is
/// the result value and the second element is a predicate indicating if the
/// computed source lane index is valid.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#data-movement-and-conversion-instructions-shfl-sync)
class ShflOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Sine (fast approximation)
/// Computes a fast approximation of the sine of the input value (in radians).
/// The `ftz` attribute, when set, flushes subnormal inputs and results to
/// sign-preserving zero.
///
/// For more information, see PTX ISA:
/// [sin](https://docs.nvidia.com/cuda/parallel-thread-execution/#floating-point-instructions-sin)
class SinOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class SmDimOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class SmIdOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Square root (fast approximation)
/// Computes a fast approximation of the square root of the input value
/// (`res = sqrt(src)`). The maximum relative error over the entire positive
/// finite range is 2^-23.
///
/// The `ftz` attribute, when set, flushes subnormal inputs and results to
/// sign-preserving zero.
///
/// For more information, see PTX ISA:
/// [sqrt](https://docs.nvidia.com/cuda/parallel-thread-execution/#floating-point-instructions-sqrt)
class SqrtApproxOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Take the square root of a value
/// Compute sqrt(src) and store the result in res.
///
/// For more information, see PTX ISA:
/// [sqrt](https://docs.nvidia.com/cuda/parallel-thread-execution/#floating-point-instructions-sqrt)
class SqrtOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// cooperative matrix store
/// Collectively store one or more matrices across all threads in a warp to the
/// location indicated by the address operand $ptr in shared memory.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#warp-level-matrix-store-instruction-stmatrix)
class StMatrixOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Performs floating point subtraction of the given arguments `lhs` and `rhs`
/// The `nvvm.subf` operation performs floating point subtraction of two
/// operands.
///
/// It supports the same type combinations and modifiers as `nvvm.addf`.
/// This is equivalent to `nvvm.addf(lhs, -rhs)`.
///
/// For more information, see PTX ISA:
/// - [floating point subtraction](https://docs.nvidia.com/cuda/parallel-thread-execution/#floating-point-instructions-sub)
/// - [half-precision floating point subtraction](https://docs.nvidia.com/cuda/parallel-thread-execution/#half-precision-floating-point-instructions-sub)
class SubFOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Warp Barrier Synchronization Op
/// The `nvvm.bar.warp.sync` operation performs barrier synchronization for threads
/// within a warp.
///
/// This operation causes the executing thread to wait until all threads corresponding
/// to the `mask` operand have executed a `bar.warp.sync` with the same mask value
/// before resuming execution.
///
/// The `mask` operand specifies the threads participating in the barrier, where each
/// bit position corresponds to the thread's lane ID within the warp. Only threads with
/// their corresponding bit set in the mask participate in the barrier synchronization.
///
/// **Important constraints**:
/// - The behavior is undefined if the executing thread is not included in the mask
/// (i.e., the bit corresponding to the thread's lane ID is not set)
/// - For compute capability sm_6x or below, all threads in the mask must execute
/// the same `bar.warp.sync` instruction in convergence
///
/// This operation also guarantees memory ordering among participating threads.
/// Threads within the warp that wish to communicate via memory can store to memory,
/// execute `bar.warp.sync`, and then safely read values stored by other threads
/// in the warp.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-bar-warp-sync)
class SyncWarpOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Tcgen05 alloc operation
/// The `tcgen05.alloc` Op allocates tensor core memory for
/// the amount specified by `nCols` and writes the destination
/// address to the `addr` argument. The `nCols` operand specifies the
/// number of columns to be allocated and it must be a power-of-two.
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#tcgen05-memory-alloc-manage-instructions)
class Tcgen05AllocOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Tcgen05 commit operations
/// The `tcgen05.commit` makes the *mbarrier object*, specified by
/// the operand `addr`, track the completion of all the prior
/// async-tcgen05 operations initiated by the executing thread.
/// The multicast variants allow signaling on the *mbarrier objects*
/// of multiple CTAs within the cluster. Operand `multicastMask`,
/// when present, specifies the destination CTAs in the cluster such
/// that each bit position in the 16-bit `multicastMask` operand
/// corresponds to the `nvvm.read.ptx.sreg.ctaid` of the destination CTA.
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#tcgen-async-sync-operations-commit)
class Tcgen05CommitOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Tcgen05 copy operation
/// Instruction tcgen05.cp initiates an asynchronous copy operation from
/// shared memory to the location specified by the address operand `taddr`
/// in the Tensor Memory. The 64-bit register operand `smem_desc` specifies
/// the matrix descriptor representing the source matrix in the shared memory
/// that needs to be copied.
///
/// Example:
/// ```mlir
/// nvvm.tcgen05.cp %taddr, %smem_desc {
/// group = #nvvm.tcgen05_group<cta_2>,
/// shape = #nvvm.tcgen05_cp_shape<shape_64x128b>,
/// multicast = #nvvm.tcgen05_cp_multicast<warpx2_01_23>,
/// srcFormat = #nvvm.tcgen05_cp_src_fmt<b6x16_p32>
/// }
/// ```
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#tensorcore-5th-generation-instructions-tcgen05-cp)
class Tcgen05CpOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Tcgen05 dealloc operation
/// The `tcgen05.dealloc` Op de-allocates the tensor core memory
/// specified by `tmemAddr`, which must be from a previous tensor
/// memory allocation. The `nCols` operand specifies the number
/// of columns to be de-allocated, and it must be a power-of-two.
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#tcgen05-memory-alloc-manage-instructions)
class Tcgen05DeallocOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Tcgen05 fence operations
/// The `tcgen05.fence<before>` orders all prior async tcgen05 operations
/// with respect to the subsequent tcgen05 and execution ordering operations.
/// The `tcgen05.fence<after>` orders all subsequent async tcgen05 operations
/// with respect to the prior tcgen05 and execution ordering operations.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#tensorcore-5th-generation-instructions-tcgen05-fence)
class Tcgen05FenceOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// tensor memory load instructions
/// Instruction `tcgen05.ld` asynchronously loads data from the Tensor Memory at
/// the location specified by the 32-bit address operand `tmemAddr` into the
/// destination register `res`, collectively across all threads of the warps.
///
/// The `shape` and the `num` attribute together determines the total
/// dimension of the data which is loaded from the Tensor Memory. The `shape`
/// attribute indicates the base dimension of data to be accessed as described
/// in the Data Movement Shape. The `num` attribute indicates the repeat
/// factor on the base dimension resulting in the total dimension of the data
/// that is accessed.
///
/// The shape `16x32bx2` performs two accesses into Tensor Memory of the shape
/// `16x32b`. The base address of the first access is specified by `tmemAddr`
/// and the base address of the second access is specified by
/// `tmemAddr + offset`, where `offset` is an immediate argument.
///
/// The unit attribute `pack` can be used to pack two 16-bit
/// elements from adjacent columns into a single 32-bit element during the load.
///
/// The following table describes the size of the vector for various combinations
/// of `num` and `shape` attributes:
/// ```
/// |=====================================================================|
/// | num/shape | 16x32bx2/16x64b/32x32b | 16x128b | 16x256b |
/// |=====================================================================|
/// | x1 | 1 | 2 | 4 |
/// | x2 | 2 | 4 | 8 |
/// | x4 | 4 | 8 | 16 |
/// | x8 | 8 | 16 | 32 |
/// | x16 | 16 | 32 | 64 |
/// | x32 | 32 | 64 | 128 |
/// | x64 | 64 | 128 | NA |
/// | x128 | 128 | NA | NA |
/// |=====================================================================|
/// ```
///
/// Example:
/// ```mlir
/// nvvm.tcgen05.ld %tmemAddr, %offset pack {
/// shape = #nvvm.tcgen05_ldst_shape<shape_16x32bx2>,
/// } : <2xi32>
/// ```
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#tcgen05-instructions-tcgen05-st)
class Tcgen05LdOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Tcgen05 tensor memory load and reduce instructions
/// Instruction `tcgen05.ld.red` asynchronously loads data from the Tensor
/// Memory at the location specified by the 32-bit address operand `addr` into
/// the destination register `data`, collectively across all threads of the
/// warp. The operation also performs reduction operation specified by `op` on
/// the loaded data across columns in each lane and stored into `redVal`
///
/// The `shape` and the `num` attribute together determines the total
/// dimension of the data which is loaded from the Tensor Memory. The `shape`
/// attribute indicates the base dimension of data to be accessed as described
/// in the Data Movement Shape. The `num` attribute indicates the repeat
/// factor on the base dimension resulting in the total dimension of the data
/// that is accessed.
///
/// The shape `16x32bx2` performs two accesses into Tensor Memory of the shape
/// `16x32b`. The base address of the first access is specified by `addr`
/// and the base address of the second access is specified by
/// `addr + offset`, where `offset` is an immediate argument.
///
/// The following table describes the size of the vector for various combinations
/// of `num` and `shape` attributes:
/// ```
/// |=============================================|
/// | num/shape | 16x32bx2/32x32b |
/// |=============================================|
/// | x2 | 2 |
/// | x4 | 4 |
/// | x8 | 8 |
/// | x16 | 16 |
/// | x32 | 32 |
/// | x64 | 64 |
/// | x128 | 128 |
/// |=============================================|
/// ```
///
/// Example:
/// ```mlir
/// %data, %redval = nvvm.tcgen05.ld.red %addr, %offset {
/// shape = #nvvm.tcgen05_ldst_shape<shape_16x32bx2>,
/// } : <2xi32>, i32
///
/// %data, %redval = nvvm.tcgen05.ld.red %addr {
/// shape = #nvvm.tcgen05_ldst_shape<shape_32x32b>,
/// } : <2xf32>, f32
/// ```
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#tcgen05-instructions-tcgen05-ld)
class Tcgen05LdRedOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Performs block scaled MMA operation on 5th-gen tensor cores
/// The `tcgen05.mma.block_scale` operation is an asynchronous tensor core instruction
/// that performs matrix multiplication, accumulation with block scaling in a
/// single fused operation. It targets 5th-generation tensor cores, providing
/// developers with fine-grained control over execution and scheduling.
///
/// ```
/// D = (A * scale_a) * (B * scale_b)` // if `enableInputD` is false
/// D = (A * scale_a) * (B * scale_b) + D`
/// ```
///
/// where:
/// - A is an M x (K / 2) matrix in tensor memory or described using shared memory descriptor
/// - B is a K x N matrix described using shared memory descriptor
/// - D is an M x N accumulator matrix in tensor memory
/// - `scale_a` and `scale_b` are matrices in tensor memory used to scale `A` and `B` respectively
///
/// The `shared memory descriptor` can be generated using `tcgen05.mma_smem_desc` Op
///
/// - `idesc` is a 32 bit value representing the [Instruction Descriptor](https://docs.nvidia.com/cuda/parallel-thread-execution/#tcgen05-instruction-descriptor)
///
/// Required Attributes:
/// - `kind` is a Tcgen05MMAKind attribute restricted to mxf8f6f4, mxf4, or mxf4nvf4
///
/// - `ctaGroup` specifies CTA group configuration
/// * cta_1: MMA will be performed on the current thread's CTA
/// * cta_2: MMA will be performed on the current thread and it's peer CTA
///
/// Default Attributes:
/// - collectorOp is a Tcgen05MMACollectorOp attribute with matrix A as the collector buffer
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#tcgen05-mma-instructions-mma)
class Tcgen05MMABlockScaleOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Performs MMA operation on 5th-gen tensor cores
/// The `tcgen05.mma` operation is an asynchronous tensor core instruction that
/// performs matrix multiplication, accumulation in a single fused operation. It
/// targets 5th-generation tensor cores, providing developers with fine-grained
/// control over execution and scheduling.
///
/// ```
/// D = A * B + (D * 2^ -scaleInputD) // if `scaleInputD` is provided
/// D = A * B // if `enableInputD` is false
/// D = A * B + D // otherwise
/// ```
///
/// where:
/// - A is an `M x K` matrix in tensor memory or described using shared memory descriptor
/// - B is a `K x N` matrix described using shared memory descriptor
/// - D is an `M x N` accumulator matrix in tensor memory
///
/// The `shared memory descriptor` can be generated using `tcgen05.mma_smem_desc` Op
///
/// - idesc is a 32-bit value representing the [Instruction Descriptor](https://docs.nvidia.com/cuda/parallel-thread-execution/#tcgen05-instruction-descriptor)
///
/// Optional Operands:
/// - `scaleInputD` is an Immediate value operand used for scaling D matrix by 2 ^ (-scaleInputD). The valid range is [0, 15]
///
/// - `disableOutputLane` is a vector mask for selective output
/// * vector<4 x i32> when ctaGroup is CTA_1
/// * vector<8 x i32> when ctaGroup is CTA_2
///
/// Required Attributes:
/// - `kind` is a Tcgen05MMAKind attribute
///
/// - `ctaGroup` specifies CTA group configuration
/// * cta_1: MMA will be performed on the current thread's CTA
/// * cta_2: MMA will be performed on the current thread and it's peer CTA
///
/// Default Attributes:
/// - collectorOp is a Tcgen05MMACollectorOp attribute with matrix A as the collector buffer
///
/// - `aShift` shifts the rows of the A matrix down by one row and can only be
/// applied if A is in tensor memory
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#tcgen05-mma-instructions-mma)
class Tcgen05MMAOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Performs block scaled MMA operation with sparse A matrix on 5th-gen tensor cores
/// The `tcgen05.mma.sp.block_scale` operation is an asynchronous tensor core
/// instruction that performs matrix multiplication, accumulation with block
/// scaling, and sparse `A` matrix in a single fused operation. It targets
/// 5th-generation tensor cores, providing developers with fine-grained control
/// over execution, and scheduling.
///
/// ```
/// D = (A * scale_a) * (B * scale_b) // if `enableInputD` is specified
/// D = (A * scale_a) * (B * scale_b) + D // otherwise
/// ```
///
/// where:
/// - A is an M x (K / 2) matrix in tensor memory or described using shared memory descriptor
/// - B is a K x N matrix described using shared memory descriptor
/// - D is an M x N accumulator matrix in tensor memory
/// - `scale_a` and `scale_b` are matrices in tensor memory used to scale `A` and `B` respectively
///
/// Other attributes and operands are similar to that of tcgen05.mma.block_scale Op
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#tcgen05-mma-instructions-mma-sp)
class Tcgen05MMASparseBlockScaleOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Performs MMA operation with sparse A matrix on 5th-gen tensor cores
/// The `tcgen05.mma.sp` operation is an asynchronous tensor core instruction
/// that performs matrix multiplication, accumulation with sparse `A` matrix in
/// a single fused operation. It targets 5th-generation tensor cores, providing
/// developers with fine-grained control over execution and scheduling.
///
/// ```
/// D = A * B + (D * 2^ -scaleInputD) // if `scaleInputD` is provided
/// D = A * B // if `enableInputD` is false
/// D = A * B + D // otherwise
/// ```
///
/// where:
/// - A is an `M x (K / 2)` matrix in tensor memory or described using shared memory descriptor
/// - B is a `K x N` matrix described using shared memory descriptor
/// - D is an `M x N` accumulator matrix in tensor memory
/// - sparseMetadata located in tensor memory specifies the mapping of the `K / 2`
/// non-zero elements to the K elements before performing the MMA operation
///
/// Other attributes and operands are similar to that of tcgen05.mma Op
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#tcgen05-mma-instructions-mma-sp)
class Tcgen05MMASparseOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Performs weight stationary convolution MMA operation on 5th-gen tensor cores
/// The `tcgen05.mma.ws` operation is an asynchronous tensor core instruction
/// that performs weight stationary convolution matrix multiplication, accumulation
/// in a single fused operation. It targets 5th-generation tensor cores, providing
/// developers with fine-grained control over execution, and scheduling.
///
/// ```
/// D = A * B` // if `enableInputD` is false
/// D = A * B + D` // otherwise
/// ```
///
/// where:
/// - A is an `M x K` matrix in tensor memory or described using shared memory descriptor
/// - B is a `K x N` matrix described using shared memory descriptor
/// - D is an `M x N` accumulator matrix in tensor memory
///
/// The `shared memory descriptor` can be generated using `tcgen05.mma_smem_desc` Op
///
/// - idesc is a 32-bit value representing the [Instruction Descriptor](https://docs.nvidia.com/cuda/parallel-thread-execution/#tcgen05-instruction-descriptor)
///
/// Optional Operands:
/// - zeroColMask is a 64 bit value representing the [Zero-column mask descriptor](https://docs.nvidia.com/cuda/parallel-thread-execution/#tcgen05-zero-column-mask-descriptor)
///
/// Required Attributes:
/// - `kind` is a Tcgen05MMAKind attribute
///
/// Default Valued Attributes:
/// - collectorBBuffer specifies collector buffer for matrix B: b0 (default), b1, b2, b3
///
/// - collectorOp is a Tcgen05MMACollectorOp attribute with matrix B as the collector buffer
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#tcgen05-mma-instructions-mma-ws)
class Tcgen05MMAWsOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Performs weight stationary convolution MMA with sparse A matrix on 5th-gen tensor cores
/// The `tcgen05.mma.ws.sp` operation is an asynchronous tensor core instruction
/// that performs weight stationary convolution matrix multiplication, accumulation
/// with sparse `A` matrix in a single fused operation. It targets 5th-generation
/// tensor cores, providing developers with fine-grained control over execution,
/// and scheduling.
///
/// ```
/// D = A * B` // if `enableInputD` is false
/// D = A * B + D` // otherwise
/// ```
///
/// where:
/// - A is an M x (K / 2) matrix in memory or descriptor format
/// - B is a K x N matrix
/// - D is an M x N accumulator matrix
/// - sparseMetadata located in tensor memory specifies the mapping of the `K / 2`
/// non-zero elements to the K elements before performing the MMA operation
///
/// Other attributes and operands are similar to that of tcgen05.mma.ws Op
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#tcgen05-mma-instructions-mma-ws-sp)
class Tcgen05MMAWsSparseOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Constructs a Shared Memory descriptor for MMA Operands A or B
/// The `nvvm.tcgen05_mma_smem_desc` constructs a Shared Memory descriptor
/// for tcgen05.mma. This descriptor is a 64-bit value which describes the
/// properties of multiplicand matrix in shared memory including its location
/// in the shared memory of the current CTA.
///
/// ```
/// +-----------+------+------------------------------------------------------+
/// | Bit-field | Size | Description |
/// +-----------+------+------------------------------------------------------+
/// | 0-13 | 14 | Matrix start address |
/// | 14-15 | 2 | Reserved |
/// | 16-29 | 14 | Leading dim relative-offset (or) absolute-address |
/// | 30-31 | 2 | Reserved |
/// | 32-45 | 14 | Stride dimension byte offset |
/// | 46-48 | 3 | Fixed constant value of 0b001 |
/// | 49-51 | 3 | Matrix base offset |
/// | 52 | 1 | Leading dimension stride mode: |
/// | | | 0: byte offset relative |
/// | | | 1: byte address absolute |
/// | 53-60 | 8 | Fixed constant value of 0xb00000000 |
/// | 61-63 | 3 | Swizzling mode: |
/// | | | 0: No swizzling |
/// | | | 1: 128-Byte with 32B atomic swizzling |
/// | | | 2: 128-Byte swizzling |
/// | | | 4: 64-Byte swizzling |
/// | | | 6: 32-Byte swizzling |
/// | | | (Values 3, 5 and 7 are invalid) |
/// +-----------+------+------------------------------------------------------+
/// ```
///
/// Example:
/// ```mlir
/// %desc = nvvm.tcgen05.mma_smem_desc (%startAddr, %leadingDimOffset, %strideDimOffset,
/// %baseOffset, %leadingDimMode, %swizzleMode) : (i32, i32, i32, i8, i1, i8) -> i64
/// ```
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#tcgen05-shared-memory-descriptor)
class Tcgen05MmaSmemDescOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Tcgen05 Op to relinquish the right to allocate
/// The `tcgen05.relinquish_alloc_permit` Op specifies that the CTA
/// of the executing thread is relinquishing the right to allocate
/// Tensor Memory. So, it is illegal for a CTA to perform `tcgen05.alloc`
/// after any of its constituent threads execute `tcgen05.relinquish_alloc_permit`.
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#tcgen05-memory-alloc-manage-instructions)
class Tcgen05RelinquishAllocPermitOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Tcgen05 shift operation
/// The `tcgen05.shift` is an asynchronous instruction which initiates
/// the shifting of 32-byte elements downwards across all the rows,
/// except the last, by one row. The operand `taddr` specifies the base
/// address of the matrix in Tensor Memory whose rows must be down shifted.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#tcgen05-instructions-tcgen05-shift)
class Tcgen05ShiftOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// tensor memory store instructions
/// Instruction `tcgen05.st` asynchronously stores data from the source register `r`
/// into the Tensor Memory at the location specified by the 32-bit address operand
/// `tmemAddr`, collectively across all threads of the warps.
///
/// The `shape` and the `num` attribute together determines the total dimension of
/// the data which is stored to the Tensor Memory. The `shape` indicates the base
/// dimension of data to be accessed. The `num` attribute indicates the repeat
/// factor on the base dimension resulting in the total dimension of the data that
/// is accessed.
///
/// The shape `16x32bx2` performs two accesses into Tensor Memory of the shape
/// `16x32b`. The base address of the first access is specified by `tmemAddr`
/// and the base address of the second access is specified by
/// `tmemAddr + offset`, where `offset` is an immediate argument.
///
/// The unit attribute `unpack` can be used to unpack a 32-bit element
/// in the register into two 16-bit elements and store them in adjacent columns.
///
/// The following table describes the size of the vector for various combinations
/// of `num` and `shape` attributes:
/// ```
/// |=====================================================================|
/// | num/shape | 16x32bx2/16x64b/32x32b | 16x128b | 16x256b |
/// |=====================================================================|
/// | x1 | 1 | 2 | 4 |
/// | x2 | 2 | 4 | 8 |
/// | x4 | 4 | 8 | 16 |
/// | x8 | 8 | 16 | 32 |
/// | x16 | 16 | 32 | 64 |
/// | x32 | 32 | 64 | 128 |
/// | x64 | 64 | 128 | NA |
/// | x128 | 128 | NA | NA |
/// |=====================================================================|
/// ```
///
/// Example:
/// ```mlir
/// nvvm.tcgen05.st %tmemAddr, %val, %offset unpack {
/// shape = #nvvm.tcgen05_ldst_shape<shape_16x32bx2>,
/// } : <2xi32>
/// ```
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#tcgen05-instructions-tcgen05-st)
class Tcgen05StOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Tcgen05 wait operations
/// The `tcgen05.wait<load>` causes the executing thread to block until
/// all prior `tcgen05.ld` operations issued by the executing thread
/// have completed. Similarly, the `tcgen05.wait<store>` causes the executing
/// thread to block until all prior `tcgen05.st` operations issued by the
/// executing thread have completed.
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#tcgen05-instructions-tcgen05-wait)
class Tcgen05WaitOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Modifies a field of the tensor-map object
/// The `nvvm.tensormap.replace` replaces the specified field of the tensor-map
/// object at the location specified by `addr` with a new value (specified by
/// `new_value` or `new_value_attr`).
///
/// The `field` argument specifies the field of the tensor-map object to
/// replace.
///
/// `new_value` is an `i32`/`i64` argument that specifies the new value to
/// replace the `field` with for the `global_address`, `rank`, `box_dim`,
/// `global_dim`, `global_stride`, and `element_stride` fields. It must be an
/// `i64` for the `global_address` and `global_stride` fields and `i32` for the
/// remaining fields.
///
/// For `rank`, `new_value` must be one less than the desired tensor rank as
/// this field uses zero-based numbering.
///
/// `new_value_attr` is an attribute that specifies the new value to replace
/// the `field` with for the `elemtype`, `interleave_layout`, `swizzle_mode`,
/// `swizzle_atomicity`, and `fill_mode` fields. It takes the place of
/// `new_value` for these fields. It must be a valid attribute corresponding to
/// the `field` type.
///
/// The ordinal `ord` is an immediate integer argument that specifies the
/// ordinal of the `field` across the tensor which needs to be replaced and is
/// required only for the `box_dim`, `global_dim`, `global_stride`, and
/// `element_stride` fields.
///
/// [For more information, see PTX ISA.](https://docs.nvidia.com/cuda/parallel-thread-execution/#data-movement-and-conversion-instructions-tensormap-replace)
class TensormapReplaceOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class ThreadIdXOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class ThreadIdYOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class ThreadIdZOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class TotalSmemSize;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Vote across thread group
/// The `vote.sync` op will cause executing thread to wait until all non-exited
/// threads corresponding to membermask have executed `vote.sync` with the same
/// qualifiers and same membermask value before resuming execution.
///
/// The vote operation kinds are:
/// - `any`: True if source predicate is True for some thread in membermask.
/// - `all`: True if source predicate is True for all non-exited threads in
/// membermask.
/// - `uni`: True if source predicate has the same value in all non-exited
/// threads in membermask.
/// - `ballot`: In the ballot form, the destination result is a 32 bit integer.
/// In this form, the predicate from each thread in membermask are copied into
/// the corresponding bit position of the result, where the bit position
/// corresponds to the thread's lane id.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#parallel-synchronization-and-communication-instructions-vote-sync)
class VoteSyncOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Warp synchronous matrix load
class WMMALoadOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Warp synchronous matrix-multiply accumulate using tensor cores.
class WMMAMmaOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Warp synchronous matrix store
class WMMAStoreOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class WarpDimOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class WarpIdOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
class WarpSizeOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Enforce an ordering of register accesses between warpgroup level matrix
/// multiplication and other operations.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#asynchronous-warpgroup-level-matrix-instructions-wgmma-fence)
class WgmmaFenceAlignedOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Commits all prior uncommitted warpgroup level matrix multiplication operations.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#asynchronous-warpgroup-level-matrix-instructions-wgmma-commit-group)
class WgmmaGroupSyncAlignedOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// The warpgroup (128 threads) level matrix multiply and accumulate operation
/// has either of the following forms, where matrix D is called accumulator:
/// D = A * B + D
/// D = A * B, where the input from accumulator D is disabled.
///
/// Supported shapes:
/// ```
/// |--------------|--------------|------------|--------------|---------------|
/// | | | | |f16+=e4m3*e4m3 |
/// | | | | |f16+=e5m2*e5m2 |
/// |f32+=tf32*tf32|f16+=f16 *f16 | s32+=s8*s8 |s32 += b1 * b1|f16+=e5m2*e4m3 |
/// | |f32+=f16 *f16 | s32+=u8*u8 | |f16+=e4m3*e5m2 |
/// | |f32+=bf16*bf16| s32+=u8*u8 | |f16+=e4m3*e5m2 |
/// | |f32+=bf16*bf16| s32+=s8*u8 | |f32+=e4m3*e4m3 |
/// | | | s32+=u8*s8 | |f32+=e5m2*e5m2 |
/// | | | | |f32+=e4m3*e5m2 |
/// | | | | |f32+=e4m3*e5m2 |
/// |--------------|--------------|------------|--------------|---------------|
/// | .m64n8k8 | .m64n8k16 | .m64n8k32 | .m64n8k256 | .m64n8k32 |
/// | .m64n16k8 | .m64n16k16 | .m64n16k32 | .m64n16k256 | .m64n16k32 |
/// | .m64n24k8 | .m64n24k16 | .m64n24k32 | .m64n24k256 | .m64n24k32 |
/// | .m64n32k8 | .m64n32k16 | .m64n32k32 | .m64n32k256 | .m64n32k32 |
/// | .m64n40k8 | .m64n40k16 | .m64n48k32 | .m64n48k256 | .m64n40k32 |
/// | .m64n48k8 | .m64n48k16 | .m64n64k32 | .m64n64k256 | .m64n48k32 |
/// | .m64n56k8 | .m64n56k16 | .m64n80k32 | .m64n80k256 | .m64n56k32 |
/// | .m64n64k8 | .m64n64k16 | .m64n96k32 | .m64n96k256 | .m64n64k32 |
/// | .m64n72k8 | .m64n72k16 | .m64n112k32| .m64n112k256 | .m64n72k32 |
/// | .m64n80k8 | .m64n80k16 | .m64n128k32| .m64n128k256 | .m64n80k32 |
/// | .m64n88k8 | .m64n88k16 | .m64n144k32| .m64n144k256 | .m64n88k32 |
/// | .m64n96k8 | .m64n96k16 | .m64n160k32| .m64n160k256 | .m64n96k32 |
/// | .m64n104k8 | .m64n104k16 | .m64n176k32| .m64n176k256 | .m64n104k32 |
/// | .m64n112k8 | .m64n112k16 | .m64n192k32| .m64n192k256 | .m64n112k32 |
/// | .m64n120k8 | .m64n120k16 | .m64n208k32| .m64n208k256 | .m64n120k32 |
/// | .m64n128k8 | .m64n128k16 | .m64n224k32| .m64n224k256 | .m64n128k32 |
/// | .m64n136k8 | .m64n136k16 | .m64n240k32| .m64n240k256 | .m64n136k32 |
/// | .m64n144k8 | .m64n144k16 | .m64n256k32| .m64n256k256 | .m64n144k32 |
/// | .m64n152k8 | .m64n152k16 | | | .m64n152k32 |
/// | .m64n160k8 | .m64n160k16 | | | .m64n160k32 |
/// | .m64n168k8 | .m64n168k16 | | | .m64n168k32 |
/// | .m64n176k8 | .m64n176k16 | | | .m64n176k32 |
/// | .m64n184k8 | .m64n184k16 | | | .m64n184k32 |
/// | .m64n192k8 | .m64n192k16 | | | .m64n192k32 |
/// | .m64n200k8 | .m64n200k16 | | | .m64n200k32 |
/// | .m64n208k8 | .m64n208k16 | | | .m64n208k32 |
/// | .m64n216k8 | .m64n216k16 | | | .m64n216k32 |
/// | .m64n224k8 | .m64n224k16 | | | .m64n224k32 |
/// | .m64n232k8 | .m64n232k16 | | | .m64n232k32 |
/// | .m64n240k8 | .m64n240k16 | | | .m64n240k32 |
/// | .m64n248k8 | .m64n248k16 | | | .m64n248k32 |
/// | .m64n256k8 | .m64n256k16 | | | .m64n256k32 |
/// |--------------|--------------|------------|--------------|---------------|
/// ```
///
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#asynchronous-warpgroup-level-matrix-instructions)
class WgmmaMmaAsyncOp;
} // namespace mlir::NVVM
namespace mlir::NVVM {
/// Signal the completion of a preceding warpgroup operation.
///
/// [For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#asynchronous-warpgroup-level-matrix-instructions-wgmma-wait-group)
class WgmmaWaitGroupSyncOp;
} // namespace mlir::NVVM
#ifdef GET_OP_CLASSES
#undef GET_OP_CLASSES
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::AddFOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class AddFOpGenericAdaptorBase {
public:
struct Properties {
using ftzTy = ::mlir::BoolAttr;
ftzTy ftz;
auto getFtz() const {
auto &propStorage = this->ftz;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setFtz(const ::mlir::BoolAttr &propValue) {
this->ftz = propValue;
}
using rndTy = ::mlir::NVVM::FPRoundingModeAttr;
rndTy rnd;
auto getRnd() const {
auto &propStorage = this->rnd;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::FPRoundingModeAttr>(propStorage);
}
void setRnd(const ::mlir::NVVM::FPRoundingModeAttr &propValue) {
this->rnd = propValue;
}
using satTy = ::mlir::NVVM::SaturationModeAttr;
satTy sat;
auto getSat() const {
auto &propStorage = this->sat;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SaturationModeAttr>(propStorage);
}
void setSat(const ::mlir::NVVM::SaturationModeAttr &propValue) {
this->sat = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.ftz == this->ftz &&
rhs.rnd == this->rnd &&
rhs.sat == this->sat &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
AddFOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.addf", odsAttrs.getContext());
}
AddFOpGenericAdaptorBase(AddFOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::FPRoundingModeAttr getRndAttr();
::mlir::NVVM::FPRoundingMode getRnd();
::mlir::NVVM::SaturationModeAttr getSatAttr();
::mlir::NVVM::SaturationMode getSat();
::mlir::BoolAttr getFtzAttr();
bool getFtz();
};
} // namespace detail
template <typename RangeT>
class AddFOpGenericAdaptor : public detail::AddFOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::AddFOpGenericAdaptorBase;
static constexpr int odsIndex_lhs = 0;
static constexpr int odsIndex_rhs = 1;
public:
AddFOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
AddFOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : AddFOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
AddFOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : AddFOpGenericAdaptor(values, attrs, Properties{}, {}) {}
AddFOpGenericAdaptor(RangeT values, const AddFOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = AddFOp, typename = std::enable_if_t<std::is_same_v<LateInst, AddFOp>>>
AddFOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getLhs() {
return (*getODSOperands(0).begin());
}
ValueT getRhs() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class AddFOpAdaptor : public AddFOpGenericAdaptor<::mlir::ValueRange> {
public:
using AddFOpGenericAdaptor::AddFOpGenericAdaptor;
AddFOpAdaptor(AddFOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class AddFOp : public ::mlir::Op<AddFOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::IsCommutative, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = AddFOpAdaptor;
template <typename RangeT>
using GenericAdaptor = AddFOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_lhs = 0;
static constexpr int odsIndex_rhs = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("ftz"), ::llvm::StringRef("rnd"), ::llvm::StringRef("sat")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getFtzAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getFtzAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getRndAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getRndAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getSatAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getSatAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.addf");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getLhs() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::Type> getRhs() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getLhsMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getRhsMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::FPRoundingModeAttr getRndAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::FPRoundingModeAttr>(getProperties().rnd);
}
::mlir::NVVM::FPRoundingMode getRnd();
::mlir::NVVM::SaturationModeAttr getSatAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SaturationModeAttr>(getProperties().sat);
}
::mlir::NVVM::SaturationMode getSat();
::mlir::BoolAttr getFtzAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().ftz);
}
bool getFtz();
void setRndAttr(::mlir::NVVM::FPRoundingModeAttr attr) {
getProperties().rnd = attr;
}
void setRnd(::mlir::NVVM::FPRoundingMode attrValue);
void setSatAttr(::mlir::NVVM::SaturationModeAttr attr) {
getProperties().sat = attr;
}
void setSat(::mlir::NVVM::SaturationMode attrValue);
void setFtzAttr(::mlir::BoolAttr attr) {
getProperties().ftz = attr;
}
void setFtz(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr);
static AddFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr);
static AddFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr);
static AddFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr);
static AddFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr);
static AddFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr);
static AddFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false);
static AddFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false);
static AddFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false);
static AddFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false);
static AddFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false);
static AddFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false);
static AddFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static AddFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static AddFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static AddFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static AddFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static AddFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static AddFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static AddFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static AddFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 3 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
// Shared lowering for nvvm.addf and nvvm.subf (via fneg+add)
static void lowerAddFToLLVMIR(
llvm::Value *lhs, llvm::Value *rhs, Value res,
NVVM::FPRoundingMode rnd, NVVM::SaturationMode sat, bool ftz,
LLVM::ModuleTranslation &mt, llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::AddFOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::AddFOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::AggrSmemSize declarations
//===----------------------------------------------------------------------===//
namespace detail {
class AggrSmemSizeGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
AggrSmemSizeGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.aggr.smem.size", odsAttrs.getContext());
}
AggrSmemSizeGenericAdaptorBase(AggrSmemSize op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class AggrSmemSizeGenericAdaptor : public detail::AggrSmemSizeGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::AggrSmemSizeGenericAdaptorBase;
public:
AggrSmemSizeGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
AggrSmemSizeGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : AggrSmemSizeGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
AggrSmemSizeGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : AggrSmemSizeGenericAdaptor(values, attrs, Properties{}, {}) {}
AggrSmemSizeGenericAdaptor(RangeT values, const AggrSmemSizeGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = AggrSmemSize, typename = std::enable_if_t<std::is_same_v<LateInst, AggrSmemSize>>>
AggrSmemSizeGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class AggrSmemSizeAdaptor : public AggrSmemSizeGenericAdaptor<::mlir::ValueRange> {
public:
using AggrSmemSizeGenericAdaptor::AggrSmemSizeGenericAdaptor;
AggrSmemSizeAdaptor(AggrSmemSize op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class AggrSmemSize : public ::mlir::Op<AggrSmemSize, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::OpTrait::NVVMRequiresSM<900>::Impl, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = AggrSmemSizeAdaptor;
template <typename RangeT>
using GenericAdaptor = AggrSmemSizeGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.aggr.smem.size");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static AggrSmemSize create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static AggrSmemSize create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static AggrSmemSize create(::mlir::OpBuilder &builder, ::mlir::Location location);
static AggrSmemSize create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static AggrSmemSize create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static AggrSmemSize create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static AggrSmemSize create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static AggrSmemSize create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static AggrSmemSize create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static AggrSmemSize create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static AggrSmemSize create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static AggrSmemSize create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static AggrSmemSize create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static AggrSmemSize create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::AggrSmemSize)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::BarrierArriveOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class BarrierArriveOpGenericAdaptorBase {
public:
struct Properties {
using alignedTy = ::mlir::BoolAttr;
alignedTy aligned;
auto getAligned() const {
auto &propStorage = this->aligned;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setAligned(const ::mlir::BoolAttr &propValue) {
this->aligned = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.aligned == this->aligned &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
BarrierArriveOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.barrier.arrive", odsAttrs.getContext());
}
BarrierArriveOpGenericAdaptorBase(BarrierArriveOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::BoolAttr getAlignedAttr();
bool getAligned();
};
} // namespace detail
template <typename RangeT>
class BarrierArriveOpGenericAdaptor : public detail::BarrierArriveOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::BarrierArriveOpGenericAdaptorBase;
static constexpr int odsIndex_barrierId = 0;
static constexpr int odsIndex_numberOfThreads = 1;
public:
BarrierArriveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
BarrierArriveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : BarrierArriveOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
BarrierArriveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : BarrierArriveOpGenericAdaptor(values, attrs, Properties{}, {}) {}
BarrierArriveOpGenericAdaptor(RangeT values, const BarrierArriveOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = BarrierArriveOp, typename = std::enable_if_t<std::is_same_v<LateInst, BarrierArriveOp>>>
BarrierArriveOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getBarrierId() {
auto operands = getODSOperands(0);
return operands.empty() ? ValueT{} : (*operands.begin());
}
ValueT getNumberOfThreads() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class BarrierArriveOpAdaptor : public BarrierArriveOpGenericAdaptor<::mlir::ValueRange> {
public:
using BarrierArriveOpGenericAdaptor::BarrierArriveOpGenericAdaptor;
BarrierArriveOpAdaptor(BarrierArriveOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class BarrierArriveOp : public ::mlir::Op<BarrierArriveOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = BarrierArriveOpAdaptor;
template <typename RangeT>
using GenericAdaptor = BarrierArriveOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_barrierId = 0;
static constexpr int odsIndex_numberOfThreads = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("aligned")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getAlignedAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getAlignedAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.barrier.arrive");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getBarrierId() {
auto operands = getODSOperands(0);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::TypedValue<::mlir::IntegerType> getNumberOfThreads() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin());
}
::mlir::MutableOperandRange getBarrierIdMutable();
::mlir::OpOperand &getNumberOfThreadsMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::BoolAttr getAlignedAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().aligned);
}
bool getAligned();
void setAlignedAttr(::mlir::BoolAttr attr) {
getProperties().aligned = attr;
}
void setAligned(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::Value barrierId, ::mlir::Value numberOfThreads, ::mlir::BoolAttr aligned);
static BarrierArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::Value barrierId, ::mlir::Value numberOfThreads, ::mlir::BoolAttr aligned);
static BarrierArriveOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::Value barrierId, ::mlir::Value numberOfThreads, ::mlir::BoolAttr aligned);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::Value barrierId, ::mlir::Value numberOfThreads, ::mlir::BoolAttr aligned);
static BarrierArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::Value barrierId, ::mlir::Value numberOfThreads, ::mlir::BoolAttr aligned);
static BarrierArriveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::Value barrierId, ::mlir::Value numberOfThreads, ::mlir::BoolAttr aligned);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::Value barrierId, ::mlir::Value numberOfThreads, bool aligned = true);
static BarrierArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::Value barrierId, ::mlir::Value numberOfThreads, bool aligned = true);
static BarrierArriveOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::Value barrierId, ::mlir::Value numberOfThreads, bool aligned = true);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::Value barrierId, ::mlir::Value numberOfThreads, bool aligned = true);
static BarrierArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::Value barrierId, ::mlir::Value numberOfThreads, bool aligned = true);
static BarrierArriveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::Value barrierId, ::mlir::Value numberOfThreads, bool aligned = true);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BarrierArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BarrierArriveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BarrierArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BarrierArriveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::BarrierArriveOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::BarrierArriveOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::BarrierOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class BarrierOpGenericAdaptorBase {
public:
struct Properties {
using alignedTy = ::mlir::BoolAttr;
alignedTy aligned;
auto getAligned() const {
auto &propStorage = this->aligned;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setAligned(const ::mlir::BoolAttr &propValue) {
this->aligned = propValue;
}
using operandSegmentSizesTy = std::array<int32_t, 2>;
operandSegmentSizesTy operandSegmentSizes;
::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
auto &propStorage = this->operandSegmentSizes;
return propStorage;
}
void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
auto &propStorage = this->operandSegmentSizes;
::llvm::copy(propValue, propStorage.begin());
}
bool operator==(const Properties &rhs) const {
return
rhs.aligned == this->aligned &&
rhs.operandSegmentSizes == this->operandSegmentSizes &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
BarrierOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.barrier", odsAttrs.getContext());
}
BarrierOpGenericAdaptorBase(BarrierOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::BoolAttr getAlignedAttr();
bool getAligned();
};
} // namespace detail
template <typename RangeT>
class BarrierOpGenericAdaptor : public detail::BarrierOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::BarrierOpGenericAdaptorBase;
static constexpr int odsIndex_barrierId = 0;
static constexpr int odsIndex_numberOfThreads = 1;
public:
BarrierOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
BarrierOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : BarrierOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
BarrierOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : BarrierOpGenericAdaptor(values, attrs, Properties{}, {}) {}
BarrierOpGenericAdaptor(RangeT values, const BarrierOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = BarrierOp, typename = std::enable_if_t<std::is_same_v<LateInst, BarrierOp>>>
BarrierOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getBarrierId() {
auto operands = getODSOperands(0);
return operands.empty() ? ValueT{} : (*operands.begin());
}
ValueT getNumberOfThreads() {
auto operands = getODSOperands(1);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class BarrierOpAdaptor : public BarrierOpGenericAdaptor<::mlir::ValueRange> {
public:
using BarrierOpGenericAdaptor::BarrierOpGenericAdaptor;
BarrierOpAdaptor(BarrierOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class BarrierOp : public ::mlir::Op<BarrierOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::VariadicOperands, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = BarrierOpAdaptor;
template <typename RangeT>
using GenericAdaptor = BarrierOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_barrierId = 0;
static constexpr int odsIndex_numberOfThreads = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("aligned"), ::llvm::StringRef("operandSegmentSizes")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getAlignedAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getAlignedAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getOperandSegmentSizesAttrName() {
return (*this)->getName().getAttributeNames().back();
}
static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
return name.getAttributeNames().back();
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.barrier");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getBarrierId() {
auto operands = getODSOperands(0);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::TypedValue<::mlir::IntegerType> getNumberOfThreads() {
auto operands = getODSOperands(1);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::MutableOperandRange getBarrierIdMutable();
::mlir::MutableOperandRange getNumberOfThreadsMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::BoolAttr getAlignedAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().aligned);
}
bool getAligned();
void setAlignedAttr(::mlir::BoolAttr attr) {
getProperties().aligned = attr;
}
void setAligned(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static BarrierOp create(::mlir::OpBuilder &builder, ::mlir::Location location);
static BarrierOp create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::Value barrierId, /*optional*/::mlir::Value numberOfThreads, ::mlir::BoolAttr aligned);
static BarrierOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::Value barrierId, /*optional*/::mlir::Value numberOfThreads, ::mlir::BoolAttr aligned);
static BarrierOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::Value barrierId, /*optional*/::mlir::Value numberOfThreads, ::mlir::BoolAttr aligned);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::Value barrierId, /*optional*/::mlir::Value numberOfThreads, ::mlir::BoolAttr aligned);
static BarrierOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::Value barrierId, /*optional*/::mlir::Value numberOfThreads, ::mlir::BoolAttr aligned);
static BarrierOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::Value barrierId, /*optional*/::mlir::Value numberOfThreads, ::mlir::BoolAttr aligned);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::Value barrierId, /*optional*/::mlir::Value numberOfThreads, bool aligned = true);
static BarrierOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::Value barrierId, /*optional*/::mlir::Value numberOfThreads, bool aligned = true);
static BarrierOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::Value barrierId, /*optional*/::mlir::Value numberOfThreads, bool aligned = true);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::Value barrierId, /*optional*/::mlir::Value numberOfThreads, bool aligned = true);
static BarrierOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::Value barrierId, /*optional*/::mlir::Value numberOfThreads, bool aligned = true);
static BarrierOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::Value barrierId, /*optional*/::mlir::Value numberOfThreads, bool aligned = true);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BarrierOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BarrierOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BarrierOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BarrierOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::BarrierOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::BarrierOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::BarrierReductionOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class BarrierReductionOpGenericAdaptorBase {
public:
struct Properties {
using alignedTy = ::mlir::BoolAttr;
alignedTy aligned;
auto getAligned() const {
auto &propStorage = this->aligned;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setAligned(const ::mlir::BoolAttr &propValue) {
this->aligned = propValue;
}
using reductionOpTy = ::mlir::NVVM::BarrierReductionAttr;
reductionOpTy reductionOp;
auto getReductionOp() const {
auto &propStorage = this->reductionOp;
return ::llvm::cast<::mlir::NVVM::BarrierReductionAttr>(propStorage);
}
void setReductionOp(const ::mlir::NVVM::BarrierReductionAttr &propValue) {
this->reductionOp = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.aligned == this->aligned &&
rhs.reductionOp == this->reductionOp &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
BarrierReductionOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.barrier.reduction", odsAttrs.getContext());
}
BarrierReductionOpGenericAdaptorBase(BarrierReductionOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::BarrierReductionAttr getReductionOpAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::BarrierReductionAttr>(getProperties().reductionOp);
return attr;
}
::mlir::NVVM::BarrierReduction getReductionOp();
::mlir::BoolAttr getAlignedAttr();
bool getAligned();
};
} // namespace detail
template <typename RangeT>
class BarrierReductionOpGenericAdaptor : public detail::BarrierReductionOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::BarrierReductionOpGenericAdaptorBase;
static constexpr int odsIndex_barrierId = 0;
static constexpr int odsIndex_reductionPredicate = 1;
public:
BarrierReductionOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
BarrierReductionOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : BarrierReductionOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
BarrierReductionOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : BarrierReductionOpGenericAdaptor(values, attrs, Properties{}, {}) {}
BarrierReductionOpGenericAdaptor(RangeT values, const BarrierReductionOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = BarrierReductionOp, typename = std::enable_if_t<std::is_same_v<LateInst, BarrierReductionOp>>>
BarrierReductionOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getBarrierId() {
auto operands = getODSOperands(0);
return operands.empty() ? ValueT{} : (*operands.begin());
}
ValueT getReductionPredicate() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class BarrierReductionOpAdaptor : public BarrierReductionOpGenericAdaptor<::mlir::ValueRange> {
public:
using BarrierReductionOpGenericAdaptor::BarrierReductionOpGenericAdaptor;
BarrierReductionOpAdaptor(BarrierReductionOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class BarrierReductionOp : public ::mlir::Op<BarrierReductionOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = BarrierReductionOpAdaptor;
template <typename RangeT>
using GenericAdaptor = BarrierReductionOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_barrierId = 0;
static constexpr int odsIndex_reductionPredicate = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("aligned"), ::llvm::StringRef("reductionOp")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getAlignedAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getAlignedAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getReductionOpAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getReductionOpAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.barrier.reduction");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getBarrierId() {
auto operands = getODSOperands(0);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::TypedValue<::mlir::IntegerType> getReductionPredicate() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin());
}
::mlir::MutableOperandRange getBarrierIdMutable();
::mlir::OpOperand &getReductionPredicateMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::BarrierReductionAttr getReductionOpAttr() {
return ::llvm::cast<::mlir::NVVM::BarrierReductionAttr>(getProperties().reductionOp);
}
::mlir::NVVM::BarrierReduction getReductionOp();
::mlir::BoolAttr getAlignedAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().aligned);
}
bool getAligned();
void setReductionOpAttr(::mlir::NVVM::BarrierReductionAttr attr) {
getProperties().reductionOp = attr;
}
void setReductionOp(::mlir::NVVM::BarrierReduction attrValue);
void setAlignedAttr(::mlir::BoolAttr attr) {
getProperties().aligned = attr;
}
void setAligned(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::Value barrierId, ::mlir::NVVM::BarrierReductionAttr reductionOp, ::mlir::Value reductionPredicate, ::mlir::BoolAttr aligned = nullptr);
static BarrierReductionOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::Value barrierId, ::mlir::NVVM::BarrierReductionAttr reductionOp, ::mlir::Value reductionPredicate, ::mlir::BoolAttr aligned = nullptr);
static BarrierReductionOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::Value barrierId, ::mlir::NVVM::BarrierReductionAttr reductionOp, ::mlir::Value reductionPredicate, ::mlir::BoolAttr aligned = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::Value barrierId, ::mlir::NVVM::BarrierReductionAttr reductionOp, ::mlir::Value reductionPredicate, ::mlir::BoolAttr aligned = nullptr);
static BarrierReductionOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::Value barrierId, ::mlir::NVVM::BarrierReductionAttr reductionOp, ::mlir::Value reductionPredicate, ::mlir::BoolAttr aligned = nullptr);
static BarrierReductionOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::Value barrierId, ::mlir::NVVM::BarrierReductionAttr reductionOp, ::mlir::Value reductionPredicate, ::mlir::BoolAttr aligned = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::Value barrierId, ::mlir::NVVM::BarrierReductionAttr reductionOp, ::mlir::Value reductionPredicate, ::mlir::BoolAttr aligned = nullptr);
static BarrierReductionOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::Value barrierId, ::mlir::NVVM::BarrierReductionAttr reductionOp, ::mlir::Value reductionPredicate, ::mlir::BoolAttr aligned = nullptr);
static BarrierReductionOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::Value barrierId, ::mlir::NVVM::BarrierReductionAttr reductionOp, ::mlir::Value reductionPredicate, ::mlir::BoolAttr aligned = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::Value barrierId, ::mlir::NVVM::BarrierReduction reductionOp, ::mlir::Value reductionPredicate, bool aligned = true);
static BarrierReductionOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::Value barrierId, ::mlir::NVVM::BarrierReduction reductionOp, ::mlir::Value reductionPredicate, bool aligned = true);
static BarrierReductionOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::Value barrierId, ::mlir::NVVM::BarrierReduction reductionOp, ::mlir::Value reductionPredicate, bool aligned = true);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::Value barrierId, ::mlir::NVVM::BarrierReduction reductionOp, ::mlir::Value reductionPredicate, bool aligned = true);
static BarrierReductionOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::Value barrierId, ::mlir::NVVM::BarrierReduction reductionOp, ::mlir::Value reductionPredicate, bool aligned = true);
static BarrierReductionOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::Value barrierId, ::mlir::NVVM::BarrierReduction reductionOp, ::mlir::Value reductionPredicate, bool aligned = true);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::Value barrierId, ::mlir::NVVM::BarrierReduction reductionOp, ::mlir::Value reductionPredicate, bool aligned = true);
static BarrierReductionOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::Value barrierId, ::mlir::NVVM::BarrierReduction reductionOp, ::mlir::Value reductionPredicate, bool aligned = true);
static BarrierReductionOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::Value barrierId, ::mlir::NVVM::BarrierReduction reductionOp, ::mlir::Value reductionPredicate, bool aligned = true);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BarrierReductionOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BarrierReductionOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BarrierReductionOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BarrierReductionOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BarrierReductionOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BarrierReductionOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BarrierReductionOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BarrierReductionOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::BarrierReductionOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::BarrierReductionOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::BlockDimXOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class BlockDimXOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
BlockDimXOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.ntid.x", odsAttrs.getContext());
}
BlockDimXOpGenericAdaptorBase(BlockDimXOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class BlockDimXOpGenericAdaptor : public detail::BlockDimXOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::BlockDimXOpGenericAdaptorBase;
public:
BlockDimXOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
BlockDimXOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : BlockDimXOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
BlockDimXOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : BlockDimXOpGenericAdaptor(values, attrs, Properties{}, {}) {}
BlockDimXOpGenericAdaptor(RangeT values, const BlockDimXOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = BlockDimXOp, typename = std::enable_if_t<std::is_same_v<LateInst, BlockDimXOp>>>
BlockDimXOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class BlockDimXOpAdaptor : public BlockDimXOpGenericAdaptor<::mlir::ValueRange> {
public:
using BlockDimXOpGenericAdaptor::BlockDimXOpGenericAdaptor;
BlockDimXOpAdaptor(BlockDimXOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class BlockDimXOp : public ::mlir::Op<BlockDimXOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = BlockDimXOpAdaptor;
template <typename RangeT>
using GenericAdaptor = BlockDimXOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<BlockDimXOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.ntid.x");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static BlockDimXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static BlockDimXOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockDimXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockDimXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockDimXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockDimXOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockDimXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockDimXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockDimXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockDimXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockDimXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockDimXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockDimXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockDimXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockDimXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockDimXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::BlockDimXOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::BlockDimXOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::BlockDimYOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class BlockDimYOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
BlockDimYOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.ntid.y", odsAttrs.getContext());
}
BlockDimYOpGenericAdaptorBase(BlockDimYOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class BlockDimYOpGenericAdaptor : public detail::BlockDimYOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::BlockDimYOpGenericAdaptorBase;
public:
BlockDimYOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
BlockDimYOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : BlockDimYOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
BlockDimYOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : BlockDimYOpGenericAdaptor(values, attrs, Properties{}, {}) {}
BlockDimYOpGenericAdaptor(RangeT values, const BlockDimYOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = BlockDimYOp, typename = std::enable_if_t<std::is_same_v<LateInst, BlockDimYOp>>>
BlockDimYOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class BlockDimYOpAdaptor : public BlockDimYOpGenericAdaptor<::mlir::ValueRange> {
public:
using BlockDimYOpGenericAdaptor::BlockDimYOpGenericAdaptor;
BlockDimYOpAdaptor(BlockDimYOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class BlockDimYOp : public ::mlir::Op<BlockDimYOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = BlockDimYOpAdaptor;
template <typename RangeT>
using GenericAdaptor = BlockDimYOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<BlockDimYOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.ntid.y");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static BlockDimYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static BlockDimYOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockDimYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockDimYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockDimYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockDimYOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockDimYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockDimYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockDimYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockDimYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockDimYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockDimYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockDimYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockDimYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockDimYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockDimYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::BlockDimYOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::BlockDimYOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::BlockDimZOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class BlockDimZOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
BlockDimZOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.ntid.z", odsAttrs.getContext());
}
BlockDimZOpGenericAdaptorBase(BlockDimZOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class BlockDimZOpGenericAdaptor : public detail::BlockDimZOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::BlockDimZOpGenericAdaptorBase;
public:
BlockDimZOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
BlockDimZOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : BlockDimZOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
BlockDimZOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : BlockDimZOpGenericAdaptor(values, attrs, Properties{}, {}) {}
BlockDimZOpGenericAdaptor(RangeT values, const BlockDimZOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = BlockDimZOp, typename = std::enable_if_t<std::is_same_v<LateInst, BlockDimZOp>>>
BlockDimZOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class BlockDimZOpAdaptor : public BlockDimZOpGenericAdaptor<::mlir::ValueRange> {
public:
using BlockDimZOpGenericAdaptor::BlockDimZOpGenericAdaptor;
BlockDimZOpAdaptor(BlockDimZOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class BlockDimZOp : public ::mlir::Op<BlockDimZOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = BlockDimZOpAdaptor;
template <typename RangeT>
using GenericAdaptor = BlockDimZOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<BlockDimZOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.ntid.z");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static BlockDimZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static BlockDimZOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockDimZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockDimZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockDimZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockDimZOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockDimZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockDimZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockDimZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockDimZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockDimZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockDimZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockDimZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockDimZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockDimZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockDimZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::BlockDimZOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::BlockDimZOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::BlockIdXOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class BlockIdXOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
BlockIdXOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.ctaid.x", odsAttrs.getContext());
}
BlockIdXOpGenericAdaptorBase(BlockIdXOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class BlockIdXOpGenericAdaptor : public detail::BlockIdXOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::BlockIdXOpGenericAdaptorBase;
public:
BlockIdXOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
BlockIdXOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : BlockIdXOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
BlockIdXOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : BlockIdXOpGenericAdaptor(values, attrs, Properties{}, {}) {}
BlockIdXOpGenericAdaptor(RangeT values, const BlockIdXOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = BlockIdXOp, typename = std::enable_if_t<std::is_same_v<LateInst, BlockIdXOp>>>
BlockIdXOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class BlockIdXOpAdaptor : public BlockIdXOpGenericAdaptor<::mlir::ValueRange> {
public:
using BlockIdXOpGenericAdaptor::BlockIdXOpGenericAdaptor;
BlockIdXOpAdaptor(BlockIdXOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class BlockIdXOp : public ::mlir::Op<BlockIdXOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = BlockIdXOpAdaptor;
template <typename RangeT>
using GenericAdaptor = BlockIdXOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<BlockIdXOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.ctaid.x");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static BlockIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static BlockIdXOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockIdXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockIdXOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockIdXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockIdXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockIdXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockIdXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockIdXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::BlockIdXOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::BlockIdXOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::BlockIdYOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class BlockIdYOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
BlockIdYOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.ctaid.y", odsAttrs.getContext());
}
BlockIdYOpGenericAdaptorBase(BlockIdYOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class BlockIdYOpGenericAdaptor : public detail::BlockIdYOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::BlockIdYOpGenericAdaptorBase;
public:
BlockIdYOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
BlockIdYOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : BlockIdYOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
BlockIdYOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : BlockIdYOpGenericAdaptor(values, attrs, Properties{}, {}) {}
BlockIdYOpGenericAdaptor(RangeT values, const BlockIdYOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = BlockIdYOp, typename = std::enable_if_t<std::is_same_v<LateInst, BlockIdYOp>>>
BlockIdYOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class BlockIdYOpAdaptor : public BlockIdYOpGenericAdaptor<::mlir::ValueRange> {
public:
using BlockIdYOpGenericAdaptor::BlockIdYOpGenericAdaptor;
BlockIdYOpAdaptor(BlockIdYOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class BlockIdYOp : public ::mlir::Op<BlockIdYOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = BlockIdYOpAdaptor;
template <typename RangeT>
using GenericAdaptor = BlockIdYOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<BlockIdYOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.ctaid.y");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static BlockIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static BlockIdYOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockIdYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockIdYOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockIdYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockIdYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockIdYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockIdYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockIdYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::BlockIdYOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::BlockIdYOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::BlockIdZOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class BlockIdZOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
BlockIdZOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.ctaid.z", odsAttrs.getContext());
}
BlockIdZOpGenericAdaptorBase(BlockIdZOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class BlockIdZOpGenericAdaptor : public detail::BlockIdZOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::BlockIdZOpGenericAdaptorBase;
public:
BlockIdZOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
BlockIdZOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : BlockIdZOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
BlockIdZOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : BlockIdZOpGenericAdaptor(values, attrs, Properties{}, {}) {}
BlockIdZOpGenericAdaptor(RangeT values, const BlockIdZOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = BlockIdZOp, typename = std::enable_if_t<std::is_same_v<LateInst, BlockIdZOp>>>
BlockIdZOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class BlockIdZOpAdaptor : public BlockIdZOpGenericAdaptor<::mlir::ValueRange> {
public:
using BlockIdZOpGenericAdaptor::BlockIdZOpGenericAdaptor;
BlockIdZOpAdaptor(BlockIdZOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class BlockIdZOp : public ::mlir::Op<BlockIdZOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = BlockIdZOpAdaptor;
template <typename RangeT>
using GenericAdaptor = BlockIdZOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<BlockIdZOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.ctaid.z");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static BlockIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static BlockIdZOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockIdZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockIdZOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockIdZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockIdZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockIdZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockIdZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockIdZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::BlockIdZOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::BlockIdZOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::BlockInClusterIdXOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class BlockInClusterIdXOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
BlockInClusterIdXOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.cluster.ctaid.x", odsAttrs.getContext());
}
BlockInClusterIdXOpGenericAdaptorBase(BlockInClusterIdXOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class BlockInClusterIdXOpGenericAdaptor : public detail::BlockInClusterIdXOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::BlockInClusterIdXOpGenericAdaptorBase;
public:
BlockInClusterIdXOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
BlockInClusterIdXOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : BlockInClusterIdXOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
BlockInClusterIdXOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : BlockInClusterIdXOpGenericAdaptor(values, attrs, Properties{}, {}) {}
BlockInClusterIdXOpGenericAdaptor(RangeT values, const BlockInClusterIdXOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = BlockInClusterIdXOp, typename = std::enable_if_t<std::is_same_v<LateInst, BlockInClusterIdXOp>>>
BlockInClusterIdXOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class BlockInClusterIdXOpAdaptor : public BlockInClusterIdXOpGenericAdaptor<::mlir::ValueRange> {
public:
using BlockInClusterIdXOpGenericAdaptor::BlockInClusterIdXOpGenericAdaptor;
BlockInClusterIdXOpAdaptor(BlockInClusterIdXOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class BlockInClusterIdXOp : public ::mlir::Op<BlockInClusterIdXOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<900>::Impl, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = BlockInClusterIdXOpAdaptor;
template <typename RangeT>
using GenericAdaptor = BlockInClusterIdXOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<BlockInClusterIdXOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.cluster.ctaid.x");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static BlockInClusterIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static BlockInClusterIdXOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockInClusterIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockInClusterIdXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockInClusterIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockInClusterIdXOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockInClusterIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockInClusterIdXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockInClusterIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockInClusterIdXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockInClusterIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockInClusterIdXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockInClusterIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockInClusterIdXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockInClusterIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockInClusterIdXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::BlockInClusterIdXOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::BlockInClusterIdXOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::BlockInClusterIdYOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class BlockInClusterIdYOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
BlockInClusterIdYOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.cluster.ctaid.y", odsAttrs.getContext());
}
BlockInClusterIdYOpGenericAdaptorBase(BlockInClusterIdYOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class BlockInClusterIdYOpGenericAdaptor : public detail::BlockInClusterIdYOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::BlockInClusterIdYOpGenericAdaptorBase;
public:
BlockInClusterIdYOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
BlockInClusterIdYOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : BlockInClusterIdYOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
BlockInClusterIdYOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : BlockInClusterIdYOpGenericAdaptor(values, attrs, Properties{}, {}) {}
BlockInClusterIdYOpGenericAdaptor(RangeT values, const BlockInClusterIdYOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = BlockInClusterIdYOp, typename = std::enable_if_t<std::is_same_v<LateInst, BlockInClusterIdYOp>>>
BlockInClusterIdYOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class BlockInClusterIdYOpAdaptor : public BlockInClusterIdYOpGenericAdaptor<::mlir::ValueRange> {
public:
using BlockInClusterIdYOpGenericAdaptor::BlockInClusterIdYOpGenericAdaptor;
BlockInClusterIdYOpAdaptor(BlockInClusterIdYOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class BlockInClusterIdYOp : public ::mlir::Op<BlockInClusterIdYOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<900>::Impl, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = BlockInClusterIdYOpAdaptor;
template <typename RangeT>
using GenericAdaptor = BlockInClusterIdYOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<BlockInClusterIdYOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.cluster.ctaid.y");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static BlockInClusterIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static BlockInClusterIdYOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockInClusterIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockInClusterIdYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockInClusterIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockInClusterIdYOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockInClusterIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockInClusterIdYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockInClusterIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockInClusterIdYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockInClusterIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockInClusterIdYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockInClusterIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockInClusterIdYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockInClusterIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockInClusterIdYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::BlockInClusterIdYOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::BlockInClusterIdYOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::BlockInClusterIdZOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class BlockInClusterIdZOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
BlockInClusterIdZOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.cluster.ctaid.z", odsAttrs.getContext());
}
BlockInClusterIdZOpGenericAdaptorBase(BlockInClusterIdZOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class BlockInClusterIdZOpGenericAdaptor : public detail::BlockInClusterIdZOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::BlockInClusterIdZOpGenericAdaptorBase;
public:
BlockInClusterIdZOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
BlockInClusterIdZOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : BlockInClusterIdZOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
BlockInClusterIdZOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : BlockInClusterIdZOpGenericAdaptor(values, attrs, Properties{}, {}) {}
BlockInClusterIdZOpGenericAdaptor(RangeT values, const BlockInClusterIdZOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = BlockInClusterIdZOp, typename = std::enable_if_t<std::is_same_v<LateInst, BlockInClusterIdZOp>>>
BlockInClusterIdZOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class BlockInClusterIdZOpAdaptor : public BlockInClusterIdZOpGenericAdaptor<::mlir::ValueRange> {
public:
using BlockInClusterIdZOpGenericAdaptor::BlockInClusterIdZOpGenericAdaptor;
BlockInClusterIdZOpAdaptor(BlockInClusterIdZOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class BlockInClusterIdZOp : public ::mlir::Op<BlockInClusterIdZOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<900>::Impl, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = BlockInClusterIdZOpAdaptor;
template <typename RangeT>
using GenericAdaptor = BlockInClusterIdZOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<BlockInClusterIdZOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.cluster.ctaid.z");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static BlockInClusterIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static BlockInClusterIdZOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockInClusterIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockInClusterIdZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockInClusterIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockInClusterIdZOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockInClusterIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static BlockInClusterIdZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockInClusterIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockInClusterIdZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockInClusterIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BlockInClusterIdZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockInClusterIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockInClusterIdZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockInClusterIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BlockInClusterIdZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::BlockInClusterIdZOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::BlockInClusterIdZOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::Breakpoint declarations
//===----------------------------------------------------------------------===//
namespace detail {
class BreakpointGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
BreakpointGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.breakpoint", odsAttrs.getContext());
}
BreakpointGenericAdaptorBase(Breakpoint op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class BreakpointGenericAdaptor : public detail::BreakpointGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::BreakpointGenericAdaptorBase;
public:
BreakpointGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
BreakpointGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : BreakpointGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
BreakpointGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : BreakpointGenericAdaptor(values, attrs, Properties{}, {}) {}
BreakpointGenericAdaptor(RangeT values, const BreakpointGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = Breakpoint, typename = std::enable_if_t<std::is_same_v<LateInst, Breakpoint>>>
BreakpointGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class BreakpointAdaptor : public BreakpointGenericAdaptor<::mlir::ValueRange> {
public:
using BreakpointGenericAdaptor::BreakpointGenericAdaptor;
BreakpointAdaptor(Breakpoint op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class Breakpoint : public ::mlir::Op<Breakpoint, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants> {
public:
using Op::Op;
using Op::print;
using Adaptor = BreakpointAdaptor;
template <typename RangeT>
using GenericAdaptor = BreakpointGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.breakpoint");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static Breakpoint create(::mlir::OpBuilder &builder, ::mlir::Location location);
static Breakpoint create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static Breakpoint create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static Breakpoint create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Breakpoint create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Breakpoint create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Breakpoint create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Breakpoint create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::Breakpoint)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::BulkStoreOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class BulkStoreOpGenericAdaptorBase {
public:
struct Properties {
using initValTy = ::mlir::IntegerAttr;
initValTy initVal;
auto getInitVal() const {
auto &propStorage = this->initVal;
return ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(propStorage);
}
void setInitVal(const ::mlir::IntegerAttr &propValue) {
this->initVal = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.initVal == this->initVal &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
BulkStoreOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.st.bulk", odsAttrs.getContext());
}
BulkStoreOpGenericAdaptorBase(BulkStoreOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::IntegerAttr getInitValAttr();
uint64_t getInitVal();
};
} // namespace detail
template <typename RangeT>
class BulkStoreOpGenericAdaptor : public detail::BulkStoreOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::BulkStoreOpGenericAdaptorBase;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_size = 1;
public:
BulkStoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
BulkStoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : BulkStoreOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
BulkStoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : BulkStoreOpGenericAdaptor(values, attrs, Properties{}, {}) {}
BulkStoreOpGenericAdaptor(RangeT values, const BulkStoreOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = BulkStoreOp, typename = std::enable_if_t<std::is_same_v<LateInst, BulkStoreOp>>>
BulkStoreOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getAddr() {
return (*getODSOperands(0).begin());
}
ValueT getSize() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class BulkStoreOpAdaptor : public BulkStoreOpGenericAdaptor<::mlir::ValueRange> {
public:
using BulkStoreOpGenericAdaptor::BulkStoreOpGenericAdaptor;
BulkStoreOpAdaptor(BulkStoreOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class BulkStoreOp : public ::mlir::Op<BulkStoreOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = BulkStoreOpAdaptor;
template <typename RangeT>
using GenericAdaptor = BulkStoreOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_size = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("initVal")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getInitValAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getInitValAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.st.bulk");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getAddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getSize() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getAddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSizeMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::IntegerAttr getInitValAttr() {
return ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().initVal);
}
uint64_t getInitVal();
void setInitValAttr(::mlir::IntegerAttr attr) {
getProperties().initVal = attr;
}
void setInitVal(uint64_t attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, ::mlir::Value size, ::mlir::IntegerAttr initVal);
static BulkStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, ::mlir::Value size, ::mlir::IntegerAttr initVal);
static BulkStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, ::mlir::Value size, ::mlir::IntegerAttr initVal);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value size, ::mlir::IntegerAttr initVal);
static BulkStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value size, ::mlir::IntegerAttr initVal);
static BulkStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value size, ::mlir::IntegerAttr initVal);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, ::mlir::Value size, uint64_t initVal = 0);
static BulkStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, ::mlir::Value size, uint64_t initVal = 0);
static BulkStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, ::mlir::Value size, uint64_t initVal = 0);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value size, uint64_t initVal = 0);
static BulkStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value size, uint64_t initVal = 0);
static BulkStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value size, uint64_t initVal = 0);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BulkStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BulkStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BulkStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BulkStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::BulkStoreOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::BulkStoreOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::Clock64Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class Clock64OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
Clock64OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.clock64", odsAttrs.getContext());
}
Clock64OpGenericAdaptorBase(Clock64Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class Clock64OpGenericAdaptor : public detail::Clock64OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::Clock64OpGenericAdaptorBase;
public:
Clock64OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
Clock64OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Clock64OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
Clock64OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : Clock64OpGenericAdaptor(values, attrs, Properties{}, {}) {}
Clock64OpGenericAdaptor(RangeT values, const Clock64OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = Clock64Op, typename = std::enable_if_t<std::is_same_v<LateInst, Clock64Op>>>
Clock64OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class Clock64OpAdaptor : public Clock64OpGenericAdaptor<::mlir::ValueRange> {
public:
using Clock64OpGenericAdaptor::Clock64OpGenericAdaptor;
Clock64OpAdaptor(Clock64Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class Clock64Op : public ::mlir::Op<Clock64Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = Clock64OpAdaptor;
template <typename RangeT>
using GenericAdaptor = Clock64OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.clock64");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static Clock64Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static Clock64Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static Clock64Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static Clock64Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static Clock64Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static Clock64Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Clock64Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Clock64Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Clock64Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Clock64Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Clock64Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Clock64Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Clock64Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Clock64Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::Clock64Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ClockOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ClockOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ClockOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.clock", odsAttrs.getContext());
}
ClockOpGenericAdaptorBase(ClockOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class ClockOpGenericAdaptor : public detail::ClockOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ClockOpGenericAdaptorBase;
public:
ClockOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ClockOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ClockOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ClockOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ClockOpGenericAdaptor(values, attrs, Properties{}, {}) {}
ClockOpGenericAdaptor(RangeT values, const ClockOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ClockOp, typename = std::enable_if_t<std::is_same_v<LateInst, ClockOp>>>
ClockOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ClockOpAdaptor : public ClockOpGenericAdaptor<::mlir::ValueRange> {
public:
using ClockOpGenericAdaptor::ClockOpGenericAdaptor;
ClockOpAdaptor(ClockOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ClockOp : public ::mlir::Op<ClockOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ClockOpAdaptor;
template <typename RangeT>
using GenericAdaptor = ClockOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.clock");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static ClockOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static ClockOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static ClockOp create(::mlir::OpBuilder &builder, ::mlir::Location location);
static ClockOp create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static ClockOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static ClockOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClockOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClockOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClockOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClockOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClockOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClockOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClockOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClockOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ClockOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ClusterArriveOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ClusterArriveOpGenericAdaptorBase {
public:
struct Properties {
using alignedTy = ::mlir::UnitAttr;
alignedTy aligned;
auto getAligned() const {
auto &propStorage = this->aligned;
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage);
}
void setAligned(const ::mlir::UnitAttr &propValue) {
this->aligned = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.aligned == this->aligned &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ClusterArriveOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.cluster.arrive", odsAttrs.getContext());
}
ClusterArriveOpGenericAdaptorBase(ClusterArriveOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::UnitAttr getAlignedAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().aligned);
return attr;
}
::std::optional<bool> getAligned();
};
} // namespace detail
template <typename RangeT>
class ClusterArriveOpGenericAdaptor : public detail::ClusterArriveOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ClusterArriveOpGenericAdaptorBase;
public:
ClusterArriveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ClusterArriveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ClusterArriveOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ClusterArriveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ClusterArriveOpGenericAdaptor(values, attrs, Properties{}, {}) {}
ClusterArriveOpGenericAdaptor(RangeT values, const ClusterArriveOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ClusterArriveOp, typename = std::enable_if_t<std::is_same_v<LateInst, ClusterArriveOp>>>
ClusterArriveOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ClusterArriveOpAdaptor : public ClusterArriveOpGenericAdaptor<::mlir::ValueRange> {
public:
using ClusterArriveOpGenericAdaptor::ClusterArriveOpGenericAdaptor;
ClusterArriveOpAdaptor(ClusterArriveOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ClusterArriveOp : public ::mlir::Op<ClusterArriveOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ClusterArriveOpAdaptor;
template <typename RangeT>
using GenericAdaptor = ClusterArriveOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("aligned")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getAlignedAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getAlignedAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.cluster.arrive");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::UnitAttr getAlignedAttr() {
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().aligned);
}
::std::optional<bool> getAligned();
void setAlignedAttr(::mlir::UnitAttr attr) {
getProperties().aligned = attr;
}
void setAligned(bool attrValue);
::mlir::Attribute removeAlignedAttr() {
auto attr = getProperties().aligned;
getProperties().aligned = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::UnitAttr aligned);
static ClusterArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::UnitAttr aligned);
static ClusterArriveOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::UnitAttr aligned);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::UnitAttr aligned);
static ClusterArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::UnitAttr aligned);
static ClusterArriveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::UnitAttr aligned);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterArriveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterArriveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ClusterArriveOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ClusterArriveOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ClusterArriveRelaxedOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ClusterArriveRelaxedOpGenericAdaptorBase {
public:
struct Properties {
using alignedTy = ::mlir::UnitAttr;
alignedTy aligned;
auto getAligned() const {
auto &propStorage = this->aligned;
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage);
}
void setAligned(const ::mlir::UnitAttr &propValue) {
this->aligned = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.aligned == this->aligned &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ClusterArriveRelaxedOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.cluster.arrive.relaxed", odsAttrs.getContext());
}
ClusterArriveRelaxedOpGenericAdaptorBase(ClusterArriveRelaxedOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::UnitAttr getAlignedAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().aligned);
return attr;
}
::std::optional<bool> getAligned();
};
} // namespace detail
template <typename RangeT>
class ClusterArriveRelaxedOpGenericAdaptor : public detail::ClusterArriveRelaxedOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ClusterArriveRelaxedOpGenericAdaptorBase;
public:
ClusterArriveRelaxedOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ClusterArriveRelaxedOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ClusterArriveRelaxedOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ClusterArriveRelaxedOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ClusterArriveRelaxedOpGenericAdaptor(values, attrs, Properties{}, {}) {}
ClusterArriveRelaxedOpGenericAdaptor(RangeT values, const ClusterArriveRelaxedOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ClusterArriveRelaxedOp, typename = std::enable_if_t<std::is_same_v<LateInst, ClusterArriveRelaxedOp>>>
ClusterArriveRelaxedOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ClusterArriveRelaxedOpAdaptor : public ClusterArriveRelaxedOpGenericAdaptor<::mlir::ValueRange> {
public:
using ClusterArriveRelaxedOpGenericAdaptor::ClusterArriveRelaxedOpGenericAdaptor;
ClusterArriveRelaxedOpAdaptor(ClusterArriveRelaxedOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ClusterArriveRelaxedOp : public ::mlir::Op<ClusterArriveRelaxedOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<900>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = ClusterArriveRelaxedOpAdaptor;
template <typename RangeT>
using GenericAdaptor = ClusterArriveRelaxedOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("aligned")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getAlignedAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getAlignedAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.cluster.arrive.relaxed");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::UnitAttr getAlignedAttr() {
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().aligned);
}
::std::optional<bool> getAligned();
void setAlignedAttr(::mlir::UnitAttr attr) {
getProperties().aligned = attr;
}
void setAligned(bool attrValue);
::mlir::Attribute removeAlignedAttr() {
auto attr = getProperties().aligned;
getProperties().aligned = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::UnitAttr aligned);
static ClusterArriveRelaxedOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::UnitAttr aligned);
static ClusterArriveRelaxedOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::UnitAttr aligned);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::UnitAttr aligned);
static ClusterArriveRelaxedOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::UnitAttr aligned);
static ClusterArriveRelaxedOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::UnitAttr aligned);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterArriveRelaxedOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterArriveRelaxedOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterArriveRelaxedOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterArriveRelaxedOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ClusterArriveRelaxedOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ClusterArriveRelaxedOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ClusterDim declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ClusterDimGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ClusterDimGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.cluster.nctarank", odsAttrs.getContext());
}
ClusterDimGenericAdaptorBase(ClusterDim op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class ClusterDimGenericAdaptor : public detail::ClusterDimGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ClusterDimGenericAdaptorBase;
public:
ClusterDimGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ClusterDimGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ClusterDimGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ClusterDimGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ClusterDimGenericAdaptor(values, attrs, Properties{}, {}) {}
ClusterDimGenericAdaptor(RangeT values, const ClusterDimGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ClusterDim, typename = std::enable_if_t<std::is_same_v<LateInst, ClusterDim>>>
ClusterDimGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ClusterDimAdaptor : public ClusterDimGenericAdaptor<::mlir::ValueRange> {
public:
using ClusterDimGenericAdaptor::ClusterDimGenericAdaptor;
ClusterDimAdaptor(ClusterDim op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ClusterDim : public ::mlir::Op<ClusterDim, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ClusterDimAdaptor;
template <typename RangeT>
using GenericAdaptor = ClusterDimGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<ClusterDim>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.cluster.nctarank");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static ClusterDim create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static ClusterDim create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDim create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDim create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDim create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDim create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDim create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDim create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDim create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDim create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDim create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDim create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDim create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDim create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDim create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDim create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ClusterDim)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ClusterDimGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ClusterDimBlocksXOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ClusterDimBlocksXOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ClusterDimBlocksXOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.cluster.nctaid.x", odsAttrs.getContext());
}
ClusterDimBlocksXOpGenericAdaptorBase(ClusterDimBlocksXOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class ClusterDimBlocksXOpGenericAdaptor : public detail::ClusterDimBlocksXOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ClusterDimBlocksXOpGenericAdaptorBase;
public:
ClusterDimBlocksXOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ClusterDimBlocksXOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ClusterDimBlocksXOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ClusterDimBlocksXOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ClusterDimBlocksXOpGenericAdaptor(values, attrs, Properties{}, {}) {}
ClusterDimBlocksXOpGenericAdaptor(RangeT values, const ClusterDimBlocksXOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ClusterDimBlocksXOp, typename = std::enable_if_t<std::is_same_v<LateInst, ClusterDimBlocksXOp>>>
ClusterDimBlocksXOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ClusterDimBlocksXOpAdaptor : public ClusterDimBlocksXOpGenericAdaptor<::mlir::ValueRange> {
public:
using ClusterDimBlocksXOpGenericAdaptor::ClusterDimBlocksXOpGenericAdaptor;
ClusterDimBlocksXOpAdaptor(ClusterDimBlocksXOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ClusterDimBlocksXOp : public ::mlir::Op<ClusterDimBlocksXOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<900>::Impl, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ClusterDimBlocksXOpAdaptor;
template <typename RangeT>
using GenericAdaptor = ClusterDimBlocksXOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<ClusterDimBlocksXOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.cluster.nctaid.x");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static ClusterDimBlocksXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static ClusterDimBlocksXOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimBlocksXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimBlocksXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimBlocksXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimBlocksXOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimBlocksXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimBlocksXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDimBlocksXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDimBlocksXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDimBlocksXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDimBlocksXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDimBlocksXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDimBlocksXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDimBlocksXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDimBlocksXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ClusterDimBlocksXOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ClusterDimBlocksXOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ClusterDimBlocksYOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ClusterDimBlocksYOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ClusterDimBlocksYOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.cluster.nctaid.y", odsAttrs.getContext());
}
ClusterDimBlocksYOpGenericAdaptorBase(ClusterDimBlocksYOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class ClusterDimBlocksYOpGenericAdaptor : public detail::ClusterDimBlocksYOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ClusterDimBlocksYOpGenericAdaptorBase;
public:
ClusterDimBlocksYOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ClusterDimBlocksYOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ClusterDimBlocksYOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ClusterDimBlocksYOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ClusterDimBlocksYOpGenericAdaptor(values, attrs, Properties{}, {}) {}
ClusterDimBlocksYOpGenericAdaptor(RangeT values, const ClusterDimBlocksYOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ClusterDimBlocksYOp, typename = std::enable_if_t<std::is_same_v<LateInst, ClusterDimBlocksYOp>>>
ClusterDimBlocksYOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ClusterDimBlocksYOpAdaptor : public ClusterDimBlocksYOpGenericAdaptor<::mlir::ValueRange> {
public:
using ClusterDimBlocksYOpGenericAdaptor::ClusterDimBlocksYOpGenericAdaptor;
ClusterDimBlocksYOpAdaptor(ClusterDimBlocksYOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ClusterDimBlocksYOp : public ::mlir::Op<ClusterDimBlocksYOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<900>::Impl, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ClusterDimBlocksYOpAdaptor;
template <typename RangeT>
using GenericAdaptor = ClusterDimBlocksYOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<ClusterDimBlocksYOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.cluster.nctaid.y");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static ClusterDimBlocksYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static ClusterDimBlocksYOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimBlocksYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimBlocksYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimBlocksYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimBlocksYOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimBlocksYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimBlocksYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDimBlocksYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDimBlocksYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDimBlocksYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDimBlocksYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDimBlocksYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDimBlocksYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDimBlocksYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDimBlocksYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ClusterDimBlocksYOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ClusterDimBlocksYOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ClusterDimBlocksZOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ClusterDimBlocksZOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ClusterDimBlocksZOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.cluster.nctaid.z", odsAttrs.getContext());
}
ClusterDimBlocksZOpGenericAdaptorBase(ClusterDimBlocksZOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class ClusterDimBlocksZOpGenericAdaptor : public detail::ClusterDimBlocksZOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ClusterDimBlocksZOpGenericAdaptorBase;
public:
ClusterDimBlocksZOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ClusterDimBlocksZOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ClusterDimBlocksZOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ClusterDimBlocksZOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ClusterDimBlocksZOpGenericAdaptor(values, attrs, Properties{}, {}) {}
ClusterDimBlocksZOpGenericAdaptor(RangeT values, const ClusterDimBlocksZOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ClusterDimBlocksZOp, typename = std::enable_if_t<std::is_same_v<LateInst, ClusterDimBlocksZOp>>>
ClusterDimBlocksZOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ClusterDimBlocksZOpAdaptor : public ClusterDimBlocksZOpGenericAdaptor<::mlir::ValueRange> {
public:
using ClusterDimBlocksZOpGenericAdaptor::ClusterDimBlocksZOpGenericAdaptor;
ClusterDimBlocksZOpAdaptor(ClusterDimBlocksZOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ClusterDimBlocksZOp : public ::mlir::Op<ClusterDimBlocksZOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ClusterDimBlocksZOpAdaptor;
template <typename RangeT>
using GenericAdaptor = ClusterDimBlocksZOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<ClusterDimBlocksZOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.cluster.nctaid.z");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static ClusterDimBlocksZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static ClusterDimBlocksZOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimBlocksZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimBlocksZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimBlocksZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimBlocksZOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimBlocksZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimBlocksZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDimBlocksZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDimBlocksZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDimBlocksZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDimBlocksZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDimBlocksZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDimBlocksZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDimBlocksZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDimBlocksZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ClusterDimBlocksZOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ClusterDimBlocksZOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ClusterDimXOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ClusterDimXOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ClusterDimXOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.nclusterid.x", odsAttrs.getContext());
}
ClusterDimXOpGenericAdaptorBase(ClusterDimXOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class ClusterDimXOpGenericAdaptor : public detail::ClusterDimXOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ClusterDimXOpGenericAdaptorBase;
public:
ClusterDimXOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ClusterDimXOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ClusterDimXOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ClusterDimXOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ClusterDimXOpGenericAdaptor(values, attrs, Properties{}, {}) {}
ClusterDimXOpGenericAdaptor(RangeT values, const ClusterDimXOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ClusterDimXOp, typename = std::enable_if_t<std::is_same_v<LateInst, ClusterDimXOp>>>
ClusterDimXOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ClusterDimXOpAdaptor : public ClusterDimXOpGenericAdaptor<::mlir::ValueRange> {
public:
using ClusterDimXOpGenericAdaptor::ClusterDimXOpGenericAdaptor;
ClusterDimXOpAdaptor(ClusterDimXOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ClusterDimXOp : public ::mlir::Op<ClusterDimXOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ClusterDimXOpAdaptor;
template <typename RangeT>
using GenericAdaptor = ClusterDimXOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<ClusterDimXOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.nclusterid.x");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static ClusterDimXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static ClusterDimXOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimXOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDimXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDimXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDimXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDimXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDimXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDimXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDimXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDimXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ClusterDimXOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ClusterDimXOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ClusterDimYOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ClusterDimYOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ClusterDimYOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.nclusterid.y", odsAttrs.getContext());
}
ClusterDimYOpGenericAdaptorBase(ClusterDimYOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class ClusterDimYOpGenericAdaptor : public detail::ClusterDimYOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ClusterDimYOpGenericAdaptorBase;
public:
ClusterDimYOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ClusterDimYOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ClusterDimYOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ClusterDimYOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ClusterDimYOpGenericAdaptor(values, attrs, Properties{}, {}) {}
ClusterDimYOpGenericAdaptor(RangeT values, const ClusterDimYOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ClusterDimYOp, typename = std::enable_if_t<std::is_same_v<LateInst, ClusterDimYOp>>>
ClusterDimYOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ClusterDimYOpAdaptor : public ClusterDimYOpGenericAdaptor<::mlir::ValueRange> {
public:
using ClusterDimYOpGenericAdaptor::ClusterDimYOpGenericAdaptor;
ClusterDimYOpAdaptor(ClusterDimYOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ClusterDimYOp : public ::mlir::Op<ClusterDimYOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ClusterDimYOpAdaptor;
template <typename RangeT>
using GenericAdaptor = ClusterDimYOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<ClusterDimYOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.nclusterid.y");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static ClusterDimYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static ClusterDimYOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimYOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDimYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDimYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDimYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDimYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDimYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDimYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDimYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDimYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ClusterDimYOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ClusterDimYOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ClusterDimZOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ClusterDimZOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ClusterDimZOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.nclusterid.z", odsAttrs.getContext());
}
ClusterDimZOpGenericAdaptorBase(ClusterDimZOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class ClusterDimZOpGenericAdaptor : public detail::ClusterDimZOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ClusterDimZOpGenericAdaptorBase;
public:
ClusterDimZOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ClusterDimZOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ClusterDimZOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ClusterDimZOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ClusterDimZOpGenericAdaptor(values, attrs, Properties{}, {}) {}
ClusterDimZOpGenericAdaptor(RangeT values, const ClusterDimZOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ClusterDimZOp, typename = std::enable_if_t<std::is_same_v<LateInst, ClusterDimZOp>>>
ClusterDimZOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ClusterDimZOpAdaptor : public ClusterDimZOpGenericAdaptor<::mlir::ValueRange> {
public:
using ClusterDimZOpGenericAdaptor::ClusterDimZOpGenericAdaptor;
ClusterDimZOpAdaptor(ClusterDimZOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ClusterDimZOp : public ::mlir::Op<ClusterDimZOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ClusterDimZOpAdaptor;
template <typename RangeT>
using GenericAdaptor = ClusterDimZOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<ClusterDimZOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.nclusterid.z");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static ClusterDimZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static ClusterDimZOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimZOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterDimZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDimZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDimZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDimZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterDimZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDimZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDimZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDimZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterDimZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ClusterDimZOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ClusterDimZOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ClusterId declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ClusterIdGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ClusterIdGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.cluster.ctarank", odsAttrs.getContext());
}
ClusterIdGenericAdaptorBase(ClusterId op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class ClusterIdGenericAdaptor : public detail::ClusterIdGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ClusterIdGenericAdaptorBase;
public:
ClusterIdGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ClusterIdGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ClusterIdGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ClusterIdGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ClusterIdGenericAdaptor(values, attrs, Properties{}, {}) {}
ClusterIdGenericAdaptor(RangeT values, const ClusterIdGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ClusterId, typename = std::enable_if_t<std::is_same_v<LateInst, ClusterId>>>
ClusterIdGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ClusterIdAdaptor : public ClusterIdGenericAdaptor<::mlir::ValueRange> {
public:
using ClusterIdGenericAdaptor::ClusterIdGenericAdaptor;
ClusterIdAdaptor(ClusterId op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ClusterId : public ::mlir::Op<ClusterId, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<900>::Impl, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ClusterIdAdaptor;
template <typename RangeT>
using GenericAdaptor = ClusterIdGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<ClusterId>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.cluster.ctarank");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static ClusterId create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static ClusterId create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterId create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterId create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterId create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterId create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterId create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterId create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterId create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterId create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterId create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterId create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterId create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterId create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterId create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterId create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ClusterId)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ClusterIdGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ClusterIdXOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ClusterIdXOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ClusterIdXOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.clusterid.x", odsAttrs.getContext());
}
ClusterIdXOpGenericAdaptorBase(ClusterIdXOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class ClusterIdXOpGenericAdaptor : public detail::ClusterIdXOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ClusterIdXOpGenericAdaptorBase;
public:
ClusterIdXOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ClusterIdXOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ClusterIdXOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ClusterIdXOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ClusterIdXOpGenericAdaptor(values, attrs, Properties{}, {}) {}
ClusterIdXOpGenericAdaptor(RangeT values, const ClusterIdXOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ClusterIdXOp, typename = std::enable_if_t<std::is_same_v<LateInst, ClusterIdXOp>>>
ClusterIdXOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ClusterIdXOpAdaptor : public ClusterIdXOpGenericAdaptor<::mlir::ValueRange> {
public:
using ClusterIdXOpGenericAdaptor::ClusterIdXOpGenericAdaptor;
ClusterIdXOpAdaptor(ClusterIdXOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ClusterIdXOp : public ::mlir::Op<ClusterIdXOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<900>::Impl, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ClusterIdXOpAdaptor;
template <typename RangeT>
using GenericAdaptor = ClusterIdXOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<ClusterIdXOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.clusterid.x");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static ClusterIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static ClusterIdXOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterIdXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterIdXOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterIdXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterIdXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterIdXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterIdXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterIdXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ClusterIdXOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ClusterIdXOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ClusterIdYOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ClusterIdYOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ClusterIdYOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.clusterid.y", odsAttrs.getContext());
}
ClusterIdYOpGenericAdaptorBase(ClusterIdYOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class ClusterIdYOpGenericAdaptor : public detail::ClusterIdYOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ClusterIdYOpGenericAdaptorBase;
public:
ClusterIdYOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ClusterIdYOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ClusterIdYOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ClusterIdYOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ClusterIdYOpGenericAdaptor(values, attrs, Properties{}, {}) {}
ClusterIdYOpGenericAdaptor(RangeT values, const ClusterIdYOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ClusterIdYOp, typename = std::enable_if_t<std::is_same_v<LateInst, ClusterIdYOp>>>
ClusterIdYOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ClusterIdYOpAdaptor : public ClusterIdYOpGenericAdaptor<::mlir::ValueRange> {
public:
using ClusterIdYOpGenericAdaptor::ClusterIdYOpGenericAdaptor;
ClusterIdYOpAdaptor(ClusterIdYOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ClusterIdYOp : public ::mlir::Op<ClusterIdYOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ClusterIdYOpAdaptor;
template <typename RangeT>
using GenericAdaptor = ClusterIdYOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<ClusterIdYOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.clusterid.y");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static ClusterIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static ClusterIdYOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterIdYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterIdYOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterIdYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterIdYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterIdYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterIdYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterIdYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ClusterIdYOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ClusterIdYOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ClusterIdZOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ClusterIdZOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ClusterIdZOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.clusterid.z", odsAttrs.getContext());
}
ClusterIdZOpGenericAdaptorBase(ClusterIdZOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class ClusterIdZOpGenericAdaptor : public detail::ClusterIdZOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ClusterIdZOpGenericAdaptorBase;
public:
ClusterIdZOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ClusterIdZOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ClusterIdZOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ClusterIdZOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ClusterIdZOpGenericAdaptor(values, attrs, Properties{}, {}) {}
ClusterIdZOpGenericAdaptor(RangeT values, const ClusterIdZOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ClusterIdZOp, typename = std::enable_if_t<std::is_same_v<LateInst, ClusterIdZOp>>>
ClusterIdZOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ClusterIdZOpAdaptor : public ClusterIdZOpGenericAdaptor<::mlir::ValueRange> {
public:
using ClusterIdZOpGenericAdaptor::ClusterIdZOpGenericAdaptor;
ClusterIdZOpAdaptor(ClusterIdZOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ClusterIdZOp : public ::mlir::Op<ClusterIdZOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ClusterIdZOpAdaptor;
template <typename RangeT>
using GenericAdaptor = ClusterIdZOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<ClusterIdZOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.clusterid.z");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static ClusterIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static ClusterIdZOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterIdZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterIdZOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ClusterIdZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterIdZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterIdZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterIdZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterIdZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ClusterIdZOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ClusterIdZOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ClusterLaunchControlQueryCancelOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ClusterLaunchControlQueryCancelOpGenericAdaptorBase {
public:
struct Properties {
using query_typeTy = ::mlir::NVVM::ClusterLaunchControlQueryTypeAttr;
query_typeTy query_type;
auto getQueryType() const {
auto &propStorage = this->query_type;
return ::llvm::cast<::mlir::NVVM::ClusterLaunchControlQueryTypeAttr>(propStorage);
}
void setQueryType(const ::mlir::NVVM::ClusterLaunchControlQueryTypeAttr &propValue) {
this->query_type = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.query_type == this->query_type &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ClusterLaunchControlQueryCancelOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.clusterlaunchcontrol.query.cancel", odsAttrs.getContext());
}
ClusterLaunchControlQueryCancelOpGenericAdaptorBase(ClusterLaunchControlQueryCancelOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::ClusterLaunchControlQueryTypeAttr getQueryTypeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::ClusterLaunchControlQueryTypeAttr>(getProperties().query_type);
return attr;
}
::mlir::NVVM::ClusterLaunchControlQueryType getQueryType();
};
} // namespace detail
template <typename RangeT>
class ClusterLaunchControlQueryCancelOpGenericAdaptor : public detail::ClusterLaunchControlQueryCancelOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ClusterLaunchControlQueryCancelOpGenericAdaptorBase;
static constexpr int odsIndex_try_cancel_response = 0;
public:
ClusterLaunchControlQueryCancelOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ClusterLaunchControlQueryCancelOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ClusterLaunchControlQueryCancelOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ClusterLaunchControlQueryCancelOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ClusterLaunchControlQueryCancelOpGenericAdaptor(values, attrs, Properties{}, {}) {}
ClusterLaunchControlQueryCancelOpGenericAdaptor(RangeT values, const ClusterLaunchControlQueryCancelOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ClusterLaunchControlQueryCancelOp, typename = std::enable_if_t<std::is_same_v<LateInst, ClusterLaunchControlQueryCancelOp>>>
ClusterLaunchControlQueryCancelOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getTryCancelResponse() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ClusterLaunchControlQueryCancelOpAdaptor : public ClusterLaunchControlQueryCancelOpGenericAdaptor<::mlir::ValueRange> {
public:
using ClusterLaunchControlQueryCancelOpGenericAdaptor::ClusterLaunchControlQueryCancelOpGenericAdaptor;
ClusterLaunchControlQueryCancelOpAdaptor(ClusterLaunchControlQueryCancelOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ClusterLaunchControlQueryCancelOp : public ::mlir::Op<ClusterLaunchControlQueryCancelOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<1000>::Impl, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor> {
public:
using Op::Op;
using Op::print;
using Adaptor = ClusterLaunchControlQueryCancelOpAdaptor;
template <typename RangeT>
using GenericAdaptor = ClusterLaunchControlQueryCancelOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_try_cancel_response = 0;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferTypeOpInterface::Trait<ClusterLaunchControlQueryCancelOp>::refineReturnTypes;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("query_type")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getQueryTypeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getQueryTypeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.clusterlaunchcontrol.query.cancel");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getTryCancelResponse() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getTryCancelResponseMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::ClusterLaunchControlQueryTypeAttr getQueryTypeAttr() {
return ::llvm::cast<::mlir::NVVM::ClusterLaunchControlQueryTypeAttr>(getProperties().query_type);
}
::mlir::NVVM::ClusterLaunchControlQueryType getQueryType();
void setQueryTypeAttr(::mlir::NVVM::ClusterLaunchControlQueryTypeAttr attr) {
getProperties().query_type = attr;
}
void setQueryType(::mlir::NVVM::ClusterLaunchControlQueryType attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::NVVM::ClusterLaunchControlQueryTypeAttr query_type, ::mlir::Value try_cancel_response);
static ClusterLaunchControlQueryCancelOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::NVVM::ClusterLaunchControlQueryTypeAttr query_type, ::mlir::Value try_cancel_response);
static ClusterLaunchControlQueryCancelOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::NVVM::ClusterLaunchControlQueryTypeAttr query_type, ::mlir::Value try_cancel_response);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::ClusterLaunchControlQueryTypeAttr query_type, ::mlir::Value try_cancel_response);
static ClusterLaunchControlQueryCancelOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::ClusterLaunchControlQueryTypeAttr query_type, ::mlir::Value try_cancel_response);
static ClusterLaunchControlQueryCancelOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::ClusterLaunchControlQueryTypeAttr query_type, ::mlir::Value try_cancel_response);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::ClusterLaunchControlQueryTypeAttr query_type, ::mlir::Value try_cancel_response);
static ClusterLaunchControlQueryCancelOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::ClusterLaunchControlQueryTypeAttr query_type, ::mlir::Value try_cancel_response);
static ClusterLaunchControlQueryCancelOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::ClusterLaunchControlQueryTypeAttr query_type, ::mlir::Value try_cancel_response);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::NVVM::ClusterLaunchControlQueryType query_type, ::mlir::Value try_cancel_response);
static ClusterLaunchControlQueryCancelOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::NVVM::ClusterLaunchControlQueryType query_type, ::mlir::Value try_cancel_response);
static ClusterLaunchControlQueryCancelOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::NVVM::ClusterLaunchControlQueryType query_type, ::mlir::Value try_cancel_response);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::ClusterLaunchControlQueryType query_type, ::mlir::Value try_cancel_response);
static ClusterLaunchControlQueryCancelOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::ClusterLaunchControlQueryType query_type, ::mlir::Value try_cancel_response);
static ClusterLaunchControlQueryCancelOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::ClusterLaunchControlQueryType query_type, ::mlir::Value try_cancel_response);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::ClusterLaunchControlQueryType query_type, ::mlir::Value try_cancel_response);
static ClusterLaunchControlQueryCancelOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::ClusterLaunchControlQueryType query_type, ::mlir::Value try_cancel_response);
static ClusterLaunchControlQueryCancelOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::ClusterLaunchControlQueryType query_type, ::mlir::Value try_cancel_response);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterLaunchControlQueryCancelOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterLaunchControlQueryCancelOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterLaunchControlQueryCancelOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterLaunchControlQueryCancelOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterLaunchControlQueryCancelOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterLaunchControlQueryCancelOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterLaunchControlQueryCancelOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterLaunchControlQueryCancelOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static ::llvm::LogicalResult
inferReturnTypes(::mlir::MLIRContext *context,
std::optional<::mlir::Location> location,
Adaptor adaptor,
::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
static mlir::NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ClusterLaunchControlQueryCancelOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ClusterLaunchControlQueryCancelOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ClusterLaunchControlTryCancelOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ClusterLaunchControlTryCancelOpGenericAdaptorBase {
public:
struct Properties {
using multicastTy = ::mlir::UnitAttr;
multicastTy multicast;
auto getMulticast() const {
auto &propStorage = this->multicast;
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage);
}
void setMulticast(const ::mlir::UnitAttr &propValue) {
this->multicast = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.multicast == this->multicast &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ClusterLaunchControlTryCancelOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.clusterlaunchcontrol.try.cancel", odsAttrs.getContext());
}
ClusterLaunchControlTryCancelOpGenericAdaptorBase(ClusterLaunchControlTryCancelOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::UnitAttr getMulticastAttr();
bool getMulticast();
};
} // namespace detail
template <typename RangeT>
class ClusterLaunchControlTryCancelOpGenericAdaptor : public detail::ClusterLaunchControlTryCancelOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ClusterLaunchControlTryCancelOpGenericAdaptorBase;
static constexpr int odsIndex_smemAddress = 0;
static constexpr int odsIndex_mbarrier = 1;
public:
ClusterLaunchControlTryCancelOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ClusterLaunchControlTryCancelOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ClusterLaunchControlTryCancelOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ClusterLaunchControlTryCancelOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ClusterLaunchControlTryCancelOpGenericAdaptor(values, attrs, Properties{}, {}) {}
ClusterLaunchControlTryCancelOpGenericAdaptor(RangeT values, const ClusterLaunchControlTryCancelOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ClusterLaunchControlTryCancelOp, typename = std::enable_if_t<std::is_same_v<LateInst, ClusterLaunchControlTryCancelOp>>>
ClusterLaunchControlTryCancelOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSmemAddress() {
return (*getODSOperands(0).begin());
}
ValueT getMbarrier() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ClusterLaunchControlTryCancelOpAdaptor : public ClusterLaunchControlTryCancelOpGenericAdaptor<::mlir::ValueRange> {
public:
using ClusterLaunchControlTryCancelOpGenericAdaptor::ClusterLaunchControlTryCancelOpGenericAdaptor;
ClusterLaunchControlTryCancelOpAdaptor(ClusterLaunchControlTryCancelOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ClusterLaunchControlTryCancelOp : public ::mlir::Op<ClusterLaunchControlTryCancelOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<1000>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = ClusterLaunchControlTryCancelOpAdaptor;
template <typename RangeT>
using GenericAdaptor = ClusterLaunchControlTryCancelOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_smemAddress = 0;
static constexpr int odsIndex_mbarrier = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("multicast")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getMulticastAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getMulticastAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.clusterlaunchcontrol.try.cancel");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getSmemAddress() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getMbarrier() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getSmemAddressMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getMbarrierMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::UnitAttr getMulticastAttr() {
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().multicast);
}
bool getMulticast();
void setMulticastAttr(::mlir::UnitAttr attr) {
getProperties().multicast = attr;
}
void setMulticast(bool attrValue);
::mlir::Attribute removeMulticastAttr() {
auto attr = getProperties().multicast;
getProperties().multicast = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::UnitAttr multicast, ::mlir::Value smemAddress, ::mlir::Value mbarrier);
static ClusterLaunchControlTryCancelOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::UnitAttr multicast, ::mlir::Value smemAddress, ::mlir::Value mbarrier);
static ClusterLaunchControlTryCancelOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::UnitAttr multicast, ::mlir::Value smemAddress, ::mlir::Value mbarrier);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::UnitAttr multicast, ::mlir::Value smemAddress, ::mlir::Value mbarrier);
static ClusterLaunchControlTryCancelOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::UnitAttr multicast, ::mlir::Value smemAddress, ::mlir::Value mbarrier);
static ClusterLaunchControlTryCancelOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::UnitAttr multicast, ::mlir::Value smemAddress, ::mlir::Value mbarrier);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/bool multicast, ::mlir::Value smemAddress, ::mlir::Value mbarrier);
static ClusterLaunchControlTryCancelOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/bool multicast, ::mlir::Value smemAddress, ::mlir::Value mbarrier);
static ClusterLaunchControlTryCancelOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/bool multicast, ::mlir::Value smemAddress, ::mlir::Value mbarrier);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/bool multicast, ::mlir::Value smemAddress, ::mlir::Value mbarrier);
static ClusterLaunchControlTryCancelOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/bool multicast, ::mlir::Value smemAddress, ::mlir::Value mbarrier);
static ClusterLaunchControlTryCancelOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/bool multicast, ::mlir::Value smemAddress, ::mlir::Value mbarrier);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterLaunchControlTryCancelOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterLaunchControlTryCancelOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterLaunchControlTryCancelOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterLaunchControlTryCancelOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static mlir::NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ClusterLaunchControlTryCancelOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ClusterLaunchControlTryCancelOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ClusterWaitOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ClusterWaitOpGenericAdaptorBase {
public:
struct Properties {
using alignedTy = ::mlir::UnitAttr;
alignedTy aligned;
auto getAligned() const {
auto &propStorage = this->aligned;
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage);
}
void setAligned(const ::mlir::UnitAttr &propValue) {
this->aligned = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.aligned == this->aligned &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ClusterWaitOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.cluster.wait", odsAttrs.getContext());
}
ClusterWaitOpGenericAdaptorBase(ClusterWaitOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::UnitAttr getAlignedAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().aligned);
return attr;
}
::std::optional<bool> getAligned();
};
} // namespace detail
template <typename RangeT>
class ClusterWaitOpGenericAdaptor : public detail::ClusterWaitOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ClusterWaitOpGenericAdaptorBase;
public:
ClusterWaitOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ClusterWaitOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ClusterWaitOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ClusterWaitOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ClusterWaitOpGenericAdaptor(values, attrs, Properties{}, {}) {}
ClusterWaitOpGenericAdaptor(RangeT values, const ClusterWaitOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ClusterWaitOp, typename = std::enable_if_t<std::is_same_v<LateInst, ClusterWaitOp>>>
ClusterWaitOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ClusterWaitOpAdaptor : public ClusterWaitOpGenericAdaptor<::mlir::ValueRange> {
public:
using ClusterWaitOpGenericAdaptor::ClusterWaitOpGenericAdaptor;
ClusterWaitOpAdaptor(ClusterWaitOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ClusterWaitOp : public ::mlir::Op<ClusterWaitOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<900>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = ClusterWaitOpAdaptor;
template <typename RangeT>
using GenericAdaptor = ClusterWaitOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("aligned")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getAlignedAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getAlignedAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.cluster.wait");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::UnitAttr getAlignedAttr() {
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().aligned);
}
::std::optional<bool> getAligned();
void setAlignedAttr(::mlir::UnitAttr attr) {
getProperties().aligned = attr;
}
void setAligned(bool attrValue);
::mlir::Attribute removeAlignedAttr() {
auto attr = getProperties().aligned;
getProperties().aligned = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::UnitAttr aligned);
static ClusterWaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::UnitAttr aligned);
static ClusterWaitOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::UnitAttr aligned);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::UnitAttr aligned);
static ClusterWaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::UnitAttr aligned);
static ClusterWaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::UnitAttr aligned);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterWaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ClusterWaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterWaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ClusterWaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ClusterWaitOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ClusterWaitOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ConvertBF16x2ToF4x2Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ConvertBF16x2ToF4x2OpGenericAdaptorBase {
public:
struct Properties {
using dstTyTy = ::mlir::TypeAttr;
dstTyTy dstTy;
auto getDstTy() const {
auto &propStorage = this->dstTy;
return ::llvm::cast<::mlir::TypeAttr>(propStorage);
}
void setDstTy(const ::mlir::TypeAttr &propValue) {
this->dstTy = propValue;
}
using reluTy = ::mlir::BoolAttr;
reluTy relu;
auto getRelu() const {
auto &propStorage = this->relu;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelu(const ::mlir::BoolAttr &propValue) {
this->relu = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.dstTy == this->dstTy &&
rhs.relu == this->relu &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ConvertBF16x2ToF4x2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.convert.bf16x2.to.f4x2", odsAttrs.getContext());
}
ConvertBF16x2ToF4x2OpGenericAdaptorBase(ConvertBF16x2ToF4x2Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::BoolAttr getReluAttr();
bool getRelu();
::mlir::TypeAttr getDstTyAttr() {
auto attr = ::llvm::cast<::mlir::TypeAttr>(getProperties().dstTy);
return attr;
}
::mlir::Type getDstTy();
};
} // namespace detail
template <typename RangeT>
class ConvertBF16x2ToF4x2OpGenericAdaptor : public detail::ConvertBF16x2ToF4x2OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ConvertBF16x2ToF4x2OpGenericAdaptorBase;
static constexpr int odsIndex_src = 0;
public:
ConvertBF16x2ToF4x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ConvertBF16x2ToF4x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConvertBF16x2ToF4x2OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ConvertBF16x2ToF4x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConvertBF16x2ToF4x2OpGenericAdaptor(values, attrs, Properties{}, {}) {}
ConvertBF16x2ToF4x2OpGenericAdaptor(RangeT values, const ConvertBF16x2ToF4x2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ConvertBF16x2ToF4x2Op, typename = std::enable_if_t<std::is_same_v<LateInst, ConvertBF16x2ToF4x2Op>>>
ConvertBF16x2ToF4x2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrc() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ConvertBF16x2ToF4x2OpAdaptor : public ConvertBF16x2ToF4x2OpGenericAdaptor<::mlir::ValueRange> {
public:
using ConvertBF16x2ToF4x2OpGenericAdaptor::ConvertBF16x2ToF4x2OpGenericAdaptor;
ConvertBF16x2ToF4x2OpAdaptor(ConvertBF16x2ToF4x2Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ConvertBF16x2ToF4x2Op : public ::mlir::Op<ConvertBF16x2ToF4x2Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ConvertBF16x2ToF4x2OpAdaptor;
template <typename RangeT>
using GenericAdaptor = ConvertBF16x2ToF4x2OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("dstTy"), ::llvm::StringRef("relu")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getDstTyAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getDstTyAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getReluAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getReluAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.convert.bf16x2.to.f4x2");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getDst() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::BoolAttr getReluAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relu);
}
bool getRelu();
::mlir::TypeAttr getDstTyAttr() {
return ::llvm::cast<::mlir::TypeAttr>(getProperties().dstTy);
}
::mlir::Type getDstTy();
void setReluAttr(::mlir::BoolAttr attr) {
getProperties().relu = attr;
}
void setRelu(bool attrValue);
void setDstTyAttr(::mlir::TypeAttr attr) {
getProperties().dstTy = attr;
}
void setDstTy(::mlir::Type attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertBF16x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertBF16x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertBF16x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertBF16x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertBF16x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertBF16x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static ConvertBF16x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static ConvertBF16x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static ConvertBF16x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static ConvertBF16x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static ConvertBF16x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static ConvertBF16x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertBF16x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertBF16x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertBF16x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertBF16x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertBF16x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertBF16x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertBF16x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertBF16x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(NVVM::ConvertBF16x2ToF4x2Op &op,
LLVM::ModuleTranslation &mt, llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ConvertBF16x2ToF4x2Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ConvertBF16x2ToF4x2OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ConvertBF16x2ToF6x2Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ConvertBF16x2ToF6x2OpGenericAdaptorBase {
public:
struct Properties {
using dstTyTy = ::mlir::TypeAttr;
dstTyTy dstTy;
auto getDstTy() const {
auto &propStorage = this->dstTy;
return ::llvm::cast<::mlir::TypeAttr>(propStorage);
}
void setDstTy(const ::mlir::TypeAttr &propValue) {
this->dstTy = propValue;
}
using reluTy = ::mlir::BoolAttr;
reluTy relu;
auto getRelu() const {
auto &propStorage = this->relu;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelu(const ::mlir::BoolAttr &propValue) {
this->relu = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.dstTy == this->dstTy &&
rhs.relu == this->relu &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ConvertBF16x2ToF6x2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.convert.bf16x2.to.f6x2", odsAttrs.getContext());
}
ConvertBF16x2ToF6x2OpGenericAdaptorBase(ConvertBF16x2ToF6x2Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::BoolAttr getReluAttr();
bool getRelu();
::mlir::TypeAttr getDstTyAttr() {
auto attr = ::llvm::cast<::mlir::TypeAttr>(getProperties().dstTy);
return attr;
}
::mlir::Type getDstTy();
};
} // namespace detail
template <typename RangeT>
class ConvertBF16x2ToF6x2OpGenericAdaptor : public detail::ConvertBF16x2ToF6x2OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ConvertBF16x2ToF6x2OpGenericAdaptorBase;
static constexpr int odsIndex_src = 0;
public:
ConvertBF16x2ToF6x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ConvertBF16x2ToF6x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConvertBF16x2ToF6x2OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ConvertBF16x2ToF6x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConvertBF16x2ToF6x2OpGenericAdaptor(values, attrs, Properties{}, {}) {}
ConvertBF16x2ToF6x2OpGenericAdaptor(RangeT values, const ConvertBF16x2ToF6x2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ConvertBF16x2ToF6x2Op, typename = std::enable_if_t<std::is_same_v<LateInst, ConvertBF16x2ToF6x2Op>>>
ConvertBF16x2ToF6x2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrc() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ConvertBF16x2ToF6x2OpAdaptor : public ConvertBF16x2ToF6x2OpGenericAdaptor<::mlir::ValueRange> {
public:
using ConvertBF16x2ToF6x2OpGenericAdaptor::ConvertBF16x2ToF6x2OpGenericAdaptor;
ConvertBF16x2ToF6x2OpAdaptor(ConvertBF16x2ToF6x2Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ConvertBF16x2ToF6x2Op : public ::mlir::Op<ConvertBF16x2ToF6x2Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ConvertBF16x2ToF6x2OpAdaptor;
template <typename RangeT>
using GenericAdaptor = ConvertBF16x2ToF6x2OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("dstTy"), ::llvm::StringRef("relu")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getDstTyAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getDstTyAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getReluAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getReluAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.convert.bf16x2.to.f6x2");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getDst() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::BoolAttr getReluAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relu);
}
bool getRelu();
::mlir::TypeAttr getDstTyAttr() {
return ::llvm::cast<::mlir::TypeAttr>(getProperties().dstTy);
}
::mlir::Type getDstTy();
void setReluAttr(::mlir::BoolAttr attr) {
getProperties().relu = attr;
}
void setRelu(bool attrValue);
void setDstTyAttr(::mlir::TypeAttr attr) {
getProperties().dstTy = attr;
}
void setDstTy(::mlir::Type attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertBF16x2ToF6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertBF16x2ToF6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertBF16x2ToF6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertBF16x2ToF6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static ConvertBF16x2ToF6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static ConvertBF16x2ToF6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static ConvertBF16x2ToF6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static ConvertBF16x2ToF6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertBF16x2ToF6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertBF16x2ToF6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertBF16x2ToF6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertBF16x2ToF6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static llvm::Intrinsic::ID getIntrinsicID(mlir::Type dstTy, bool hasRelu);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ConvertBF16x2ToF6x2Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ConvertBF16x2ToF6x2OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ConvertBF16x2ToF8x2Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ConvertBF16x2ToF8x2OpGenericAdaptorBase {
public:
struct Properties {
using dstTyTy = ::mlir::TypeAttr;
dstTyTy dstTy;
auto getDstTy() const {
auto &propStorage = this->dstTy;
return ::llvm::cast<::mlir::TypeAttr>(propStorage);
}
void setDstTy(const ::mlir::TypeAttr &propValue) {
this->dstTy = propValue;
}
using reluTy = ::mlir::BoolAttr;
reluTy relu;
auto getRelu() const {
auto &propStorage = this->relu;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelu(const ::mlir::BoolAttr &propValue) {
this->relu = propValue;
}
using rndTy = ::mlir::NVVM::FPRoundingModeAttr;
rndTy rnd;
auto getRnd() const {
auto &propStorage = this->rnd;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::FPRoundingModeAttr>(propStorage);
}
void setRnd(const ::mlir::NVVM::FPRoundingModeAttr &propValue) {
this->rnd = propValue;
}
using satTy = ::mlir::NVVM::SaturationModeAttr;
satTy sat;
auto getSat() const {
auto &propStorage = this->sat;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SaturationModeAttr>(propStorage);
}
void setSat(const ::mlir::NVVM::SaturationModeAttr &propValue) {
this->sat = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.dstTy == this->dstTy &&
rhs.relu == this->relu &&
rhs.rnd == this->rnd &&
rhs.sat == this->sat &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ConvertBF16x2ToF8x2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.convert.bf16x2.to.f8x2", odsAttrs.getContext());
}
ConvertBF16x2ToF8x2OpGenericAdaptorBase(ConvertBF16x2ToF8x2Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::FPRoundingModeAttr getRndAttr();
::mlir::NVVM::FPRoundingMode getRnd();
::mlir::NVVM::SaturationModeAttr getSatAttr();
::mlir::NVVM::SaturationMode getSat();
::mlir::BoolAttr getReluAttr();
bool getRelu();
::mlir::TypeAttr getDstTyAttr() {
auto attr = ::llvm::cast<::mlir::TypeAttr>(getProperties().dstTy);
return attr;
}
::mlir::Type getDstTy();
};
} // namespace detail
template <typename RangeT>
class ConvertBF16x2ToF8x2OpGenericAdaptor : public detail::ConvertBF16x2ToF8x2OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ConvertBF16x2ToF8x2OpGenericAdaptorBase;
static constexpr int odsIndex_src = 0;
public:
ConvertBF16x2ToF8x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ConvertBF16x2ToF8x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConvertBF16x2ToF8x2OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ConvertBF16x2ToF8x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConvertBF16x2ToF8x2OpGenericAdaptor(values, attrs, Properties{}, {}) {}
ConvertBF16x2ToF8x2OpGenericAdaptor(RangeT values, const ConvertBF16x2ToF8x2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ConvertBF16x2ToF8x2Op, typename = std::enable_if_t<std::is_same_v<LateInst, ConvertBF16x2ToF8x2Op>>>
ConvertBF16x2ToF8x2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrc() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ConvertBF16x2ToF8x2OpAdaptor : public ConvertBF16x2ToF8x2OpGenericAdaptor<::mlir::ValueRange> {
public:
using ConvertBF16x2ToF8x2OpGenericAdaptor::ConvertBF16x2ToF8x2OpGenericAdaptor;
ConvertBF16x2ToF8x2OpAdaptor(ConvertBF16x2ToF8x2Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ConvertBF16x2ToF8x2Op : public ::mlir::Op<ConvertBF16x2ToF8x2Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ConvertBF16x2ToF8x2OpAdaptor;
template <typename RangeT>
using GenericAdaptor = ConvertBF16x2ToF8x2OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("dstTy"), ::llvm::StringRef("relu"), ::llvm::StringRef("rnd"), ::llvm::StringRef("sat")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getDstTyAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getDstTyAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getReluAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getReluAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getRndAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getRndAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
::mlir::StringAttr getSatAttrName() {
return getAttributeNameForIndex(3);
}
static ::mlir::StringAttr getSatAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 3);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.convert.bf16x2.to.f8x2");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getDst() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::FPRoundingModeAttr getRndAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::FPRoundingModeAttr>(getProperties().rnd);
}
::mlir::NVVM::FPRoundingMode getRnd();
::mlir::NVVM::SaturationModeAttr getSatAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SaturationModeAttr>(getProperties().sat);
}
::mlir::NVVM::SaturationMode getSat();
::mlir::BoolAttr getReluAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relu);
}
bool getRelu();
::mlir::TypeAttr getDstTyAttr() {
return ::llvm::cast<::mlir::TypeAttr>(getProperties().dstTy);
}
::mlir::Type getDstTy();
void setRndAttr(::mlir::NVVM::FPRoundingModeAttr attr) {
getProperties().rnd = attr;
}
void setRnd(::mlir::NVVM::FPRoundingMode attrValue);
void setSatAttr(::mlir::NVVM::SaturationModeAttr attr) {
getProperties().sat = attr;
}
void setSat(::mlir::NVVM::SaturationMode attrValue);
void setReluAttr(::mlir::BoolAttr attr) {
getProperties().relu = attr;
}
void setRelu(bool attrValue);
void setDstTyAttr(::mlir::TypeAttr attr) {
getProperties().dstTy = attr;
}
void setDstTy(::mlir::Type attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertBF16x2ToF8x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertBF16x2ToF8x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertBF16x2ToF8x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertBF16x2ToF8x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, ::mlir::NVVM::FPRoundingMode rnd, ::mlir::NVVM::SaturationMode sat, bool relu, ::mlir::Type dstTy);
static ConvertBF16x2ToF8x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, ::mlir::NVVM::FPRoundingMode rnd, ::mlir::NVVM::SaturationMode sat, bool relu, ::mlir::Type dstTy);
static ConvertBF16x2ToF8x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, ::mlir::NVVM::FPRoundingMode rnd, ::mlir::NVVM::SaturationMode sat, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::NVVM::FPRoundingMode rnd, ::mlir::NVVM::SaturationMode sat, bool relu, ::mlir::Type dstTy);
static ConvertBF16x2ToF8x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::NVVM::FPRoundingMode rnd, ::mlir::NVVM::SaturationMode sat, bool relu, ::mlir::Type dstTy);
static ConvertBF16x2ToF8x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::NVVM::FPRoundingMode rnd, ::mlir::NVVM::SaturationMode sat, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertBF16x2ToF8x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertBF16x2ToF8x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertBF16x2ToF8x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertBF16x2ToF8x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 4 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static llvm::Intrinsic::ID getIntrinsicID(mlir::Type dstTy,
NVVM::FPRoundingMode rnd,
NVVM::SaturationMode sat, bool hasRelu);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ConvertBF16x2ToF8x2Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ConvertBF16x2ToF8x2OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ConvertBF16x2ToS2F6x2Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ConvertBF16x2ToS2F6x2OpGenericAdaptorBase {
public:
struct Properties {
using reluTy = ::mlir::BoolAttr;
reluTy relu;
auto getRelu() const {
auto &propStorage = this->relu;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelu(const ::mlir::BoolAttr &propValue) {
this->relu = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.relu == this->relu &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ConvertBF16x2ToS2F6x2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.convert.bf16x2.to.s2f6x2", odsAttrs.getContext());
}
ConvertBF16x2ToS2F6x2OpGenericAdaptorBase(ConvertBF16x2ToS2F6x2Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::BoolAttr getReluAttr();
bool getRelu();
};
} // namespace detail
template <typename RangeT>
class ConvertBF16x2ToS2F6x2OpGenericAdaptor : public detail::ConvertBF16x2ToS2F6x2OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ConvertBF16x2ToS2F6x2OpGenericAdaptorBase;
static constexpr int odsIndex_src = 0;
static constexpr int odsIndex_scaleFactor = 1;
public:
ConvertBF16x2ToS2F6x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ConvertBF16x2ToS2F6x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConvertBF16x2ToS2F6x2OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ConvertBF16x2ToS2F6x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConvertBF16x2ToS2F6x2OpGenericAdaptor(values, attrs, Properties{}, {}) {}
ConvertBF16x2ToS2F6x2OpGenericAdaptor(RangeT values, const ConvertBF16x2ToS2F6x2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ConvertBF16x2ToS2F6x2Op, typename = std::enable_if_t<std::is_same_v<LateInst, ConvertBF16x2ToS2F6x2Op>>>
ConvertBF16x2ToS2F6x2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrc() {
return (*getODSOperands(0).begin());
}
ValueT getScaleFactor() {
auto operands = getODSOperands(1);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ConvertBF16x2ToS2F6x2OpAdaptor : public ConvertBF16x2ToS2F6x2OpGenericAdaptor<::mlir::ValueRange> {
public:
using ConvertBF16x2ToS2F6x2OpGenericAdaptor::ConvertBF16x2ToS2F6x2OpGenericAdaptor;
ConvertBF16x2ToS2F6x2OpAdaptor(ConvertBF16x2ToS2F6x2Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ConvertBF16x2ToS2F6x2Op : public ::mlir::Op<ConvertBF16x2ToS2F6x2Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ConvertBF16x2ToS2F6x2OpAdaptor;
template <typename RangeT>
using GenericAdaptor = ConvertBF16x2ToS2F6x2OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src = 0;
static constexpr int odsIndex_scaleFactor = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("relu")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getReluAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getReluAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.convert.bf16x2.to.s2f6x2");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getScaleFactor() {
auto operands = getODSOperands(1);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getScaleFactorMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getDst() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::BoolAttr getReluAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relu);
}
bool getRelu();
void setReluAttr(::mlir::BoolAttr attr) {
getProperties().relu = attr;
}
void setRelu(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::BoolAttr relu);
static ConvertBF16x2ToS2F6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::BoolAttr relu);
static ConvertBF16x2ToS2F6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::BoolAttr relu);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::BoolAttr relu);
static ConvertBF16x2ToS2F6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::BoolAttr relu);
static ConvertBF16x2ToS2F6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::BoolAttr relu);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, bool relu = false);
static ConvertBF16x2ToS2F6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, bool relu = false);
static ConvertBF16x2ToS2F6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, bool relu = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, bool relu = false);
static ConvertBF16x2ToS2F6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, bool relu = false);
static ConvertBF16x2ToS2F6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, bool relu = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertBF16x2ToS2F6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertBF16x2ToS2F6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertBF16x2ToS2F6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertBF16x2ToS2F6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static IDArgPair getIntrinsicIDAndArgs(Operation &op,
LLVM::ModuleTranslation &mt, llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ConvertBF16x2ToS2F6x2Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ConvertBF16x2ToS2F6x2OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ConvertF16x2ToF4x2Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ConvertF16x2ToF4x2OpGenericAdaptorBase {
public:
struct Properties {
using dstTyTy = ::mlir::TypeAttr;
dstTyTy dstTy;
auto getDstTy() const {
auto &propStorage = this->dstTy;
return ::llvm::cast<::mlir::TypeAttr>(propStorage);
}
void setDstTy(const ::mlir::TypeAttr &propValue) {
this->dstTy = propValue;
}
using reluTy = ::mlir::BoolAttr;
reluTy relu;
auto getRelu() const {
auto &propStorage = this->relu;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelu(const ::mlir::BoolAttr &propValue) {
this->relu = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.dstTy == this->dstTy &&
rhs.relu == this->relu &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ConvertF16x2ToF4x2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.convert.f16x2.to.f4x2", odsAttrs.getContext());
}
ConvertF16x2ToF4x2OpGenericAdaptorBase(ConvertF16x2ToF4x2Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::BoolAttr getReluAttr();
bool getRelu();
::mlir::TypeAttr getDstTyAttr() {
auto attr = ::llvm::cast<::mlir::TypeAttr>(getProperties().dstTy);
return attr;
}
::mlir::Type getDstTy();
};
} // namespace detail
template <typename RangeT>
class ConvertF16x2ToF4x2OpGenericAdaptor : public detail::ConvertF16x2ToF4x2OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ConvertF16x2ToF4x2OpGenericAdaptorBase;
static constexpr int odsIndex_src = 0;
public:
ConvertF16x2ToF4x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ConvertF16x2ToF4x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConvertF16x2ToF4x2OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ConvertF16x2ToF4x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConvertF16x2ToF4x2OpGenericAdaptor(values, attrs, Properties{}, {}) {}
ConvertF16x2ToF4x2OpGenericAdaptor(RangeT values, const ConvertF16x2ToF4x2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ConvertF16x2ToF4x2Op, typename = std::enable_if_t<std::is_same_v<LateInst, ConvertF16x2ToF4x2Op>>>
ConvertF16x2ToF4x2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrc() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ConvertF16x2ToF4x2OpAdaptor : public ConvertF16x2ToF4x2OpGenericAdaptor<::mlir::ValueRange> {
public:
using ConvertF16x2ToF4x2OpGenericAdaptor::ConvertF16x2ToF4x2OpGenericAdaptor;
ConvertF16x2ToF4x2OpAdaptor(ConvertF16x2ToF4x2Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ConvertF16x2ToF4x2Op : public ::mlir::Op<ConvertF16x2ToF4x2Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ConvertF16x2ToF4x2OpAdaptor;
template <typename RangeT>
using GenericAdaptor = ConvertF16x2ToF4x2OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("dstTy"), ::llvm::StringRef("relu")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getDstTyAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getDstTyAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getReluAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getReluAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.convert.f16x2.to.f4x2");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getDst() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::BoolAttr getReluAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relu);
}
bool getRelu();
::mlir::TypeAttr getDstTyAttr() {
return ::llvm::cast<::mlir::TypeAttr>(getProperties().dstTy);
}
::mlir::Type getDstTy();
void setReluAttr(::mlir::BoolAttr attr) {
getProperties().relu = attr;
}
void setRelu(bool attrValue);
void setDstTyAttr(::mlir::TypeAttr attr) {
getProperties().dstTy = attr;
}
void setDstTy(::mlir::Type attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF16x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF16x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF16x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF16x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF16x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF16x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static ConvertF16x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static ConvertF16x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static ConvertF16x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static ConvertF16x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static ConvertF16x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static ConvertF16x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF16x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF16x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF16x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF16x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF16x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF16x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF16x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF16x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(NVVM::ConvertF16x2ToF4x2Op &op,
LLVM::ModuleTranslation &mt, llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ConvertF16x2ToF4x2Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ConvertF16x2ToF4x2OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ConvertF16x2ToF6x2Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ConvertF16x2ToF6x2OpGenericAdaptorBase {
public:
struct Properties {
using dstTyTy = ::mlir::TypeAttr;
dstTyTy dstTy;
auto getDstTy() const {
auto &propStorage = this->dstTy;
return ::llvm::cast<::mlir::TypeAttr>(propStorage);
}
void setDstTy(const ::mlir::TypeAttr &propValue) {
this->dstTy = propValue;
}
using reluTy = ::mlir::BoolAttr;
reluTy relu;
auto getRelu() const {
auto &propStorage = this->relu;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelu(const ::mlir::BoolAttr &propValue) {
this->relu = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.dstTy == this->dstTy &&
rhs.relu == this->relu &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ConvertF16x2ToF6x2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.convert.f16x2.to.f6x2", odsAttrs.getContext());
}
ConvertF16x2ToF6x2OpGenericAdaptorBase(ConvertF16x2ToF6x2Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::BoolAttr getReluAttr();
bool getRelu();
::mlir::TypeAttr getDstTyAttr() {
auto attr = ::llvm::cast<::mlir::TypeAttr>(getProperties().dstTy);
return attr;
}
::mlir::Type getDstTy();
};
} // namespace detail
template <typename RangeT>
class ConvertF16x2ToF6x2OpGenericAdaptor : public detail::ConvertF16x2ToF6x2OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ConvertF16x2ToF6x2OpGenericAdaptorBase;
static constexpr int odsIndex_src = 0;
public:
ConvertF16x2ToF6x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ConvertF16x2ToF6x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConvertF16x2ToF6x2OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ConvertF16x2ToF6x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConvertF16x2ToF6x2OpGenericAdaptor(values, attrs, Properties{}, {}) {}
ConvertF16x2ToF6x2OpGenericAdaptor(RangeT values, const ConvertF16x2ToF6x2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ConvertF16x2ToF6x2Op, typename = std::enable_if_t<std::is_same_v<LateInst, ConvertF16x2ToF6x2Op>>>
ConvertF16x2ToF6x2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrc() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ConvertF16x2ToF6x2OpAdaptor : public ConvertF16x2ToF6x2OpGenericAdaptor<::mlir::ValueRange> {
public:
using ConvertF16x2ToF6x2OpGenericAdaptor::ConvertF16x2ToF6x2OpGenericAdaptor;
ConvertF16x2ToF6x2OpAdaptor(ConvertF16x2ToF6x2Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ConvertF16x2ToF6x2Op : public ::mlir::Op<ConvertF16x2ToF6x2Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ConvertF16x2ToF6x2OpAdaptor;
template <typename RangeT>
using GenericAdaptor = ConvertF16x2ToF6x2OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("dstTy"), ::llvm::StringRef("relu")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getDstTyAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getDstTyAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getReluAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getReluAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.convert.f16x2.to.f6x2");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getDst() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::BoolAttr getReluAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relu);
}
bool getRelu();
::mlir::TypeAttr getDstTyAttr() {
return ::llvm::cast<::mlir::TypeAttr>(getProperties().dstTy);
}
::mlir::Type getDstTy();
void setReluAttr(::mlir::BoolAttr attr) {
getProperties().relu = attr;
}
void setRelu(bool attrValue);
void setDstTyAttr(::mlir::TypeAttr attr) {
getProperties().dstTy = attr;
}
void setDstTy(::mlir::Type attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF16x2ToF6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF16x2ToF6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF16x2ToF6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF16x2ToF6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static ConvertF16x2ToF6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static ConvertF16x2ToF6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static ConvertF16x2ToF6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static ConvertF16x2ToF6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF16x2ToF6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF16x2ToF6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF16x2ToF6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF16x2ToF6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static llvm::Intrinsic::ID getIntrinsicID(mlir::Type dstTy, bool hasRelu);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ConvertF16x2ToF6x2Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ConvertF16x2ToF6x2OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ConvertF16x2ToF8x2Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ConvertF16x2ToF8x2OpGenericAdaptorBase {
public:
struct Properties {
using dstTyTy = ::mlir::TypeAttr;
dstTyTy dstTy;
auto getDstTy() const {
auto &propStorage = this->dstTy;
return ::llvm::cast<::mlir::TypeAttr>(propStorage);
}
void setDstTy(const ::mlir::TypeAttr &propValue) {
this->dstTy = propValue;
}
using reluTy = ::mlir::BoolAttr;
reluTy relu;
auto getRelu() const {
auto &propStorage = this->relu;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelu(const ::mlir::BoolAttr &propValue) {
this->relu = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.dstTy == this->dstTy &&
rhs.relu == this->relu &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ConvertF16x2ToF8x2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.convert.f16x2.to.f8x2", odsAttrs.getContext());
}
ConvertF16x2ToF8x2OpGenericAdaptorBase(ConvertF16x2ToF8x2Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::BoolAttr getReluAttr();
bool getRelu();
::mlir::TypeAttr getDstTyAttr() {
auto attr = ::llvm::cast<::mlir::TypeAttr>(getProperties().dstTy);
return attr;
}
::mlir::Type getDstTy();
};
} // namespace detail
template <typename RangeT>
class ConvertF16x2ToF8x2OpGenericAdaptor : public detail::ConvertF16x2ToF8x2OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ConvertF16x2ToF8x2OpGenericAdaptorBase;
static constexpr int odsIndex_a = 0;
public:
ConvertF16x2ToF8x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ConvertF16x2ToF8x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConvertF16x2ToF8x2OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ConvertF16x2ToF8x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConvertF16x2ToF8x2OpGenericAdaptor(values, attrs, Properties{}, {}) {}
ConvertF16x2ToF8x2OpGenericAdaptor(RangeT values, const ConvertF16x2ToF8x2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ConvertF16x2ToF8x2Op, typename = std::enable_if_t<std::is_same_v<LateInst, ConvertF16x2ToF8x2Op>>>
ConvertF16x2ToF8x2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getA() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ConvertF16x2ToF8x2OpAdaptor : public ConvertF16x2ToF8x2OpGenericAdaptor<::mlir::ValueRange> {
public:
using ConvertF16x2ToF8x2OpGenericAdaptor::ConvertF16x2ToF8x2OpGenericAdaptor;
ConvertF16x2ToF8x2OpAdaptor(ConvertF16x2ToF8x2Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ConvertF16x2ToF8x2Op : public ::mlir::Op<ConvertF16x2ToF8x2Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ConvertF16x2ToF8x2OpAdaptor;
template <typename RangeT>
using GenericAdaptor = ConvertF16x2ToF8x2OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_a = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("dstTy"), ::llvm::StringRef("relu")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getDstTyAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getDstTyAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getReluAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getReluAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.convert.f16x2.to.f8x2");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getA() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getAMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getDst() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::BoolAttr getReluAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relu);
}
bool getRelu();
::mlir::TypeAttr getDstTyAttr() {
return ::llvm::cast<::mlir::TypeAttr>(getProperties().dstTy);
}
::mlir::Type getDstTy();
void setReluAttr(::mlir::BoolAttr attr) {
getProperties().relu = attr;
}
void setRelu(bool attrValue);
void setDstTyAttr(::mlir::TypeAttr attr) {
getProperties().dstTy = attr;
}
void setDstTy(::mlir::Type attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value a, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF16x2ToF8x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value a, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF16x2ToF8x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value a, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF16x2ToF8x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF16x2ToF8x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value a, bool relu, ::mlir::Type dstTy);
static ConvertF16x2ToF8x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value a, bool relu, ::mlir::Type dstTy);
static ConvertF16x2ToF8x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value a, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, bool relu, ::mlir::Type dstTy);
static ConvertF16x2ToF8x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, bool relu, ::mlir::Type dstTy);
static ConvertF16x2ToF8x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF16x2ToF8x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF16x2ToF8x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF16x2ToF8x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF16x2ToF8x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static llvm::Intrinsic::ID getIntrinsicID(mlir::Type dstTy,
bool hasRelu);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ConvertF16x2ToF8x2Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ConvertF16x2ToF8x2OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ConvertF32x2ToBF16x2Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ConvertF32x2ToBF16x2OpGenericAdaptorBase {
public:
struct Properties {
using reluTy = ::mlir::BoolAttr;
reluTy relu;
auto getRelu() const {
auto &propStorage = this->relu;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelu(const ::mlir::BoolAttr &propValue) {
this->relu = propValue;
}
using rndTy = ::mlir::NVVM::FPRoundingModeAttr;
rndTy rnd;
auto getRnd() const {
auto &propStorage = this->rnd;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::FPRoundingModeAttr>(propStorage);
}
void setRnd(const ::mlir::NVVM::FPRoundingModeAttr &propValue) {
this->rnd = propValue;
}
using satTy = ::mlir::NVVM::SaturationModeAttr;
satTy sat;
auto getSat() const {
auto &propStorage = this->sat;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SaturationModeAttr>(propStorage);
}
void setSat(const ::mlir::NVVM::SaturationModeAttr &propValue) {
this->sat = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.relu == this->relu &&
rhs.rnd == this->rnd &&
rhs.sat == this->sat &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ConvertF32x2ToBF16x2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.convert.f32x2.to.bf16x2", odsAttrs.getContext());
}
ConvertF32x2ToBF16x2OpGenericAdaptorBase(ConvertF32x2ToBF16x2Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::FPRoundingModeAttr getRndAttr();
::mlir::NVVM::FPRoundingMode getRnd();
::mlir::NVVM::SaturationModeAttr getSatAttr();
::mlir::NVVM::SaturationMode getSat();
::mlir::BoolAttr getReluAttr();
bool getRelu();
};
} // namespace detail
template <typename RangeT>
class ConvertF32x2ToBF16x2OpGenericAdaptor : public detail::ConvertF32x2ToBF16x2OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ConvertF32x2ToBF16x2OpGenericAdaptorBase;
static constexpr int odsIndex_src_hi = 0;
static constexpr int odsIndex_src_lo = 1;
static constexpr int odsIndex_random_bits = 2;
public:
ConvertF32x2ToBF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ConvertF32x2ToBF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConvertF32x2ToBF16x2OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ConvertF32x2ToBF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConvertF32x2ToBF16x2OpGenericAdaptor(values, attrs, Properties{}, {}) {}
ConvertF32x2ToBF16x2OpGenericAdaptor(RangeT values, const ConvertF32x2ToBF16x2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ConvertF32x2ToBF16x2Op, typename = std::enable_if_t<std::is_same_v<LateInst, ConvertF32x2ToBF16x2Op>>>
ConvertF32x2ToBF16x2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrcHi() {
return (*getODSOperands(0).begin());
}
ValueT getSrcLo() {
return (*getODSOperands(1).begin());
}
ValueT getRandomBits() {
auto operands = getODSOperands(2);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ConvertF32x2ToBF16x2OpAdaptor : public ConvertF32x2ToBF16x2OpGenericAdaptor<::mlir::ValueRange> {
public:
using ConvertF32x2ToBF16x2OpGenericAdaptor::ConvertF32x2ToBF16x2OpGenericAdaptor;
ConvertF32x2ToBF16x2OpAdaptor(ConvertF32x2ToBF16x2Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ConvertF32x2ToBF16x2Op : public ::mlir::Op<ConvertF32x2ToBF16x2Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ConvertF32x2ToBF16x2OpAdaptor;
template <typename RangeT>
using GenericAdaptor = ConvertF32x2ToBF16x2OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src_hi = 0;
static constexpr int odsIndex_src_lo = 1;
static constexpr int odsIndex_random_bits = 2;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("relu"), ::llvm::StringRef("rnd"), ::llvm::StringRef("sat")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getReluAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getReluAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getRndAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getRndAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getSatAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getSatAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.convert.f32x2.to.bf16x2");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::FloatType> getSrcHi() {
return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::FloatType> getSrcLo() {
return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getRandomBits() {
auto operands = getODSOperands(2);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getSrcHiMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSrcLoMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getRandomBitsMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getDst() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::FPRoundingModeAttr getRndAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::FPRoundingModeAttr>(getProperties().rnd);
}
::mlir::NVVM::FPRoundingMode getRnd();
::mlir::NVVM::SaturationModeAttr getSatAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SaturationModeAttr>(getProperties().sat);
}
::mlir::NVVM::SaturationMode getSat();
::mlir::BoolAttr getReluAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relu);
}
bool getRelu();
void setRndAttr(::mlir::NVVM::FPRoundingModeAttr attr) {
getProperties().rnd = attr;
}
void setRnd(::mlir::NVVM::FPRoundingMode attrValue);
void setSatAttr(::mlir::NVVM::SaturationModeAttr attr) {
getProperties().sat = attr;
}
void setSat(::mlir::NVVM::SaturationMode attrValue);
void setReluAttr(::mlir::BoolAttr attr) {
getProperties().relu = attr;
}
void setRelu(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src_hi, ::mlir::Value src_lo, /*optional*/::mlir::Value random_bits, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertF32x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src_hi, ::mlir::Value src_lo, /*optional*/::mlir::Value random_bits, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertF32x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src_hi, ::mlir::Value src_lo, /*optional*/::mlir::Value random_bits, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src_hi, ::mlir::Value src_lo, /*optional*/::mlir::Value random_bits, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertF32x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src_hi, ::mlir::Value src_lo, /*optional*/::mlir::Value random_bits, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertF32x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src_hi, ::mlir::Value src_lo, /*optional*/::mlir::Value random_bits, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src_hi, ::mlir::Value src_lo, /*optional*/::mlir::Value random_bits, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertF32x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src_hi, ::mlir::Value src_lo, /*optional*/::mlir::Value random_bits, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertF32x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src_hi, ::mlir::Value src_lo, /*optional*/::mlir::Value random_bits, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src_hi, ::mlir::Value src_lo, /*optional*/::mlir::Value random_bits, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertF32x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src_hi, ::mlir::Value src_lo, /*optional*/::mlir::Value random_bits, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertF32x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src_hi, ::mlir::Value src_lo, /*optional*/::mlir::Value random_bits, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF32x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF32x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF32x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF32x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 3 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(
NVVM::ConvertF32x2ToBF16x2Op &op,
LLVM::ModuleTranslation &mt, llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ConvertF32x2ToBF16x2Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ConvertF32x2ToBF16x2OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ConvertF32x2ToF16x2Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ConvertF32x2ToF16x2OpGenericAdaptorBase {
public:
struct Properties {
using reluTy = ::mlir::BoolAttr;
reluTy relu;
auto getRelu() const {
auto &propStorage = this->relu;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelu(const ::mlir::BoolAttr &propValue) {
this->relu = propValue;
}
using rndTy = ::mlir::NVVM::FPRoundingModeAttr;
rndTy rnd;
auto getRnd() const {
auto &propStorage = this->rnd;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::FPRoundingModeAttr>(propStorage);
}
void setRnd(const ::mlir::NVVM::FPRoundingModeAttr &propValue) {
this->rnd = propValue;
}
using satTy = ::mlir::NVVM::SaturationModeAttr;
satTy sat;
auto getSat() const {
auto &propStorage = this->sat;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SaturationModeAttr>(propStorage);
}
void setSat(const ::mlir::NVVM::SaturationModeAttr &propValue) {
this->sat = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.relu == this->relu &&
rhs.rnd == this->rnd &&
rhs.sat == this->sat &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ConvertF32x2ToF16x2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.convert.f32x2.to.f16x2", odsAttrs.getContext());
}
ConvertF32x2ToF16x2OpGenericAdaptorBase(ConvertF32x2ToF16x2Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::FPRoundingModeAttr getRndAttr();
::mlir::NVVM::FPRoundingMode getRnd();
::mlir::NVVM::SaturationModeAttr getSatAttr();
::mlir::NVVM::SaturationMode getSat();
::mlir::BoolAttr getReluAttr();
bool getRelu();
};
} // namespace detail
template <typename RangeT>
class ConvertF32x2ToF16x2OpGenericAdaptor : public detail::ConvertF32x2ToF16x2OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ConvertF32x2ToF16x2OpGenericAdaptorBase;
static constexpr int odsIndex_src_hi = 0;
static constexpr int odsIndex_src_lo = 1;
static constexpr int odsIndex_random_bits = 2;
public:
ConvertF32x2ToF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ConvertF32x2ToF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConvertF32x2ToF16x2OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ConvertF32x2ToF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConvertF32x2ToF16x2OpGenericAdaptor(values, attrs, Properties{}, {}) {}
ConvertF32x2ToF16x2OpGenericAdaptor(RangeT values, const ConvertF32x2ToF16x2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ConvertF32x2ToF16x2Op, typename = std::enable_if_t<std::is_same_v<LateInst, ConvertF32x2ToF16x2Op>>>
ConvertF32x2ToF16x2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrcHi() {
return (*getODSOperands(0).begin());
}
ValueT getSrcLo() {
return (*getODSOperands(1).begin());
}
ValueT getRandomBits() {
auto operands = getODSOperands(2);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ConvertF32x2ToF16x2OpAdaptor : public ConvertF32x2ToF16x2OpGenericAdaptor<::mlir::ValueRange> {
public:
using ConvertF32x2ToF16x2OpGenericAdaptor::ConvertF32x2ToF16x2OpGenericAdaptor;
ConvertF32x2ToF16x2OpAdaptor(ConvertF32x2ToF16x2Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ConvertF32x2ToF16x2Op : public ::mlir::Op<ConvertF32x2ToF16x2Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ConvertF32x2ToF16x2OpAdaptor;
template <typename RangeT>
using GenericAdaptor = ConvertF32x2ToF16x2OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src_hi = 0;
static constexpr int odsIndex_src_lo = 1;
static constexpr int odsIndex_random_bits = 2;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("relu"), ::llvm::StringRef("rnd"), ::llvm::StringRef("sat")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getReluAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getReluAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getRndAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getRndAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getSatAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getSatAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.convert.f32x2.to.f16x2");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::FloatType> getSrcHi() {
return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::FloatType> getSrcLo() {
return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getRandomBits() {
auto operands = getODSOperands(2);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getSrcHiMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSrcLoMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getRandomBitsMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getDst() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::FPRoundingModeAttr getRndAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::FPRoundingModeAttr>(getProperties().rnd);
}
::mlir::NVVM::FPRoundingMode getRnd();
::mlir::NVVM::SaturationModeAttr getSatAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SaturationModeAttr>(getProperties().sat);
}
::mlir::NVVM::SaturationMode getSat();
::mlir::BoolAttr getReluAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relu);
}
bool getRelu();
void setRndAttr(::mlir::NVVM::FPRoundingModeAttr attr) {
getProperties().rnd = attr;
}
void setRnd(::mlir::NVVM::FPRoundingMode attrValue);
void setSatAttr(::mlir::NVVM::SaturationModeAttr attr) {
getProperties().sat = attr;
}
void setSat(::mlir::NVVM::SaturationMode attrValue);
void setReluAttr(::mlir::BoolAttr attr) {
getProperties().relu = attr;
}
void setRelu(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src_hi, ::mlir::Value src_lo, /*optional*/::mlir::Value random_bits, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertF32x2ToF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src_hi, ::mlir::Value src_lo, /*optional*/::mlir::Value random_bits, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertF32x2ToF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src_hi, ::mlir::Value src_lo, /*optional*/::mlir::Value random_bits, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src_hi, ::mlir::Value src_lo, /*optional*/::mlir::Value random_bits, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertF32x2ToF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src_hi, ::mlir::Value src_lo, /*optional*/::mlir::Value random_bits, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertF32x2ToF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src_hi, ::mlir::Value src_lo, /*optional*/::mlir::Value random_bits, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src_hi, ::mlir::Value src_lo, /*optional*/::mlir::Value random_bits, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertF32x2ToF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src_hi, ::mlir::Value src_lo, /*optional*/::mlir::Value random_bits, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertF32x2ToF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src_hi, ::mlir::Value src_lo, /*optional*/::mlir::Value random_bits, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src_hi, ::mlir::Value src_lo, /*optional*/::mlir::Value random_bits, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertF32x2ToF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src_hi, ::mlir::Value src_lo, /*optional*/::mlir::Value random_bits, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertF32x2ToF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src_hi, ::mlir::Value src_lo, /*optional*/::mlir::Value random_bits, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF32x2ToF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF32x2ToF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF32x2ToF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF32x2ToF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 3 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(
NVVM::ConvertF32x2ToF16x2Op &op,
LLVM::ModuleTranslation &mt, llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ConvertF32x2ToF16x2Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ConvertF32x2ToF16x2OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ConvertF32x2ToF4x2Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ConvertF32x2ToF4x2OpGenericAdaptorBase {
public:
struct Properties {
using dstTyTy = ::mlir::TypeAttr;
dstTyTy dstTy;
auto getDstTy() const {
auto &propStorage = this->dstTy;
return ::llvm::cast<::mlir::TypeAttr>(propStorage);
}
void setDstTy(const ::mlir::TypeAttr &propValue) {
this->dstTy = propValue;
}
using reluTy = ::mlir::BoolAttr;
reluTy relu;
auto getRelu() const {
auto &propStorage = this->relu;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelu(const ::mlir::BoolAttr &propValue) {
this->relu = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.dstTy == this->dstTy &&
rhs.relu == this->relu &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ConvertF32x2ToF4x2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.convert.f32x2.to.f4x2", odsAttrs.getContext());
}
ConvertF32x2ToF4x2OpGenericAdaptorBase(ConvertF32x2ToF4x2Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::BoolAttr getReluAttr();
bool getRelu();
::mlir::TypeAttr getDstTyAttr() {
auto attr = ::llvm::cast<::mlir::TypeAttr>(getProperties().dstTy);
return attr;
}
::mlir::Type getDstTy();
};
} // namespace detail
template <typename RangeT>
class ConvertF32x2ToF4x2OpGenericAdaptor : public detail::ConvertF32x2ToF4x2OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ConvertF32x2ToF4x2OpGenericAdaptorBase;
static constexpr int odsIndex_a = 0;
static constexpr int odsIndex_b = 1;
public:
ConvertF32x2ToF4x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ConvertF32x2ToF4x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConvertF32x2ToF4x2OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ConvertF32x2ToF4x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConvertF32x2ToF4x2OpGenericAdaptor(values, attrs, Properties{}, {}) {}
ConvertF32x2ToF4x2OpGenericAdaptor(RangeT values, const ConvertF32x2ToF4x2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ConvertF32x2ToF4x2Op, typename = std::enable_if_t<std::is_same_v<LateInst, ConvertF32x2ToF4x2Op>>>
ConvertF32x2ToF4x2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getA() {
return (*getODSOperands(0).begin());
}
ValueT getB() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ConvertF32x2ToF4x2OpAdaptor : public ConvertF32x2ToF4x2OpGenericAdaptor<::mlir::ValueRange> {
public:
using ConvertF32x2ToF4x2OpGenericAdaptor::ConvertF32x2ToF4x2OpGenericAdaptor;
ConvertF32x2ToF4x2OpAdaptor(ConvertF32x2ToF4x2Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ConvertF32x2ToF4x2Op : public ::mlir::Op<ConvertF32x2ToF4x2Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ConvertF32x2ToF4x2OpAdaptor;
template <typename RangeT>
using GenericAdaptor = ConvertF32x2ToF4x2OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_a = 0;
static constexpr int odsIndex_b = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("dstTy"), ::llvm::StringRef("relu")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getDstTyAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getDstTyAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getReluAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getReluAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.convert.f32x2.to.f4x2");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::FloatType> getA() {
return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::FloatType> getB() {
return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getAMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getBMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getDst() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::BoolAttr getReluAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relu);
}
bool getRelu();
::mlir::TypeAttr getDstTyAttr() {
return ::llvm::cast<::mlir::TypeAttr>(getProperties().dstTy);
}
::mlir::Type getDstTy();
void setReluAttr(::mlir::BoolAttr attr) {
getProperties().relu = attr;
}
void setRelu(bool attrValue);
void setDstTyAttr(::mlir::TypeAttr attr) {
getProperties().dstTy = attr;
}
void setDstTy(::mlir::Type attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value a, ::mlir::Value b, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value a, ::mlir::Value b, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value a, ::mlir::Value b, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::Value b, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value a, ::mlir::Value b, bool relu, ::mlir::Type dstTy);
static ConvertF32x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value a, ::mlir::Value b, bool relu, ::mlir::Type dstTy);
static ConvertF32x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value a, ::mlir::Value b, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b, bool relu, ::mlir::Type dstTy);
static ConvertF32x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b, bool relu, ::mlir::Type dstTy);
static ConvertF32x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::Value b, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, bool relu, ::mlir::Type dstTy);
static ConvertF32x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, bool relu, ::mlir::Type dstTy);
static ConvertF32x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF32x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF32x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF32x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF32x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF32x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF32x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF32x2ToF4x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF32x2ToF4x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static mlir::NVVM::IDArgPair
getIntrinsicIDAndArgs(NVVM::ConvertF32x2ToF4x2Op op,
LLVM::ModuleTranslation &mt, llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ConvertF32x2ToF4x2Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ConvertF32x2ToF4x2OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ConvertF32x2ToF6x2Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ConvertF32x2ToF6x2OpGenericAdaptorBase {
public:
struct Properties {
using dstTyTy = ::mlir::TypeAttr;
dstTyTy dstTy;
auto getDstTy() const {
auto &propStorage = this->dstTy;
return ::llvm::cast<::mlir::TypeAttr>(propStorage);
}
void setDstTy(const ::mlir::TypeAttr &propValue) {
this->dstTy = propValue;
}
using reluTy = ::mlir::BoolAttr;
reluTy relu;
auto getRelu() const {
auto &propStorage = this->relu;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelu(const ::mlir::BoolAttr &propValue) {
this->relu = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.dstTy == this->dstTy &&
rhs.relu == this->relu &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ConvertF32x2ToF6x2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.convert.f32x2.to.f6x2", odsAttrs.getContext());
}
ConvertF32x2ToF6x2OpGenericAdaptorBase(ConvertF32x2ToF6x2Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::BoolAttr getReluAttr();
bool getRelu();
::mlir::TypeAttr getDstTyAttr() {
auto attr = ::llvm::cast<::mlir::TypeAttr>(getProperties().dstTy);
return attr;
}
::mlir::Type getDstTy();
};
} // namespace detail
template <typename RangeT>
class ConvertF32x2ToF6x2OpGenericAdaptor : public detail::ConvertF32x2ToF6x2OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ConvertF32x2ToF6x2OpGenericAdaptorBase;
static constexpr int odsIndex_a = 0;
static constexpr int odsIndex_b = 1;
public:
ConvertF32x2ToF6x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ConvertF32x2ToF6x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConvertF32x2ToF6x2OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ConvertF32x2ToF6x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConvertF32x2ToF6x2OpGenericAdaptor(values, attrs, Properties{}, {}) {}
ConvertF32x2ToF6x2OpGenericAdaptor(RangeT values, const ConvertF32x2ToF6x2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ConvertF32x2ToF6x2Op, typename = std::enable_if_t<std::is_same_v<LateInst, ConvertF32x2ToF6x2Op>>>
ConvertF32x2ToF6x2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getA() {
return (*getODSOperands(0).begin());
}
ValueT getB() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ConvertF32x2ToF6x2OpAdaptor : public ConvertF32x2ToF6x2OpGenericAdaptor<::mlir::ValueRange> {
public:
using ConvertF32x2ToF6x2OpGenericAdaptor::ConvertF32x2ToF6x2OpGenericAdaptor;
ConvertF32x2ToF6x2OpAdaptor(ConvertF32x2ToF6x2Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ConvertF32x2ToF6x2Op : public ::mlir::Op<ConvertF32x2ToF6x2Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ConvertF32x2ToF6x2OpAdaptor;
template <typename RangeT>
using GenericAdaptor = ConvertF32x2ToF6x2OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_a = 0;
static constexpr int odsIndex_b = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("dstTy"), ::llvm::StringRef("relu")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getDstTyAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getDstTyAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getReluAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getReluAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.convert.f32x2.to.f6x2");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::FloatType> getA() {
return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::FloatType> getB() {
return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getAMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getBMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getDst() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::BoolAttr getReluAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relu);
}
bool getRelu();
::mlir::TypeAttr getDstTyAttr() {
return ::llvm::cast<::mlir::TypeAttr>(getProperties().dstTy);
}
::mlir::Type getDstTy();
void setReluAttr(::mlir::BoolAttr attr) {
getProperties().relu = attr;
}
void setRelu(bool attrValue);
void setDstTyAttr(::mlir::TypeAttr attr) {
getProperties().dstTy = attr;
}
void setDstTy(::mlir::Type attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value a, ::mlir::Value b, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x2ToF6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value a, ::mlir::Value b, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x2ToF6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value a, ::mlir::Value b, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x2ToF6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x2ToF6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value a, ::mlir::Value b, bool relu, ::mlir::Type dstTy);
static ConvertF32x2ToF6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value a, ::mlir::Value b, bool relu, ::mlir::Type dstTy);
static ConvertF32x2ToF6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value a, ::mlir::Value b, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, bool relu, ::mlir::Type dstTy);
static ConvertF32x2ToF6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, bool relu, ::mlir::Type dstTy);
static ConvertF32x2ToF6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF32x2ToF6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF32x2ToF6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF32x2ToF6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF32x2ToF6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static llvm::Intrinsic::ID getIntrinsicID(mlir::Type dstTy,
bool hasRelu);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ConvertF32x2ToF6x2Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ConvertF32x2ToF6x2OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ConvertF32x2ToF8x2Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ConvertF32x2ToF8x2OpGenericAdaptorBase {
public:
struct Properties {
using dstTyTy = ::mlir::TypeAttr;
dstTyTy dstTy;
auto getDstTy() const {
auto &propStorage = this->dstTy;
return ::llvm::cast<::mlir::TypeAttr>(propStorage);
}
void setDstTy(const ::mlir::TypeAttr &propValue) {
this->dstTy = propValue;
}
using reluTy = ::mlir::BoolAttr;
reluTy relu;
auto getRelu() const {
auto &propStorage = this->relu;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelu(const ::mlir::BoolAttr &propValue) {
this->relu = propValue;
}
using rndTy = ::mlir::NVVM::FPRoundingModeAttr;
rndTy rnd;
auto getRnd() const {
auto &propStorage = this->rnd;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::FPRoundingModeAttr>(propStorage);
}
void setRnd(const ::mlir::NVVM::FPRoundingModeAttr &propValue) {
this->rnd = propValue;
}
using satTy = ::mlir::NVVM::SaturationModeAttr;
satTy sat;
auto getSat() const {
auto &propStorage = this->sat;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SaturationModeAttr>(propStorage);
}
void setSat(const ::mlir::NVVM::SaturationModeAttr &propValue) {
this->sat = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.dstTy == this->dstTy &&
rhs.relu == this->relu &&
rhs.rnd == this->rnd &&
rhs.sat == this->sat &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ConvertF32x2ToF8x2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.convert.f32x2.to.f8x2", odsAttrs.getContext());
}
ConvertF32x2ToF8x2OpGenericAdaptorBase(ConvertF32x2ToF8x2Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::FPRoundingModeAttr getRndAttr();
::mlir::NVVM::FPRoundingMode getRnd();
::mlir::NVVM::SaturationModeAttr getSatAttr();
::mlir::NVVM::SaturationMode getSat();
::mlir::BoolAttr getReluAttr();
bool getRelu();
::mlir::TypeAttr getDstTyAttr() {
auto attr = ::llvm::cast<::mlir::TypeAttr>(getProperties().dstTy);
return attr;
}
::mlir::Type getDstTy();
};
} // namespace detail
template <typename RangeT>
class ConvertF32x2ToF8x2OpGenericAdaptor : public detail::ConvertF32x2ToF8x2OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ConvertF32x2ToF8x2OpGenericAdaptorBase;
static constexpr int odsIndex_a = 0;
static constexpr int odsIndex_b = 1;
public:
ConvertF32x2ToF8x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ConvertF32x2ToF8x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConvertF32x2ToF8x2OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ConvertF32x2ToF8x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConvertF32x2ToF8x2OpGenericAdaptor(values, attrs, Properties{}, {}) {}
ConvertF32x2ToF8x2OpGenericAdaptor(RangeT values, const ConvertF32x2ToF8x2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ConvertF32x2ToF8x2Op, typename = std::enable_if_t<std::is_same_v<LateInst, ConvertF32x2ToF8x2Op>>>
ConvertF32x2ToF8x2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getA() {
return (*getODSOperands(0).begin());
}
ValueT getB() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ConvertF32x2ToF8x2OpAdaptor : public ConvertF32x2ToF8x2OpGenericAdaptor<::mlir::ValueRange> {
public:
using ConvertF32x2ToF8x2OpGenericAdaptor::ConvertF32x2ToF8x2OpGenericAdaptor;
ConvertF32x2ToF8x2OpAdaptor(ConvertF32x2ToF8x2Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ConvertF32x2ToF8x2Op : public ::mlir::Op<ConvertF32x2ToF8x2Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ConvertF32x2ToF8x2OpAdaptor;
template <typename RangeT>
using GenericAdaptor = ConvertF32x2ToF8x2OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_a = 0;
static constexpr int odsIndex_b = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("dstTy"), ::llvm::StringRef("relu"), ::llvm::StringRef("rnd"), ::llvm::StringRef("sat")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getDstTyAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getDstTyAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getReluAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getReluAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getRndAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getRndAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
::mlir::StringAttr getSatAttrName() {
return getAttributeNameForIndex(3);
}
static ::mlir::StringAttr getSatAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 3);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.convert.f32x2.to.f8x2");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::FloatType> getA() {
return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::FloatType> getB() {
return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getAMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getBMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getDst() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::FPRoundingModeAttr getRndAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::FPRoundingModeAttr>(getProperties().rnd);
}
::mlir::NVVM::FPRoundingMode getRnd();
::mlir::NVVM::SaturationModeAttr getSatAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SaturationModeAttr>(getProperties().sat);
}
::mlir::NVVM::SaturationMode getSat();
::mlir::BoolAttr getReluAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relu);
}
bool getRelu();
::mlir::TypeAttr getDstTyAttr() {
return ::llvm::cast<::mlir::TypeAttr>(getProperties().dstTy);
}
::mlir::Type getDstTy();
void setRndAttr(::mlir::NVVM::FPRoundingModeAttr attr) {
getProperties().rnd = attr;
}
void setRnd(::mlir::NVVM::FPRoundingMode attrValue);
void setSatAttr(::mlir::NVVM::SaturationModeAttr attr) {
getProperties().sat = attr;
}
void setSat(::mlir::NVVM::SaturationMode attrValue);
void setReluAttr(::mlir::BoolAttr attr) {
getProperties().relu = attr;
}
void setRelu(bool attrValue);
void setDstTyAttr(::mlir::TypeAttr attr) {
getProperties().dstTy = attr;
}
void setDstTy(::mlir::Type attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value a, ::mlir::Value b, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x2ToF8x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value a, ::mlir::Value b, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x2ToF8x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value a, ::mlir::Value b, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x2ToF8x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x2ToF8x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value a, ::mlir::Value b, ::mlir::NVVM::FPRoundingMode rnd, ::mlir::NVVM::SaturationMode sat, bool relu, ::mlir::Type dstTy);
static ConvertF32x2ToF8x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value a, ::mlir::Value b, ::mlir::NVVM::FPRoundingMode rnd, ::mlir::NVVM::SaturationMode sat, bool relu, ::mlir::Type dstTy);
static ConvertF32x2ToF8x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value a, ::mlir::Value b, ::mlir::NVVM::FPRoundingMode rnd, ::mlir::NVVM::SaturationMode sat, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::NVVM::FPRoundingMode rnd, ::mlir::NVVM::SaturationMode sat, bool relu, ::mlir::Type dstTy);
static ConvertF32x2ToF8x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::NVVM::FPRoundingMode rnd, ::mlir::NVVM::SaturationMode sat, bool relu, ::mlir::Type dstTy);
static ConvertF32x2ToF8x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::NVVM::FPRoundingMode rnd, ::mlir::NVVM::SaturationMode sat, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF32x2ToF8x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF32x2ToF8x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF32x2ToF8x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF32x2ToF8x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 4 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static llvm::Intrinsic::ID getIntrinsicID(mlir::Type dstTy,
NVVM::FPRoundingMode rnd,
NVVM::SaturationMode sat,
bool hasRelu);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ConvertF32x2ToF8x2Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ConvertF32x2ToF8x2OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ConvertF32x2ToS2F6x2Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ConvertF32x2ToS2F6x2OpGenericAdaptorBase {
public:
struct Properties {
using reluTy = ::mlir::BoolAttr;
reluTy relu;
auto getRelu() const {
auto &propStorage = this->relu;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelu(const ::mlir::BoolAttr &propValue) {
this->relu = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.relu == this->relu &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ConvertF32x2ToS2F6x2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.convert.f32x2.to.s2f6x2", odsAttrs.getContext());
}
ConvertF32x2ToS2F6x2OpGenericAdaptorBase(ConvertF32x2ToS2F6x2Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::BoolAttr getReluAttr();
bool getRelu();
};
} // namespace detail
template <typename RangeT>
class ConvertF32x2ToS2F6x2OpGenericAdaptor : public detail::ConvertF32x2ToS2F6x2OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ConvertF32x2ToS2F6x2OpGenericAdaptorBase;
static constexpr int odsIndex_a = 0;
static constexpr int odsIndex_b = 1;
static constexpr int odsIndex_scaleFactor = 2;
public:
ConvertF32x2ToS2F6x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ConvertF32x2ToS2F6x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConvertF32x2ToS2F6x2OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ConvertF32x2ToS2F6x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConvertF32x2ToS2F6x2OpGenericAdaptor(values, attrs, Properties{}, {}) {}
ConvertF32x2ToS2F6x2OpGenericAdaptor(RangeT values, const ConvertF32x2ToS2F6x2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ConvertF32x2ToS2F6x2Op, typename = std::enable_if_t<std::is_same_v<LateInst, ConvertF32x2ToS2F6x2Op>>>
ConvertF32x2ToS2F6x2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getA() {
return (*getODSOperands(0).begin());
}
ValueT getB() {
return (*getODSOperands(1).begin());
}
ValueT getScaleFactor() {
auto operands = getODSOperands(2);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ConvertF32x2ToS2F6x2OpAdaptor : public ConvertF32x2ToS2F6x2OpGenericAdaptor<::mlir::ValueRange> {
public:
using ConvertF32x2ToS2F6x2OpGenericAdaptor::ConvertF32x2ToS2F6x2OpGenericAdaptor;
ConvertF32x2ToS2F6x2OpAdaptor(ConvertF32x2ToS2F6x2Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ConvertF32x2ToS2F6x2Op : public ::mlir::Op<ConvertF32x2ToS2F6x2Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ConvertF32x2ToS2F6x2OpAdaptor;
template <typename RangeT>
using GenericAdaptor = ConvertF32x2ToS2F6x2OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_a = 0;
static constexpr int odsIndex_b = 1;
static constexpr int odsIndex_scaleFactor = 2;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("relu")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getReluAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getReluAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.convert.f32x2.to.s2f6x2");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::FloatType> getA() {
return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::FloatType> getB() {
return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getScaleFactor() {
auto operands = getODSOperands(2);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getAMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getBMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getScaleFactorMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getDst() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::BoolAttr getReluAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relu);
}
bool getRelu();
void setReluAttr(::mlir::BoolAttr attr) {
getProperties().relu = attr;
}
void setRelu(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value a, ::mlir::Value b, /*optional*/::mlir::Value scaleFactor, ::mlir::BoolAttr relu);
static ConvertF32x2ToS2F6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value a, ::mlir::Value b, /*optional*/::mlir::Value scaleFactor, ::mlir::BoolAttr relu);
static ConvertF32x2ToS2F6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value a, ::mlir::Value b, /*optional*/::mlir::Value scaleFactor, ::mlir::BoolAttr relu);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, /*optional*/::mlir::Value scaleFactor, ::mlir::BoolAttr relu);
static ConvertF32x2ToS2F6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, /*optional*/::mlir::Value scaleFactor, ::mlir::BoolAttr relu);
static ConvertF32x2ToS2F6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, /*optional*/::mlir::Value scaleFactor, ::mlir::BoolAttr relu);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value a, ::mlir::Value b, /*optional*/::mlir::Value scaleFactor, bool relu = false);
static ConvertF32x2ToS2F6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value a, ::mlir::Value b, /*optional*/::mlir::Value scaleFactor, bool relu = false);
static ConvertF32x2ToS2F6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value a, ::mlir::Value b, /*optional*/::mlir::Value scaleFactor, bool relu = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, /*optional*/::mlir::Value scaleFactor, bool relu = false);
static ConvertF32x2ToS2F6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, /*optional*/::mlir::Value scaleFactor, bool relu = false);
static ConvertF32x2ToS2F6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, /*optional*/::mlir::Value scaleFactor, bool relu = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF32x2ToS2F6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF32x2ToS2F6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF32x2ToS2F6x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF32x2ToS2F6x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static IDArgPair getIntrinsicIDAndArgs(Operation &op,
LLVM::ModuleTranslation &mt, llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ConvertF32x2ToS2F6x2Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ConvertF32x2ToS2F6x2OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ConvertF32x4ToF4x4Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ConvertF32x4ToF4x4OpGenericAdaptorBase {
public:
struct Properties {
using dstTyTy = ::mlir::TypeAttr;
dstTyTy dstTy;
auto getDstTy() const {
auto &propStorage = this->dstTy;
return ::llvm::cast<::mlir::TypeAttr>(propStorage);
}
void setDstTy(const ::mlir::TypeAttr &propValue) {
this->dstTy = propValue;
}
using reluTy = ::mlir::BoolAttr;
reluTy relu;
auto getRelu() const {
auto &propStorage = this->relu;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelu(const ::mlir::BoolAttr &propValue) {
this->relu = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.dstTy == this->dstTy &&
rhs.relu == this->relu &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ConvertF32x4ToF4x4OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.convert.f32x4.to.f4x4", odsAttrs.getContext());
}
ConvertF32x4ToF4x4OpGenericAdaptorBase(ConvertF32x4ToF4x4Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::BoolAttr getReluAttr();
bool getRelu();
::mlir::TypeAttr getDstTyAttr() {
auto attr = ::llvm::cast<::mlir::TypeAttr>(getProperties().dstTy);
return attr;
}
::mlir::Type getDstTy();
};
} // namespace detail
template <typename RangeT>
class ConvertF32x4ToF4x4OpGenericAdaptor : public detail::ConvertF32x4ToF4x4OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ConvertF32x4ToF4x4OpGenericAdaptorBase;
static constexpr int odsIndex_src = 0;
static constexpr int odsIndex_rbits = 1;
public:
ConvertF32x4ToF4x4OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ConvertF32x4ToF4x4OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConvertF32x4ToF4x4OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ConvertF32x4ToF4x4OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConvertF32x4ToF4x4OpGenericAdaptor(values, attrs, Properties{}, {}) {}
ConvertF32x4ToF4x4OpGenericAdaptor(RangeT values, const ConvertF32x4ToF4x4OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ConvertF32x4ToF4x4Op, typename = std::enable_if_t<std::is_same_v<LateInst, ConvertF32x4ToF4x4Op>>>
ConvertF32x4ToF4x4OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrc() {
return (*getODSOperands(0).begin());
}
ValueT getRbits() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ConvertF32x4ToF4x4OpAdaptor : public ConvertF32x4ToF4x4OpGenericAdaptor<::mlir::ValueRange> {
public:
using ConvertF32x4ToF4x4OpGenericAdaptor::ConvertF32x4ToF4x4OpGenericAdaptor;
ConvertF32x4ToF4x4OpAdaptor(ConvertF32x4ToF4x4Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ConvertF32x4ToF4x4Op : public ::mlir::Op<ConvertF32x4ToF4x4Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<1003,1033>::Impl, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ConvertF32x4ToF4x4OpAdaptor;
template <typename RangeT>
using GenericAdaptor = ConvertF32x4ToF4x4OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src = 0;
static constexpr int odsIndex_rbits = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("dstTy"), ::llvm::StringRef("relu")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getDstTyAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getDstTyAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getReluAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getReluAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.convert.f32x4.to.f4x4");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getRbits() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getRbitsMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getDst() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::BoolAttr getReluAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relu);
}
bool getRelu();
::mlir::TypeAttr getDstTyAttr() {
return ::llvm::cast<::mlir::TypeAttr>(getProperties().dstTy);
}
::mlir::Type getDstTy();
void setReluAttr(::mlir::BoolAttr attr) {
getProperties().relu = attr;
}
void setRelu(bool attrValue);
void setDstTyAttr(::mlir::TypeAttr attr) {
getProperties().dstTy = attr;
}
void setDstTy(::mlir::Type attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, ::mlir::Value rbits, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x4ToF4x4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, ::mlir::Value rbits, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x4ToF4x4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, ::mlir::Value rbits, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value src, ::mlir::Value rbits, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x4ToF4x4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value src, ::mlir::Value rbits, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x4ToF4x4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value src, ::mlir::Value rbits, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value rbits, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x4ToF4x4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value rbits, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x4ToF4x4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value rbits, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, ::mlir::Value rbits, bool relu, ::mlir::Type dstTy);
static ConvertF32x4ToF4x4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, ::mlir::Value rbits, bool relu, ::mlir::Type dstTy);
static ConvertF32x4ToF4x4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, ::mlir::Value rbits, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value src, ::mlir::Value rbits, bool relu, ::mlir::Type dstTy);
static ConvertF32x4ToF4x4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value src, ::mlir::Value rbits, bool relu, ::mlir::Type dstTy);
static ConvertF32x4ToF4x4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value src, ::mlir::Value rbits, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value rbits, bool relu, ::mlir::Type dstTy);
static ConvertF32x4ToF4x4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value rbits, bool relu, ::mlir::Type dstTy);
static ConvertF32x4ToF4x4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value rbits, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF32x4ToF4x4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF32x4ToF4x4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF32x4ToF4x4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF32x4ToF4x4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF32x4ToF4x4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF32x4ToF4x4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF32x4ToF4x4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF32x4ToF4x4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
llvm::Intrinsic::ID getIntrinsicID();
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ConvertF32x4ToF4x4Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ConvertF32x4ToF4x4OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ConvertF32x4ToF6x4Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ConvertF32x4ToF6x4OpGenericAdaptorBase {
public:
struct Properties {
using dstTyTy = ::mlir::TypeAttr;
dstTyTy dstTy;
auto getDstTy() const {
auto &propStorage = this->dstTy;
return ::llvm::cast<::mlir::TypeAttr>(propStorage);
}
void setDstTy(const ::mlir::TypeAttr &propValue) {
this->dstTy = propValue;
}
using reluTy = ::mlir::BoolAttr;
reluTy relu;
auto getRelu() const {
auto &propStorage = this->relu;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelu(const ::mlir::BoolAttr &propValue) {
this->relu = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.dstTy == this->dstTy &&
rhs.relu == this->relu &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ConvertF32x4ToF6x4OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.convert.f32x4.to.f6x4", odsAttrs.getContext());
}
ConvertF32x4ToF6x4OpGenericAdaptorBase(ConvertF32x4ToF6x4Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::BoolAttr getReluAttr();
bool getRelu();
::mlir::TypeAttr getDstTyAttr() {
auto attr = ::llvm::cast<::mlir::TypeAttr>(getProperties().dstTy);
return attr;
}
::mlir::Type getDstTy();
};
} // namespace detail
template <typename RangeT>
class ConvertF32x4ToF6x4OpGenericAdaptor : public detail::ConvertF32x4ToF6x4OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ConvertF32x4ToF6x4OpGenericAdaptorBase;
static constexpr int odsIndex_src = 0;
static constexpr int odsIndex_rbits = 1;
public:
ConvertF32x4ToF6x4OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ConvertF32x4ToF6x4OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConvertF32x4ToF6x4OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ConvertF32x4ToF6x4OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConvertF32x4ToF6x4OpGenericAdaptor(values, attrs, Properties{}, {}) {}
ConvertF32x4ToF6x4OpGenericAdaptor(RangeT values, const ConvertF32x4ToF6x4OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ConvertF32x4ToF6x4Op, typename = std::enable_if_t<std::is_same_v<LateInst, ConvertF32x4ToF6x4Op>>>
ConvertF32x4ToF6x4OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrc() {
return (*getODSOperands(0).begin());
}
ValueT getRbits() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ConvertF32x4ToF6x4OpAdaptor : public ConvertF32x4ToF6x4OpGenericAdaptor<::mlir::ValueRange> {
public:
using ConvertF32x4ToF6x4OpGenericAdaptor::ConvertF32x4ToF6x4OpGenericAdaptor;
ConvertF32x4ToF6x4OpAdaptor(ConvertF32x4ToF6x4Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ConvertF32x4ToF6x4Op : public ::mlir::Op<ConvertF32x4ToF6x4Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<1003,1033>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = ConvertF32x4ToF6x4OpAdaptor;
template <typename RangeT>
using GenericAdaptor = ConvertF32x4ToF6x4OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src = 0;
static constexpr int odsIndex_rbits = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("dstTy"), ::llvm::StringRef("relu")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getDstTyAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getDstTyAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getReluAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getReluAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.convert.f32x4.to.f6x4");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getRbits() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getRbitsMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getDst() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::BoolAttr getReluAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relu);
}
bool getRelu();
::mlir::TypeAttr getDstTyAttr() {
return ::llvm::cast<::mlir::TypeAttr>(getProperties().dstTy);
}
::mlir::Type getDstTy();
void setReluAttr(::mlir::BoolAttr attr) {
getProperties().relu = attr;
}
void setRelu(bool attrValue);
void setDstTyAttr(::mlir::TypeAttr attr) {
getProperties().dstTy = attr;
}
void setDstTy(::mlir::Type attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, ::mlir::Value rbits, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x4ToF6x4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, ::mlir::Value rbits, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x4ToF6x4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, ::mlir::Value rbits, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value rbits, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x4ToF6x4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value rbits, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x4ToF6x4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value rbits, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, ::mlir::Value rbits, bool relu, ::mlir::Type dstTy);
static ConvertF32x4ToF6x4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, ::mlir::Value rbits, bool relu, ::mlir::Type dstTy);
static ConvertF32x4ToF6x4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, ::mlir::Value rbits, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value rbits, bool relu, ::mlir::Type dstTy);
static ConvertF32x4ToF6x4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value rbits, bool relu, ::mlir::Type dstTy);
static ConvertF32x4ToF6x4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value rbits, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF32x4ToF6x4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF32x4ToF6x4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF32x4ToF6x4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF32x4ToF6x4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
llvm::Intrinsic::ID getIntrinsicID();
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ConvertF32x4ToF6x4Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ConvertF32x4ToF6x4OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ConvertF32x4ToF8x4Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ConvertF32x4ToF8x4OpGenericAdaptorBase {
public:
struct Properties {
using dstTyTy = ::mlir::TypeAttr;
dstTyTy dstTy;
auto getDstTy() const {
auto &propStorage = this->dstTy;
return ::llvm::cast<::mlir::TypeAttr>(propStorage);
}
void setDstTy(const ::mlir::TypeAttr &propValue) {
this->dstTy = propValue;
}
using reluTy = ::mlir::BoolAttr;
reluTy relu;
auto getRelu() const {
auto &propStorage = this->relu;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelu(const ::mlir::BoolAttr &propValue) {
this->relu = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.dstTy == this->dstTy &&
rhs.relu == this->relu &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ConvertF32x4ToF8x4OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.convert.f32x4.to.f8x4", odsAttrs.getContext());
}
ConvertF32x4ToF8x4OpGenericAdaptorBase(ConvertF32x4ToF8x4Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::BoolAttr getReluAttr();
bool getRelu();
::mlir::TypeAttr getDstTyAttr() {
auto attr = ::llvm::cast<::mlir::TypeAttr>(getProperties().dstTy);
return attr;
}
::mlir::Type getDstTy();
};
} // namespace detail
template <typename RangeT>
class ConvertF32x4ToF8x4OpGenericAdaptor : public detail::ConvertF32x4ToF8x4OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ConvertF32x4ToF8x4OpGenericAdaptorBase;
static constexpr int odsIndex_src = 0;
static constexpr int odsIndex_rbits = 1;
public:
ConvertF32x4ToF8x4OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ConvertF32x4ToF8x4OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConvertF32x4ToF8x4OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ConvertF32x4ToF8x4OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConvertF32x4ToF8x4OpGenericAdaptor(values, attrs, Properties{}, {}) {}
ConvertF32x4ToF8x4OpGenericAdaptor(RangeT values, const ConvertF32x4ToF8x4OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ConvertF32x4ToF8x4Op, typename = std::enable_if_t<std::is_same_v<LateInst, ConvertF32x4ToF8x4Op>>>
ConvertF32x4ToF8x4OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrc() {
return (*getODSOperands(0).begin());
}
ValueT getRbits() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ConvertF32x4ToF8x4OpAdaptor : public ConvertF32x4ToF8x4OpGenericAdaptor<::mlir::ValueRange> {
public:
using ConvertF32x4ToF8x4OpGenericAdaptor::ConvertF32x4ToF8x4OpGenericAdaptor;
ConvertF32x4ToF8x4OpAdaptor(ConvertF32x4ToF8x4Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ConvertF32x4ToF8x4Op : public ::mlir::Op<ConvertF32x4ToF8x4Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<1003,1033>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = ConvertF32x4ToF8x4OpAdaptor;
template <typename RangeT>
using GenericAdaptor = ConvertF32x4ToF8x4OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src = 0;
static constexpr int odsIndex_rbits = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("dstTy"), ::llvm::StringRef("relu")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getDstTyAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getDstTyAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getReluAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getReluAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.convert.f32x4.to.f8x4");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getRbits() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getRbitsMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getDst() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::BoolAttr getReluAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relu);
}
bool getRelu();
::mlir::TypeAttr getDstTyAttr() {
return ::llvm::cast<::mlir::TypeAttr>(getProperties().dstTy);
}
::mlir::Type getDstTy();
void setReluAttr(::mlir::BoolAttr attr) {
getProperties().relu = attr;
}
void setRelu(bool attrValue);
void setDstTyAttr(::mlir::TypeAttr attr) {
getProperties().dstTy = attr;
}
void setDstTy(::mlir::Type attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, ::mlir::Value rbits, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x4ToF8x4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, ::mlir::Value rbits, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x4ToF8x4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, ::mlir::Value rbits, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value rbits, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x4ToF8x4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value rbits, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static ConvertF32x4ToF8x4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value rbits, ::mlir::BoolAttr relu, ::mlir::TypeAttr dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, ::mlir::Value rbits, bool relu, ::mlir::Type dstTy);
static ConvertF32x4ToF8x4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, ::mlir::Value rbits, bool relu, ::mlir::Type dstTy);
static ConvertF32x4ToF8x4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, ::mlir::Value rbits, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value rbits, bool relu, ::mlir::Type dstTy);
static ConvertF32x4ToF8x4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value rbits, bool relu, ::mlir::Type dstTy);
static ConvertF32x4ToF8x4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value rbits, bool relu, ::mlir::Type dstTy);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF32x4ToF8x4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF32x4ToF8x4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF32x4ToF8x4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF32x4ToF8x4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
llvm::Intrinsic::ID getIntrinsicID();
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ConvertF32x4ToF8x4Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ConvertF32x4ToF8x4OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ConvertF4x2ToBF16x2Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ConvertF4x2ToBF16x2OpGenericAdaptorBase {
public:
struct Properties {
using reluTy = ::mlir::BoolAttr;
reluTy relu;
auto getRelu() const {
auto &propStorage = this->relu;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelu(const ::mlir::BoolAttr &propValue) {
this->relu = propValue;
}
using satTy = ::mlir::NVVM::SaturationModeAttr;
satTy sat;
auto getSat() const {
auto &propStorage = this->sat;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SaturationModeAttr>(propStorage);
}
void setSat(const ::mlir::NVVM::SaturationModeAttr &propValue) {
this->sat = propValue;
}
using srcTypeTy = ::mlir::TypeAttr;
srcTypeTy srcType;
auto getSrcType() const {
auto &propStorage = this->srcType;
return ::llvm::cast<::mlir::TypeAttr>(propStorage);
}
void setSrcType(const ::mlir::TypeAttr &propValue) {
this->srcType = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.relu == this->relu &&
rhs.sat == this->sat &&
rhs.srcType == this->srcType &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ConvertF4x2ToBF16x2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.convert.f4x2.to.bf16x2", odsAttrs.getContext());
}
ConvertF4x2ToBF16x2OpGenericAdaptorBase(ConvertF4x2ToBF16x2Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::TypeAttr getSrcTypeAttr() {
auto attr = ::llvm::cast<::mlir::TypeAttr>(getProperties().srcType);
return attr;
}
::mlir::Type getSrcType();
::mlir::NVVM::SaturationModeAttr getSatAttr();
::mlir::NVVM::SaturationMode getSat();
::mlir::BoolAttr getReluAttr();
bool getRelu();
};
} // namespace detail
template <typename RangeT>
class ConvertF4x2ToBF16x2OpGenericAdaptor : public detail::ConvertF4x2ToBF16x2OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ConvertF4x2ToBF16x2OpGenericAdaptorBase;
static constexpr int odsIndex_src = 0;
static constexpr int odsIndex_scaleFactor = 1;
public:
ConvertF4x2ToBF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ConvertF4x2ToBF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConvertF4x2ToBF16x2OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ConvertF4x2ToBF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConvertF4x2ToBF16x2OpGenericAdaptor(values, attrs, Properties{}, {}) {}
ConvertF4x2ToBF16x2OpGenericAdaptor(RangeT values, const ConvertF4x2ToBF16x2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ConvertF4x2ToBF16x2Op, typename = std::enable_if_t<std::is_same_v<LateInst, ConvertF4x2ToBF16x2Op>>>
ConvertF4x2ToBF16x2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrc() {
return (*getODSOperands(0).begin());
}
ValueT getScaleFactor() {
auto operands = getODSOperands(1);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ConvertF4x2ToBF16x2OpAdaptor : public ConvertF4x2ToBF16x2OpGenericAdaptor<::mlir::ValueRange> {
public:
using ConvertF4x2ToBF16x2OpGenericAdaptor::ConvertF4x2ToBF16x2OpGenericAdaptor;
ConvertF4x2ToBF16x2OpAdaptor(ConvertF4x2ToBF16x2Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ConvertF4x2ToBF16x2Op : public ::mlir::Op<ConvertF4x2ToBF16x2Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ConvertF4x2ToBF16x2OpAdaptor;
template <typename RangeT>
using GenericAdaptor = ConvertF4x2ToBF16x2OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src = 0;
static constexpr int odsIndex_scaleFactor = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("relu"), ::llvm::StringRef("sat"), ::llvm::StringRef("srcType")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getReluAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getReluAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getSatAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getSatAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getSrcTypeAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getSrcTypeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.convert.f4x2.to.bf16x2");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getScaleFactor() {
auto operands = getODSOperands(1);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getScaleFactorMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getDst() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::TypeAttr getSrcTypeAttr() {
return ::llvm::cast<::mlir::TypeAttr>(getProperties().srcType);
}
::mlir::Type getSrcType();
::mlir::NVVM::SaturationModeAttr getSatAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SaturationModeAttr>(getProperties().sat);
}
::mlir::NVVM::SaturationMode getSat();
::mlir::BoolAttr getReluAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relu);
}
bool getRelu();
void setSrcTypeAttr(::mlir::TypeAttr attr) {
getProperties().srcType = attr;
}
void setSrcType(::mlir::Type attrValue);
void setSatAttr(::mlir::NVVM::SaturationModeAttr attr) {
getProperties().sat = attr;
}
void setSat(::mlir::NVVM::SaturationMode attrValue);
void setReluAttr(::mlir::BoolAttr attr) {
getProperties().relu = attr;
}
void setRelu(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::TypeAttr srcType, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertF4x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::TypeAttr srcType, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertF4x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::TypeAttr srcType, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::TypeAttr srcType, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertF4x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::TypeAttr srcType, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertF4x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::TypeAttr srcType, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::Type srcType, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertF4x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::Type srcType, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertF4x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::Type srcType, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::Type srcType, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertF4x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::Type srcType, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertF4x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::Type srcType, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF4x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF4x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF4x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF4x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 3 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ConvertF4x2ToBF16x2Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ConvertF4x2ToBF16x2OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ConvertF4x2ToF16x2Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ConvertF4x2ToF16x2OpGenericAdaptorBase {
public:
struct Properties {
using reluTy = ::mlir::BoolAttr;
reluTy relu;
auto getRelu() const {
auto &propStorage = this->relu;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelu(const ::mlir::BoolAttr &propValue) {
this->relu = propValue;
}
using srcTypeTy = ::mlir::TypeAttr;
srcTypeTy srcType;
auto getSrcType() const {
auto &propStorage = this->srcType;
return ::llvm::cast<::mlir::TypeAttr>(propStorage);
}
void setSrcType(const ::mlir::TypeAttr &propValue) {
this->srcType = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.relu == this->relu &&
rhs.srcType == this->srcType &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ConvertF4x2ToF16x2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.convert.f4x2.to.f16x2", odsAttrs.getContext());
}
ConvertF4x2ToF16x2OpGenericAdaptorBase(ConvertF4x2ToF16x2Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::TypeAttr getSrcTypeAttr() {
auto attr = ::llvm::cast<::mlir::TypeAttr>(getProperties().srcType);
return attr;
}
::mlir::Type getSrcType();
::mlir::BoolAttr getReluAttr();
bool getRelu();
};
} // namespace detail
template <typename RangeT>
class ConvertF4x2ToF16x2OpGenericAdaptor : public detail::ConvertF4x2ToF16x2OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ConvertF4x2ToF16x2OpGenericAdaptorBase;
static constexpr int odsIndex_src = 0;
public:
ConvertF4x2ToF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ConvertF4x2ToF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConvertF4x2ToF16x2OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ConvertF4x2ToF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConvertF4x2ToF16x2OpGenericAdaptor(values, attrs, Properties{}, {}) {}
ConvertF4x2ToF16x2OpGenericAdaptor(RangeT values, const ConvertF4x2ToF16x2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ConvertF4x2ToF16x2Op, typename = std::enable_if_t<std::is_same_v<LateInst, ConvertF4x2ToF16x2Op>>>
ConvertF4x2ToF16x2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrc() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ConvertF4x2ToF16x2OpAdaptor : public ConvertF4x2ToF16x2OpGenericAdaptor<::mlir::ValueRange> {
public:
using ConvertF4x2ToF16x2OpGenericAdaptor::ConvertF4x2ToF16x2OpGenericAdaptor;
ConvertF4x2ToF16x2OpAdaptor(ConvertF4x2ToF16x2Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ConvertF4x2ToF16x2Op : public ::mlir::Op<ConvertF4x2ToF16x2Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ConvertF4x2ToF16x2OpAdaptor;
template <typename RangeT>
using GenericAdaptor = ConvertF4x2ToF16x2OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("relu"), ::llvm::StringRef("srcType")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getReluAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getReluAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getSrcTypeAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getSrcTypeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.convert.f4x2.to.f16x2");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getDst() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::TypeAttr getSrcTypeAttr() {
return ::llvm::cast<::mlir::TypeAttr>(getProperties().srcType);
}
::mlir::Type getSrcType();
::mlir::BoolAttr getReluAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relu);
}
bool getRelu();
void setSrcTypeAttr(::mlir::TypeAttr attr) {
getProperties().srcType = attr;
}
void setSrcType(::mlir::Type attrValue);
void setReluAttr(::mlir::BoolAttr attr) {
getProperties().relu = attr;
}
void setRelu(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, ::mlir::TypeAttr srcType, ::mlir::BoolAttr relu = nullptr);
static ConvertF4x2ToF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, ::mlir::TypeAttr srcType, ::mlir::BoolAttr relu = nullptr);
static ConvertF4x2ToF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, ::mlir::TypeAttr srcType, ::mlir::BoolAttr relu = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::TypeAttr srcType, ::mlir::BoolAttr relu = nullptr);
static ConvertF4x2ToF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::TypeAttr srcType, ::mlir::BoolAttr relu = nullptr);
static ConvertF4x2ToF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::TypeAttr srcType, ::mlir::BoolAttr relu = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, ::mlir::Type srcType, bool relu = false);
static ConvertF4x2ToF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, ::mlir::Type srcType, bool relu = false);
static ConvertF4x2ToF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, ::mlir::Type srcType, bool relu = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Type srcType, bool relu = false);
static ConvertF4x2ToF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Type srcType, bool relu = false);
static ConvertF4x2ToF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Type srcType, bool relu = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF4x2ToF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF4x2ToF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF4x2ToF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF4x2ToF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ConvertF4x2ToF16x2Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ConvertF4x2ToF16x2OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ConvertF6x2ToBF16x2Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ConvertF6x2ToBF16x2OpGenericAdaptorBase {
public:
struct Properties {
using reluTy = ::mlir::BoolAttr;
reluTy relu;
auto getRelu() const {
auto &propStorage = this->relu;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelu(const ::mlir::BoolAttr &propValue) {
this->relu = propValue;
}
using satTy = ::mlir::NVVM::SaturationModeAttr;
satTy sat;
auto getSat() const {
auto &propStorage = this->sat;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SaturationModeAttr>(propStorage);
}
void setSat(const ::mlir::NVVM::SaturationModeAttr &propValue) {
this->sat = propValue;
}
using srcTypeTy = ::mlir::TypeAttr;
srcTypeTy srcType;
auto getSrcType() const {
auto &propStorage = this->srcType;
return ::llvm::cast<::mlir::TypeAttr>(propStorage);
}
void setSrcType(const ::mlir::TypeAttr &propValue) {
this->srcType = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.relu == this->relu &&
rhs.sat == this->sat &&
rhs.srcType == this->srcType &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ConvertF6x2ToBF16x2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.convert.f6x2.to.bf16x2", odsAttrs.getContext());
}
ConvertF6x2ToBF16x2OpGenericAdaptorBase(ConvertF6x2ToBF16x2Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::TypeAttr getSrcTypeAttr() {
auto attr = ::llvm::cast<::mlir::TypeAttr>(getProperties().srcType);
return attr;
}
::mlir::Type getSrcType();
::mlir::NVVM::SaturationModeAttr getSatAttr();
::mlir::NVVM::SaturationMode getSat();
::mlir::BoolAttr getReluAttr();
bool getRelu();
};
} // namespace detail
template <typename RangeT>
class ConvertF6x2ToBF16x2OpGenericAdaptor : public detail::ConvertF6x2ToBF16x2OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ConvertF6x2ToBF16x2OpGenericAdaptorBase;
static constexpr int odsIndex_src = 0;
static constexpr int odsIndex_scaleFactor = 1;
public:
ConvertF6x2ToBF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ConvertF6x2ToBF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConvertF6x2ToBF16x2OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ConvertF6x2ToBF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConvertF6x2ToBF16x2OpGenericAdaptor(values, attrs, Properties{}, {}) {}
ConvertF6x2ToBF16x2OpGenericAdaptor(RangeT values, const ConvertF6x2ToBF16x2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ConvertF6x2ToBF16x2Op, typename = std::enable_if_t<std::is_same_v<LateInst, ConvertF6x2ToBF16x2Op>>>
ConvertF6x2ToBF16x2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrc() {
return (*getODSOperands(0).begin());
}
ValueT getScaleFactor() {
auto operands = getODSOperands(1);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ConvertF6x2ToBF16x2OpAdaptor : public ConvertF6x2ToBF16x2OpGenericAdaptor<::mlir::ValueRange> {
public:
using ConvertF6x2ToBF16x2OpGenericAdaptor::ConvertF6x2ToBF16x2OpGenericAdaptor;
ConvertF6x2ToBF16x2OpAdaptor(ConvertF6x2ToBF16x2Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ConvertF6x2ToBF16x2Op : public ::mlir::Op<ConvertF6x2ToBF16x2Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ConvertF6x2ToBF16x2OpAdaptor;
template <typename RangeT>
using GenericAdaptor = ConvertF6x2ToBF16x2OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src = 0;
static constexpr int odsIndex_scaleFactor = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("relu"), ::llvm::StringRef("sat"), ::llvm::StringRef("srcType")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getReluAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getReluAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getSatAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getSatAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getSrcTypeAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getSrcTypeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.convert.f6x2.to.bf16x2");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getScaleFactor() {
auto operands = getODSOperands(1);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getScaleFactorMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getDst() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::TypeAttr getSrcTypeAttr() {
return ::llvm::cast<::mlir::TypeAttr>(getProperties().srcType);
}
::mlir::Type getSrcType();
::mlir::NVVM::SaturationModeAttr getSatAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SaturationModeAttr>(getProperties().sat);
}
::mlir::NVVM::SaturationMode getSat();
::mlir::BoolAttr getReluAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relu);
}
bool getRelu();
void setSrcTypeAttr(::mlir::TypeAttr attr) {
getProperties().srcType = attr;
}
void setSrcType(::mlir::Type attrValue);
void setSatAttr(::mlir::NVVM::SaturationModeAttr attr) {
getProperties().sat = attr;
}
void setSat(::mlir::NVVM::SaturationMode attrValue);
void setReluAttr(::mlir::BoolAttr attr) {
getProperties().relu = attr;
}
void setRelu(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::TypeAttr srcType, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertF6x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::TypeAttr srcType, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertF6x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::TypeAttr srcType, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::TypeAttr srcType, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertF6x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::TypeAttr srcType, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertF6x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::TypeAttr srcType, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::Type srcType, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertF6x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::Type srcType, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertF6x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::Type srcType, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::Type srcType, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertF6x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::Type srcType, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertF6x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::Type srcType, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF6x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF6x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF6x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF6x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 3 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ConvertF6x2ToBF16x2Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ConvertF6x2ToBF16x2OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ConvertF6x2ToF16x2Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ConvertF6x2ToF16x2OpGenericAdaptorBase {
public:
struct Properties {
using reluTy = ::mlir::BoolAttr;
reluTy relu;
auto getRelu() const {
auto &propStorage = this->relu;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelu(const ::mlir::BoolAttr &propValue) {
this->relu = propValue;
}
using srcTypeTy = ::mlir::TypeAttr;
srcTypeTy srcType;
auto getSrcType() const {
auto &propStorage = this->srcType;
return ::llvm::cast<::mlir::TypeAttr>(propStorage);
}
void setSrcType(const ::mlir::TypeAttr &propValue) {
this->srcType = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.relu == this->relu &&
rhs.srcType == this->srcType &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ConvertF6x2ToF16x2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.convert.f6x2.to.f16x2", odsAttrs.getContext());
}
ConvertF6x2ToF16x2OpGenericAdaptorBase(ConvertF6x2ToF16x2Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::TypeAttr getSrcTypeAttr() {
auto attr = ::llvm::cast<::mlir::TypeAttr>(getProperties().srcType);
return attr;
}
::mlir::Type getSrcType();
::mlir::BoolAttr getReluAttr();
bool getRelu();
};
} // namespace detail
template <typename RangeT>
class ConvertF6x2ToF16x2OpGenericAdaptor : public detail::ConvertF6x2ToF16x2OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ConvertF6x2ToF16x2OpGenericAdaptorBase;
static constexpr int odsIndex_src = 0;
public:
ConvertF6x2ToF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ConvertF6x2ToF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConvertF6x2ToF16x2OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ConvertF6x2ToF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConvertF6x2ToF16x2OpGenericAdaptor(values, attrs, Properties{}, {}) {}
ConvertF6x2ToF16x2OpGenericAdaptor(RangeT values, const ConvertF6x2ToF16x2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ConvertF6x2ToF16x2Op, typename = std::enable_if_t<std::is_same_v<LateInst, ConvertF6x2ToF16x2Op>>>
ConvertF6x2ToF16x2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrc() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ConvertF6x2ToF16x2OpAdaptor : public ConvertF6x2ToF16x2OpGenericAdaptor<::mlir::ValueRange> {
public:
using ConvertF6x2ToF16x2OpGenericAdaptor::ConvertF6x2ToF16x2OpGenericAdaptor;
ConvertF6x2ToF16x2OpAdaptor(ConvertF6x2ToF16x2Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ConvertF6x2ToF16x2Op : public ::mlir::Op<ConvertF6x2ToF16x2Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ConvertF6x2ToF16x2OpAdaptor;
template <typename RangeT>
using GenericAdaptor = ConvertF6x2ToF16x2OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("relu"), ::llvm::StringRef("srcType")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getReluAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getReluAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getSrcTypeAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getSrcTypeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.convert.f6x2.to.f16x2");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getDst() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::TypeAttr getSrcTypeAttr() {
return ::llvm::cast<::mlir::TypeAttr>(getProperties().srcType);
}
::mlir::Type getSrcType();
::mlir::BoolAttr getReluAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relu);
}
bool getRelu();
void setSrcTypeAttr(::mlir::TypeAttr attr) {
getProperties().srcType = attr;
}
void setSrcType(::mlir::Type attrValue);
void setReluAttr(::mlir::BoolAttr attr) {
getProperties().relu = attr;
}
void setRelu(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, ::mlir::TypeAttr srcType, ::mlir::BoolAttr relu = nullptr);
static ConvertF6x2ToF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, ::mlir::TypeAttr srcType, ::mlir::BoolAttr relu = nullptr);
static ConvertF6x2ToF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, ::mlir::TypeAttr srcType, ::mlir::BoolAttr relu = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::TypeAttr srcType, ::mlir::BoolAttr relu = nullptr);
static ConvertF6x2ToF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::TypeAttr srcType, ::mlir::BoolAttr relu = nullptr);
static ConvertF6x2ToF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::TypeAttr srcType, ::mlir::BoolAttr relu = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, ::mlir::Type srcType, bool relu = false);
static ConvertF6x2ToF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, ::mlir::Type srcType, bool relu = false);
static ConvertF6x2ToF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, ::mlir::Type srcType, bool relu = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Type srcType, bool relu = false);
static ConvertF6x2ToF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Type srcType, bool relu = false);
static ConvertF6x2ToF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Type srcType, bool relu = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF6x2ToF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF6x2ToF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF6x2ToF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF6x2ToF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ConvertF6x2ToF16x2Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ConvertF6x2ToF16x2OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ConvertF8x2ToBF16x2Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ConvertF8x2ToBF16x2OpGenericAdaptorBase {
public:
struct Properties {
using reluTy = ::mlir::BoolAttr;
reluTy relu;
auto getRelu() const {
auto &propStorage = this->relu;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelu(const ::mlir::BoolAttr &propValue) {
this->relu = propValue;
}
using satTy = ::mlir::NVVM::SaturationModeAttr;
satTy sat;
auto getSat() const {
auto &propStorage = this->sat;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SaturationModeAttr>(propStorage);
}
void setSat(const ::mlir::NVVM::SaturationModeAttr &propValue) {
this->sat = propValue;
}
using srcTypeTy = ::mlir::TypeAttr;
srcTypeTy srcType;
auto getSrcType() const {
auto &propStorage = this->srcType;
return ::llvm::cast<::mlir::TypeAttr>(propStorage);
}
void setSrcType(const ::mlir::TypeAttr &propValue) {
this->srcType = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.relu == this->relu &&
rhs.sat == this->sat &&
rhs.srcType == this->srcType &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ConvertF8x2ToBF16x2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.convert.f8x2.to.bf16x2", odsAttrs.getContext());
}
ConvertF8x2ToBF16x2OpGenericAdaptorBase(ConvertF8x2ToBF16x2Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::TypeAttr getSrcTypeAttr() {
auto attr = ::llvm::cast<::mlir::TypeAttr>(getProperties().srcType);
return attr;
}
::mlir::Type getSrcType();
::mlir::NVVM::SaturationModeAttr getSatAttr();
::mlir::NVVM::SaturationMode getSat();
::mlir::BoolAttr getReluAttr();
bool getRelu();
};
} // namespace detail
template <typename RangeT>
class ConvertF8x2ToBF16x2OpGenericAdaptor : public detail::ConvertF8x2ToBF16x2OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ConvertF8x2ToBF16x2OpGenericAdaptorBase;
static constexpr int odsIndex_src = 0;
static constexpr int odsIndex_scaleFactor = 1;
public:
ConvertF8x2ToBF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ConvertF8x2ToBF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConvertF8x2ToBF16x2OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ConvertF8x2ToBF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConvertF8x2ToBF16x2OpGenericAdaptor(values, attrs, Properties{}, {}) {}
ConvertF8x2ToBF16x2OpGenericAdaptor(RangeT values, const ConvertF8x2ToBF16x2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ConvertF8x2ToBF16x2Op, typename = std::enable_if_t<std::is_same_v<LateInst, ConvertF8x2ToBF16x2Op>>>
ConvertF8x2ToBF16x2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrc() {
return (*getODSOperands(0).begin());
}
ValueT getScaleFactor() {
auto operands = getODSOperands(1);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ConvertF8x2ToBF16x2OpAdaptor : public ConvertF8x2ToBF16x2OpGenericAdaptor<::mlir::ValueRange> {
public:
using ConvertF8x2ToBF16x2OpGenericAdaptor::ConvertF8x2ToBF16x2OpGenericAdaptor;
ConvertF8x2ToBF16x2OpAdaptor(ConvertF8x2ToBF16x2Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ConvertF8x2ToBF16x2Op : public ::mlir::Op<ConvertF8x2ToBF16x2Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ConvertF8x2ToBF16x2OpAdaptor;
template <typename RangeT>
using GenericAdaptor = ConvertF8x2ToBF16x2OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src = 0;
static constexpr int odsIndex_scaleFactor = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("relu"), ::llvm::StringRef("sat"), ::llvm::StringRef("srcType")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getReluAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getReluAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getSatAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getSatAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getSrcTypeAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getSrcTypeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.convert.f8x2.to.bf16x2");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getScaleFactor() {
auto operands = getODSOperands(1);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getScaleFactorMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getDst() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::TypeAttr getSrcTypeAttr() {
return ::llvm::cast<::mlir::TypeAttr>(getProperties().srcType);
}
::mlir::Type getSrcType();
::mlir::NVVM::SaturationModeAttr getSatAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SaturationModeAttr>(getProperties().sat);
}
::mlir::NVVM::SaturationMode getSat();
::mlir::BoolAttr getReluAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relu);
}
bool getRelu();
void setSrcTypeAttr(::mlir::TypeAttr attr) {
getProperties().srcType = attr;
}
void setSrcType(::mlir::Type attrValue);
void setSatAttr(::mlir::NVVM::SaturationModeAttr attr) {
getProperties().sat = attr;
}
void setSat(::mlir::NVVM::SaturationMode attrValue);
void setReluAttr(::mlir::BoolAttr attr) {
getProperties().relu = attr;
}
void setRelu(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::TypeAttr srcType, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertF8x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::TypeAttr srcType, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertF8x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::TypeAttr srcType, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::TypeAttr srcType, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertF8x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::TypeAttr srcType, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertF8x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::TypeAttr srcType, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::Type srcType, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertF8x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::Type srcType, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertF8x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::Type srcType, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::Type srcType, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertF8x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::Type srcType, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertF8x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::Type srcType, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF8x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF8x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF8x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF8x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 3 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ConvertF8x2ToBF16x2Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ConvertF8x2ToBF16x2OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ConvertF8x2ToF16x2Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ConvertF8x2ToF16x2OpGenericAdaptorBase {
public:
struct Properties {
using reluTy = ::mlir::BoolAttr;
reluTy relu;
auto getRelu() const {
auto &propStorage = this->relu;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelu(const ::mlir::BoolAttr &propValue) {
this->relu = propValue;
}
using srcTypeTy = ::mlir::TypeAttr;
srcTypeTy srcType;
auto getSrcType() const {
auto &propStorage = this->srcType;
return ::llvm::cast<::mlir::TypeAttr>(propStorage);
}
void setSrcType(const ::mlir::TypeAttr &propValue) {
this->srcType = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.relu == this->relu &&
rhs.srcType == this->srcType &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ConvertF8x2ToF16x2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.convert.f8x2.to.f16x2", odsAttrs.getContext());
}
ConvertF8x2ToF16x2OpGenericAdaptorBase(ConvertF8x2ToF16x2Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::TypeAttr getSrcTypeAttr() {
auto attr = ::llvm::cast<::mlir::TypeAttr>(getProperties().srcType);
return attr;
}
::mlir::Type getSrcType();
::mlir::BoolAttr getReluAttr();
bool getRelu();
};
} // namespace detail
template <typename RangeT>
class ConvertF8x2ToF16x2OpGenericAdaptor : public detail::ConvertF8x2ToF16x2OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ConvertF8x2ToF16x2OpGenericAdaptorBase;
static constexpr int odsIndex_src = 0;
public:
ConvertF8x2ToF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ConvertF8x2ToF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConvertF8x2ToF16x2OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ConvertF8x2ToF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConvertF8x2ToF16x2OpGenericAdaptor(values, attrs, Properties{}, {}) {}
ConvertF8x2ToF16x2OpGenericAdaptor(RangeT values, const ConvertF8x2ToF16x2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ConvertF8x2ToF16x2Op, typename = std::enable_if_t<std::is_same_v<LateInst, ConvertF8x2ToF16x2Op>>>
ConvertF8x2ToF16x2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrc() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ConvertF8x2ToF16x2OpAdaptor : public ConvertF8x2ToF16x2OpGenericAdaptor<::mlir::ValueRange> {
public:
using ConvertF8x2ToF16x2OpGenericAdaptor::ConvertF8x2ToF16x2OpGenericAdaptor;
ConvertF8x2ToF16x2OpAdaptor(ConvertF8x2ToF16x2Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ConvertF8x2ToF16x2Op : public ::mlir::Op<ConvertF8x2ToF16x2Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ConvertF8x2ToF16x2OpAdaptor;
template <typename RangeT>
using GenericAdaptor = ConvertF8x2ToF16x2OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("relu"), ::llvm::StringRef("srcType")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getReluAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getReluAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getSrcTypeAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getSrcTypeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.convert.f8x2.to.f16x2");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getDst() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::TypeAttr getSrcTypeAttr() {
return ::llvm::cast<::mlir::TypeAttr>(getProperties().srcType);
}
::mlir::Type getSrcType();
::mlir::BoolAttr getReluAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relu);
}
bool getRelu();
void setSrcTypeAttr(::mlir::TypeAttr attr) {
getProperties().srcType = attr;
}
void setSrcType(::mlir::Type attrValue);
void setReluAttr(::mlir::BoolAttr attr) {
getProperties().relu = attr;
}
void setRelu(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, ::mlir::TypeAttr srcType, ::mlir::BoolAttr relu = nullptr);
static ConvertF8x2ToF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, ::mlir::TypeAttr srcType, ::mlir::BoolAttr relu = nullptr);
static ConvertF8x2ToF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, ::mlir::TypeAttr srcType, ::mlir::BoolAttr relu = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::TypeAttr srcType, ::mlir::BoolAttr relu = nullptr);
static ConvertF8x2ToF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::TypeAttr srcType, ::mlir::BoolAttr relu = nullptr);
static ConvertF8x2ToF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::TypeAttr srcType, ::mlir::BoolAttr relu = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, ::mlir::Type srcType, bool relu = false);
static ConvertF8x2ToF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, ::mlir::Type srcType, bool relu = false);
static ConvertF8x2ToF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, ::mlir::Type srcType, bool relu = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Type srcType, bool relu = false);
static ConvertF8x2ToF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Type srcType, bool relu = false);
static ConvertF8x2ToF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Type srcType, bool relu = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF8x2ToF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertF8x2ToF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF8x2ToF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertF8x2ToF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ConvertF8x2ToF16x2Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ConvertF8x2ToF16x2OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ConvertFloatToTF32Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ConvertFloatToTF32OpGenericAdaptorBase {
public:
struct Properties {
using reluTy = ::mlir::BoolAttr;
reluTy relu;
auto getRelu() const {
auto &propStorage = this->relu;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelu(const ::mlir::BoolAttr &propValue) {
this->relu = propValue;
}
using rndTy = ::mlir::NVVM::FPRoundingModeAttr;
rndTy rnd;
auto getRnd() const {
auto &propStorage = this->rnd;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::FPRoundingModeAttr>(propStorage);
}
void setRnd(const ::mlir::NVVM::FPRoundingModeAttr &propValue) {
this->rnd = propValue;
}
using satTy = ::mlir::NVVM::SaturationModeAttr;
satTy sat;
auto getSat() const {
auto &propStorage = this->sat;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SaturationModeAttr>(propStorage);
}
void setSat(const ::mlir::NVVM::SaturationModeAttr &propValue) {
this->sat = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.relu == this->relu &&
rhs.rnd == this->rnd &&
rhs.sat == this->sat &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ConvertFloatToTF32OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.convert.float.to.tf32", odsAttrs.getContext());
}
ConvertFloatToTF32OpGenericAdaptorBase(ConvertFloatToTF32Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::FPRoundingModeAttr getRndAttr();
::mlir::NVVM::FPRoundingMode getRnd();
::mlir::NVVM::SaturationModeAttr getSatAttr();
::mlir::NVVM::SaturationMode getSat();
::mlir::BoolAttr getReluAttr();
bool getRelu();
};
} // namespace detail
template <typename RangeT>
class ConvertFloatToTF32OpGenericAdaptor : public detail::ConvertFloatToTF32OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ConvertFloatToTF32OpGenericAdaptorBase;
static constexpr int odsIndex_src = 0;
public:
ConvertFloatToTF32OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ConvertFloatToTF32OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConvertFloatToTF32OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ConvertFloatToTF32OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConvertFloatToTF32OpGenericAdaptor(values, attrs, Properties{}, {}) {}
ConvertFloatToTF32OpGenericAdaptor(RangeT values, const ConvertFloatToTF32OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ConvertFloatToTF32Op, typename = std::enable_if_t<std::is_same_v<LateInst, ConvertFloatToTF32Op>>>
ConvertFloatToTF32OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrc() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ConvertFloatToTF32OpAdaptor : public ConvertFloatToTF32OpGenericAdaptor<::mlir::ValueRange> {
public:
using ConvertFloatToTF32OpGenericAdaptor::ConvertFloatToTF32OpGenericAdaptor;
ConvertFloatToTF32OpAdaptor(ConvertFloatToTF32Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ConvertFloatToTF32Op : public ::mlir::Op<ConvertFloatToTF32Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ConvertFloatToTF32OpAdaptor;
template <typename RangeT>
using GenericAdaptor = ConvertFloatToTF32OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("relu"), ::llvm::StringRef("rnd"), ::llvm::StringRef("sat")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getReluAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getReluAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getRndAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getRndAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getSatAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getSatAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.convert.float.to.tf32");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::FloatType> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::FPRoundingModeAttr getRndAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::FPRoundingModeAttr>(getProperties().rnd);
}
::mlir::NVVM::FPRoundingMode getRnd();
::mlir::NVVM::SaturationModeAttr getSatAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SaturationModeAttr>(getProperties().sat);
}
::mlir::NVVM::SaturationMode getSat();
::mlir::BoolAttr getReluAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relu);
}
bool getRelu();
void setRndAttr(::mlir::NVVM::FPRoundingModeAttr attr) {
getProperties().rnd = attr;
}
void setRnd(::mlir::NVVM::FPRoundingMode attrValue);
void setSatAttr(::mlir::NVVM::SaturationModeAttr attr) {
getProperties().sat = attr;
}
void setSat(::mlir::NVVM::SaturationMode attrValue);
void setReluAttr(::mlir::BoolAttr attr) {
getProperties().relu = attr;
}
void setRelu(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertFloatToTF32Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertFloatToTF32Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value src, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertFloatToTF32Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value src, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertFloatToTF32Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value src, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertFloatToTF32Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static ConvertFloatToTF32Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr relu = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertFloatToTF32Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertFloatToTF32Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value src, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertFloatToTF32Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value src, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertFloatToTF32Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value src, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertFloatToTF32Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertFloatToTF32Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertFloatToTF32Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertFloatToTF32Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertFloatToTF32Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertFloatToTF32Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertFloatToTF32Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertFloatToTF32Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertFloatToTF32Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertFloatToTF32Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 3 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static llvm::Intrinsic::ID getIntrinsicID(NVVM::FPRoundingMode,
NVVM::SaturationMode,
bool hasRelu);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ConvertFloatToTF32Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ConvertFloatToTF32OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ConvertS2F6x2ToBF16x2Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ConvertS2F6x2ToBF16x2OpGenericAdaptorBase {
public:
struct Properties {
using reluTy = ::mlir::BoolAttr;
reluTy relu;
auto getRelu() const {
auto &propStorage = this->relu;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelu(const ::mlir::BoolAttr &propValue) {
this->relu = propValue;
}
using satTy = ::mlir::NVVM::SaturationModeAttr;
satTy sat;
auto getSat() const {
auto &propStorage = this->sat;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SaturationModeAttr>(propStorage);
}
void setSat(const ::mlir::NVVM::SaturationModeAttr &propValue) {
this->sat = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.relu == this->relu &&
rhs.sat == this->sat &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ConvertS2F6x2ToBF16x2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.convert.s2f6x2.to.bf16x2", odsAttrs.getContext());
}
ConvertS2F6x2ToBF16x2OpGenericAdaptorBase(ConvertS2F6x2ToBF16x2Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::SaturationModeAttr getSatAttr();
::mlir::NVVM::SaturationMode getSat();
::mlir::BoolAttr getReluAttr();
bool getRelu();
};
} // namespace detail
template <typename RangeT>
class ConvertS2F6x2ToBF16x2OpGenericAdaptor : public detail::ConvertS2F6x2ToBF16x2OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ConvertS2F6x2ToBF16x2OpGenericAdaptorBase;
static constexpr int odsIndex_src = 0;
static constexpr int odsIndex_scaleFactor = 1;
public:
ConvertS2F6x2ToBF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ConvertS2F6x2ToBF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConvertS2F6x2ToBF16x2OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ConvertS2F6x2ToBF16x2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConvertS2F6x2ToBF16x2OpGenericAdaptor(values, attrs, Properties{}, {}) {}
ConvertS2F6x2ToBF16x2OpGenericAdaptor(RangeT values, const ConvertS2F6x2ToBF16x2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ConvertS2F6x2ToBF16x2Op, typename = std::enable_if_t<std::is_same_v<LateInst, ConvertS2F6x2ToBF16x2Op>>>
ConvertS2F6x2ToBF16x2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrc() {
return (*getODSOperands(0).begin());
}
ValueT getScaleFactor() {
auto operands = getODSOperands(1);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ConvertS2F6x2ToBF16x2OpAdaptor : public ConvertS2F6x2ToBF16x2OpGenericAdaptor<::mlir::ValueRange> {
public:
using ConvertS2F6x2ToBF16x2OpGenericAdaptor::ConvertS2F6x2ToBF16x2OpGenericAdaptor;
ConvertS2F6x2ToBF16x2OpAdaptor(ConvertS2F6x2ToBF16x2Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ConvertS2F6x2ToBF16x2Op : public ::mlir::Op<ConvertS2F6x2ToBF16x2Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ConvertS2F6x2ToBF16x2OpAdaptor;
template <typename RangeT>
using GenericAdaptor = ConvertS2F6x2ToBF16x2OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src = 0;
static constexpr int odsIndex_scaleFactor = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("relu"), ::llvm::StringRef("sat")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getReluAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getReluAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getSatAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getSatAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.convert.s2f6x2.to.bf16x2");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getScaleFactor() {
auto operands = getODSOperands(1);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getScaleFactorMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getDst() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::SaturationModeAttr getSatAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SaturationModeAttr>(getProperties().sat);
}
::mlir::NVVM::SaturationMode getSat();
::mlir::BoolAttr getReluAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relu);
}
bool getRelu();
void setSatAttr(::mlir::NVVM::SaturationModeAttr attr) {
getProperties().sat = attr;
}
void setSat(::mlir::NVVM::SaturationMode attrValue);
void setReluAttr(::mlir::BoolAttr attr) {
getProperties().relu = attr;
}
void setRelu(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::NVVM::SaturationModeAttr sat, ::mlir::BoolAttr relu = nullptr);
static ConvertS2F6x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::NVVM::SaturationModeAttr sat, ::mlir::BoolAttr relu = nullptr);
static ConvertS2F6x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::NVVM::SaturationModeAttr sat, ::mlir::BoolAttr relu = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::NVVM::SaturationModeAttr sat, ::mlir::BoolAttr relu = nullptr);
static ConvertS2F6x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::NVVM::SaturationModeAttr sat, ::mlir::BoolAttr relu = nullptr);
static ConvertS2F6x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::NVVM::SaturationModeAttr sat, ::mlir::BoolAttr relu = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertS2F6x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertS2F6x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertS2F6x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static ConvertS2F6x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, /*optional*/::mlir::Value scaleFactor, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool relu = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertS2F6x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ConvertS2F6x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertS2F6x2ToBF16x2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ConvertS2F6x2ToBF16x2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ConvertS2F6x2ToBF16x2Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ConvertS2F6x2ToBF16x2OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::CosOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class CosOpGenericAdaptorBase {
public:
struct Properties {
using ftzTy = ::mlir::BoolAttr;
ftzTy ftz;
auto getFtz() const {
auto &propStorage = this->ftz;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setFtz(const ::mlir::BoolAttr &propValue) {
this->ftz = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.ftz == this->ftz &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
CosOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.cos", odsAttrs.getContext());
}
CosOpGenericAdaptorBase(CosOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::BoolAttr getFtzAttr();
bool getFtz();
};
} // namespace detail
template <typename RangeT>
class CosOpGenericAdaptor : public detail::CosOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::CosOpGenericAdaptorBase;
static constexpr int odsIndex_src = 0;
public:
CosOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
CosOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CosOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
CosOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CosOpGenericAdaptor(values, attrs, Properties{}, {}) {}
CosOpGenericAdaptor(RangeT values, const CosOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = CosOp, typename = std::enable_if_t<std::is_same_v<LateInst, CosOp>>>
CosOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrc() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class CosOpAdaptor : public CosOpGenericAdaptor<::mlir::ValueRange> {
public:
using CosOpGenericAdaptor::CosOpGenericAdaptor;
CosOpAdaptor(CosOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class CosOp : public ::mlir::Op<CosOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::FloatType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = CosOpAdaptor;
template <typename RangeT>
using GenericAdaptor = CosOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("ftz")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getFtzAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getFtzAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.cos");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::FloatType> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::FloatType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::BoolAttr getFtzAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().ftz);
}
bool getFtz();
void setFtzAttr(::mlir::BoolAttr attr) {
getProperties().ftz = attr;
}
void setFtz(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::BoolAttr ftz);
static CosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::BoolAttr ftz);
static CosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::BoolAttr ftz);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value src, ::mlir::BoolAttr ftz);
static CosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value src, ::mlir::BoolAttr ftz);
static CosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value src, ::mlir::BoolAttr ftz);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr ftz);
static CosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr ftz);
static CosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr ftz);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, bool ftz = false);
static CosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, bool ftz = false);
static CosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, bool ftz = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value src, bool ftz = false);
static CosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value src, bool ftz = false);
static CosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value src, bool ftz = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool ftz = false);
static CosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool ftz = false);
static CosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool ftz = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::CosOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::CosOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::CpAsyncBulkCommitGroupOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class CpAsyncBulkCommitGroupOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
CpAsyncBulkCommitGroupOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.cp.async.bulk.commit.group", odsAttrs.getContext());
}
CpAsyncBulkCommitGroupOpGenericAdaptorBase(CpAsyncBulkCommitGroupOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class CpAsyncBulkCommitGroupOpGenericAdaptor : public detail::CpAsyncBulkCommitGroupOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::CpAsyncBulkCommitGroupOpGenericAdaptorBase;
public:
CpAsyncBulkCommitGroupOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
CpAsyncBulkCommitGroupOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CpAsyncBulkCommitGroupOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
CpAsyncBulkCommitGroupOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CpAsyncBulkCommitGroupOpGenericAdaptor(values, attrs, Properties{}, {}) {}
CpAsyncBulkCommitGroupOpGenericAdaptor(RangeT values, const CpAsyncBulkCommitGroupOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = CpAsyncBulkCommitGroupOp, typename = std::enable_if_t<std::is_same_v<LateInst, CpAsyncBulkCommitGroupOp>>>
CpAsyncBulkCommitGroupOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class CpAsyncBulkCommitGroupOpAdaptor : public CpAsyncBulkCommitGroupOpGenericAdaptor<::mlir::ValueRange> {
public:
using CpAsyncBulkCommitGroupOpGenericAdaptor::CpAsyncBulkCommitGroupOpGenericAdaptor;
CpAsyncBulkCommitGroupOpAdaptor(CpAsyncBulkCommitGroupOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class CpAsyncBulkCommitGroupOp : public ::mlir::Op<CpAsyncBulkCommitGroupOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants> {
public:
using Op::Op;
using Op::print;
using Adaptor = CpAsyncBulkCommitGroupOpAdaptor;
template <typename RangeT>
using GenericAdaptor = CpAsyncBulkCommitGroupOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.cp.async.bulk.commit.group");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static CpAsyncBulkCommitGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location);
static CpAsyncBulkCommitGroupOp create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static CpAsyncBulkCommitGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static CpAsyncBulkCommitGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncBulkCommitGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncBulkCommitGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncBulkCommitGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncBulkCommitGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::CpAsyncBulkCommitGroupOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::CpAsyncBulkGlobalToSharedClusterOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class CpAsyncBulkGlobalToSharedClusterOpGenericAdaptorBase {
public:
struct Properties {
using operandSegmentSizesTy = std::array<int32_t, 6>;
operandSegmentSizesTy operandSegmentSizes;
::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
auto &propStorage = this->operandSegmentSizes;
return propStorage;
}
void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
auto &propStorage = this->operandSegmentSizes;
::llvm::copy(propValue, propStorage.begin());
}
bool operator==(const Properties &rhs) const {
return
rhs.operandSegmentSizes == this->operandSegmentSizes &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
CpAsyncBulkGlobalToSharedClusterOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.cp.async.bulk.shared.cluster.global", odsAttrs.getContext());
}
CpAsyncBulkGlobalToSharedClusterOpGenericAdaptorBase(CpAsyncBulkGlobalToSharedClusterOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class CpAsyncBulkGlobalToSharedClusterOpGenericAdaptor : public detail::CpAsyncBulkGlobalToSharedClusterOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::CpAsyncBulkGlobalToSharedClusterOpGenericAdaptorBase;
static constexpr int odsIndex_dstMem = 0;
static constexpr int odsIndex_srcMem = 1;
static constexpr int odsIndex_mbar = 2;
static constexpr int odsIndex_size = 3;
static constexpr int odsIndex_multicastMask = 4;
static constexpr int odsIndex_l2CacheHint = 5;
public:
CpAsyncBulkGlobalToSharedClusterOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
CpAsyncBulkGlobalToSharedClusterOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CpAsyncBulkGlobalToSharedClusterOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
CpAsyncBulkGlobalToSharedClusterOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : CpAsyncBulkGlobalToSharedClusterOpGenericAdaptor(values, attrs, Properties{}, {}) {}
CpAsyncBulkGlobalToSharedClusterOpGenericAdaptor(RangeT values, const CpAsyncBulkGlobalToSharedClusterOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = CpAsyncBulkGlobalToSharedClusterOp, typename = std::enable_if_t<std::is_same_v<LateInst, CpAsyncBulkGlobalToSharedClusterOp>>>
CpAsyncBulkGlobalToSharedClusterOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getDstMem() {
return (*getODSOperands(0).begin());
}
ValueT getSrcMem() {
return (*getODSOperands(1).begin());
}
ValueT getMbar() {
return (*getODSOperands(2).begin());
}
ValueT getSize() {
return (*getODSOperands(3).begin());
}
ValueT getMulticastMask() {
auto operands = getODSOperands(4);
return operands.empty() ? ValueT{} : (*operands.begin());
}
ValueT getL2CacheHint() {
auto operands = getODSOperands(5);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class CpAsyncBulkGlobalToSharedClusterOpAdaptor : public CpAsyncBulkGlobalToSharedClusterOpGenericAdaptor<::mlir::ValueRange> {
public:
using CpAsyncBulkGlobalToSharedClusterOpGenericAdaptor::CpAsyncBulkGlobalToSharedClusterOpGenericAdaptor;
CpAsyncBulkGlobalToSharedClusterOpAdaptor(CpAsyncBulkGlobalToSharedClusterOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class CpAsyncBulkGlobalToSharedClusterOp : public ::mlir::Op<CpAsyncBulkGlobalToSharedClusterOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<4>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = CpAsyncBulkGlobalToSharedClusterOpAdaptor;
template <typename RangeT>
using GenericAdaptor = CpAsyncBulkGlobalToSharedClusterOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_dstMem = 0;
static constexpr int odsIndex_srcMem = 1;
static constexpr int odsIndex_mbar = 2;
static constexpr int odsIndex_size = 3;
static constexpr int odsIndex_multicastMask = 4;
static constexpr int odsIndex_l2CacheHint = 5;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("operandSegmentSizes")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getOperandSegmentSizesAttrName() {
return (*this)->getName().getAttributeNames().back();
}
static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
return name.getAttributeNames().back();
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.cp.async.bulk.shared.cluster.global");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getDstMem() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getSrcMem() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getMbar() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(2).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getSize() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getMulticastMask() {
auto operands = getODSOperands(4);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::TypedValue<::mlir::IntegerType> getL2CacheHint() {
auto operands = getODSOperands(5);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getDstMemMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSrcMemMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getMbarMutable() {
auto range = getODSOperandIndexAndLength(2);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSizeMutable() {
auto range = getODSOperandIndexAndLength(3);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getMulticastMaskMutable();
::mlir::MutableOperandRange getL2CacheHintMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dstMem, ::mlir::Value srcMem, ::mlir::Value mbar, ::mlir::Value size, /*optional*/::mlir::Value multicastMask, /*optional*/::mlir::Value l2CacheHint);
static CpAsyncBulkGlobalToSharedClusterOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dstMem, ::mlir::Value srcMem, ::mlir::Value mbar, ::mlir::Value size, /*optional*/::mlir::Value multicastMask, /*optional*/::mlir::Value l2CacheHint);
static CpAsyncBulkGlobalToSharedClusterOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dstMem, ::mlir::Value srcMem, ::mlir::Value mbar, ::mlir::Value size, /*optional*/::mlir::Value multicastMask, /*optional*/::mlir::Value l2CacheHint);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dstMem, ::mlir::Value srcMem, ::mlir::Value mbar, ::mlir::Value size, /*optional*/::mlir::Value multicastMask, /*optional*/::mlir::Value l2CacheHint);
static CpAsyncBulkGlobalToSharedClusterOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dstMem, ::mlir::Value srcMem, ::mlir::Value mbar, ::mlir::Value size, /*optional*/::mlir::Value multicastMask, /*optional*/::mlir::Value l2CacheHint);
static CpAsyncBulkGlobalToSharedClusterOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dstMem, ::mlir::Value srcMem, ::mlir::Value mbar, ::mlir::Value size, /*optional*/::mlir::Value multicastMask, /*optional*/::mlir::Value l2CacheHint);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncBulkGlobalToSharedClusterOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncBulkGlobalToSharedClusterOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncBulkGlobalToSharedClusterOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncBulkGlobalToSharedClusterOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
return {};
}
public:
static mlir::NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase& builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::CpAsyncBulkGlobalToSharedClusterOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::CpAsyncBulkGlobalToSharedClusterOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::CpAsyncBulkPrefetchOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class CpAsyncBulkPrefetchOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
CpAsyncBulkPrefetchOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.cp.async.bulk.prefetch", odsAttrs.getContext());
}
CpAsyncBulkPrefetchOpGenericAdaptorBase(CpAsyncBulkPrefetchOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class CpAsyncBulkPrefetchOpGenericAdaptor : public detail::CpAsyncBulkPrefetchOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::CpAsyncBulkPrefetchOpGenericAdaptorBase;
static constexpr int odsIndex_srcMem = 0;
static constexpr int odsIndex_size = 1;
static constexpr int odsIndex_l2CacheHint = 2;
public:
CpAsyncBulkPrefetchOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
CpAsyncBulkPrefetchOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CpAsyncBulkPrefetchOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
CpAsyncBulkPrefetchOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CpAsyncBulkPrefetchOpGenericAdaptor(values, attrs, Properties{}, {}) {}
CpAsyncBulkPrefetchOpGenericAdaptor(RangeT values, const CpAsyncBulkPrefetchOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = CpAsyncBulkPrefetchOp, typename = std::enable_if_t<std::is_same_v<LateInst, CpAsyncBulkPrefetchOp>>>
CpAsyncBulkPrefetchOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrcMem() {
return (*getODSOperands(0).begin());
}
ValueT getSize() {
return (*getODSOperands(1).begin());
}
ValueT getL2CacheHint() {
auto operands = getODSOperands(2);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class CpAsyncBulkPrefetchOpAdaptor : public CpAsyncBulkPrefetchOpGenericAdaptor<::mlir::ValueRange> {
public:
using CpAsyncBulkPrefetchOpGenericAdaptor::CpAsyncBulkPrefetchOpGenericAdaptor;
CpAsyncBulkPrefetchOpAdaptor(CpAsyncBulkPrefetchOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class CpAsyncBulkPrefetchOp : public ::mlir::Op<CpAsyncBulkPrefetchOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::OpInvariants> {
public:
using Op::Op;
using Op::print;
using Adaptor = CpAsyncBulkPrefetchOpAdaptor;
template <typename RangeT>
using GenericAdaptor = CpAsyncBulkPrefetchOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_srcMem = 0;
static constexpr int odsIndex_size = 1;
static constexpr int odsIndex_l2CacheHint = 2;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.cp.async.bulk.prefetch");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getSrcMem() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getSize() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getL2CacheHint() {
auto operands = getODSOperands(2);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getSrcMemMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSizeMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getL2CacheHintMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value srcMem, ::mlir::Value size, /*optional*/::mlir::Value l2CacheHint);
static CpAsyncBulkPrefetchOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value srcMem, ::mlir::Value size, /*optional*/::mlir::Value l2CacheHint);
static CpAsyncBulkPrefetchOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value srcMem, ::mlir::Value size, /*optional*/::mlir::Value l2CacheHint);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value srcMem, ::mlir::Value size, /*optional*/::mlir::Value l2CacheHint);
static CpAsyncBulkPrefetchOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value srcMem, ::mlir::Value size, /*optional*/::mlir::Value l2CacheHint);
static CpAsyncBulkPrefetchOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value srcMem, ::mlir::Value size, /*optional*/::mlir::Value l2CacheHint);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncBulkPrefetchOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncBulkPrefetchOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncBulkPrefetchOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncBulkPrefetchOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::CpAsyncBulkPrefetchOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::CpAsyncBulkSharedCTAToGlobalOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class CpAsyncBulkSharedCTAToGlobalOpGenericAdaptorBase {
public:
struct Properties {
using operandSegmentSizesTy = std::array<int32_t, 5>;
operandSegmentSizesTy operandSegmentSizes;
::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
auto &propStorage = this->operandSegmentSizes;
return propStorage;
}
void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
auto &propStorage = this->operandSegmentSizes;
::llvm::copy(propValue, propStorage.begin());
}
bool operator==(const Properties &rhs) const {
return
rhs.operandSegmentSizes == this->operandSegmentSizes &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
CpAsyncBulkSharedCTAToGlobalOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.cp.async.bulk.global.shared.cta", odsAttrs.getContext());
}
CpAsyncBulkSharedCTAToGlobalOpGenericAdaptorBase(CpAsyncBulkSharedCTAToGlobalOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class CpAsyncBulkSharedCTAToGlobalOpGenericAdaptor : public detail::CpAsyncBulkSharedCTAToGlobalOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::CpAsyncBulkSharedCTAToGlobalOpGenericAdaptorBase;
static constexpr int odsIndex_dstMem = 0;
static constexpr int odsIndex_srcMem = 1;
static constexpr int odsIndex_size = 2;
static constexpr int odsIndex_l2CacheHint = 3;
static constexpr int odsIndex_byteMask = 4;
public:
CpAsyncBulkSharedCTAToGlobalOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
CpAsyncBulkSharedCTAToGlobalOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CpAsyncBulkSharedCTAToGlobalOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
CpAsyncBulkSharedCTAToGlobalOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : CpAsyncBulkSharedCTAToGlobalOpGenericAdaptor(values, attrs, Properties{}, {}) {}
CpAsyncBulkSharedCTAToGlobalOpGenericAdaptor(RangeT values, const CpAsyncBulkSharedCTAToGlobalOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = CpAsyncBulkSharedCTAToGlobalOp, typename = std::enable_if_t<std::is_same_v<LateInst, CpAsyncBulkSharedCTAToGlobalOp>>>
CpAsyncBulkSharedCTAToGlobalOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getDstMem() {
return (*getODSOperands(0).begin());
}
ValueT getSrcMem() {
return (*getODSOperands(1).begin());
}
ValueT getSize() {
return (*getODSOperands(2).begin());
}
ValueT getL2CacheHint() {
auto operands = getODSOperands(3);
return operands.empty() ? ValueT{} : (*operands.begin());
}
ValueT getByteMask() {
auto operands = getODSOperands(4);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class CpAsyncBulkSharedCTAToGlobalOpAdaptor : public CpAsyncBulkSharedCTAToGlobalOpGenericAdaptor<::mlir::ValueRange> {
public:
using CpAsyncBulkSharedCTAToGlobalOpGenericAdaptor::CpAsyncBulkSharedCTAToGlobalOpGenericAdaptor;
CpAsyncBulkSharedCTAToGlobalOpAdaptor(CpAsyncBulkSharedCTAToGlobalOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class CpAsyncBulkSharedCTAToGlobalOp : public ::mlir::Op<CpAsyncBulkSharedCTAToGlobalOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<3>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = CpAsyncBulkSharedCTAToGlobalOpAdaptor;
template <typename RangeT>
using GenericAdaptor = CpAsyncBulkSharedCTAToGlobalOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_dstMem = 0;
static constexpr int odsIndex_srcMem = 1;
static constexpr int odsIndex_size = 2;
static constexpr int odsIndex_l2CacheHint = 3;
static constexpr int odsIndex_byteMask = 4;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("operandSegmentSizes")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getOperandSegmentSizesAttrName() {
return (*this)->getName().getAttributeNames().back();
}
static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
return name.getAttributeNames().back();
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.cp.async.bulk.global.shared.cta");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getDstMem() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getSrcMem() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getSize() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getL2CacheHint() {
auto operands = getODSOperands(3);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::TypedValue<::mlir::IntegerType> getByteMask() {
auto operands = getODSOperands(4);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getDstMemMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSrcMemMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSizeMutable() {
auto range = getODSOperandIndexAndLength(2);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getL2CacheHintMutable();
::mlir::MutableOperandRange getByteMaskMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dstMem, ::mlir::Value srcMem, ::mlir::Value size, /*optional*/::mlir::Value l2CacheHint, /*optional*/::mlir::Value byteMask);
static CpAsyncBulkSharedCTAToGlobalOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dstMem, ::mlir::Value srcMem, ::mlir::Value size, /*optional*/::mlir::Value l2CacheHint, /*optional*/::mlir::Value byteMask);
static CpAsyncBulkSharedCTAToGlobalOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dstMem, ::mlir::Value srcMem, ::mlir::Value size, /*optional*/::mlir::Value l2CacheHint, /*optional*/::mlir::Value byteMask);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dstMem, ::mlir::Value srcMem, ::mlir::Value size, /*optional*/::mlir::Value l2CacheHint, /*optional*/::mlir::Value byteMask);
static CpAsyncBulkSharedCTAToGlobalOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dstMem, ::mlir::Value srcMem, ::mlir::Value size, /*optional*/::mlir::Value l2CacheHint, /*optional*/::mlir::Value byteMask);
static CpAsyncBulkSharedCTAToGlobalOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dstMem, ::mlir::Value srcMem, ::mlir::Value size, /*optional*/::mlir::Value l2CacheHint, /*optional*/::mlir::Value byteMask);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncBulkSharedCTAToGlobalOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncBulkSharedCTAToGlobalOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncBulkSharedCTAToGlobalOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncBulkSharedCTAToGlobalOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
return {};
}
public:
static mlir::NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase& builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::CpAsyncBulkSharedCTAToGlobalOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::CpAsyncBulkSharedCTAToGlobalOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::CpAsyncBulkSharedCTAToSharedClusterOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class CpAsyncBulkSharedCTAToSharedClusterOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
CpAsyncBulkSharedCTAToSharedClusterOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.cp.async.bulk.shared.cluster.shared.cta", odsAttrs.getContext());
}
CpAsyncBulkSharedCTAToSharedClusterOpGenericAdaptorBase(CpAsyncBulkSharedCTAToSharedClusterOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class CpAsyncBulkSharedCTAToSharedClusterOpGenericAdaptor : public detail::CpAsyncBulkSharedCTAToSharedClusterOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::CpAsyncBulkSharedCTAToSharedClusterOpGenericAdaptorBase;
static constexpr int odsIndex_dstMem = 0;
static constexpr int odsIndex_srcMem = 1;
static constexpr int odsIndex_mbar = 2;
static constexpr int odsIndex_size = 3;
public:
CpAsyncBulkSharedCTAToSharedClusterOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
CpAsyncBulkSharedCTAToSharedClusterOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CpAsyncBulkSharedCTAToSharedClusterOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
CpAsyncBulkSharedCTAToSharedClusterOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CpAsyncBulkSharedCTAToSharedClusterOpGenericAdaptor(values, attrs, Properties{}, {}) {}
CpAsyncBulkSharedCTAToSharedClusterOpGenericAdaptor(RangeT values, const CpAsyncBulkSharedCTAToSharedClusterOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = CpAsyncBulkSharedCTAToSharedClusterOp, typename = std::enable_if_t<std::is_same_v<LateInst, CpAsyncBulkSharedCTAToSharedClusterOp>>>
CpAsyncBulkSharedCTAToSharedClusterOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getDstMem() {
return (*getODSOperands(0).begin());
}
ValueT getSrcMem() {
return (*getODSOperands(1).begin());
}
ValueT getMbar() {
return (*getODSOperands(2).begin());
}
ValueT getSize() {
return (*getODSOperands(3).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class CpAsyncBulkSharedCTAToSharedClusterOpAdaptor : public CpAsyncBulkSharedCTAToSharedClusterOpGenericAdaptor<::mlir::ValueRange> {
public:
using CpAsyncBulkSharedCTAToSharedClusterOpGenericAdaptor::CpAsyncBulkSharedCTAToSharedClusterOpGenericAdaptor;
CpAsyncBulkSharedCTAToSharedClusterOpAdaptor(CpAsyncBulkSharedCTAToSharedClusterOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class CpAsyncBulkSharedCTAToSharedClusterOp : public ::mlir::Op<CpAsyncBulkSharedCTAToSharedClusterOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants> {
public:
using Op::Op;
using Op::print;
using Adaptor = CpAsyncBulkSharedCTAToSharedClusterOpAdaptor;
template <typename RangeT>
using GenericAdaptor = CpAsyncBulkSharedCTAToSharedClusterOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_dstMem = 0;
static constexpr int odsIndex_srcMem = 1;
static constexpr int odsIndex_mbar = 2;
static constexpr int odsIndex_size = 3;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.cp.async.bulk.shared.cluster.shared.cta");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getDstMem() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getSrcMem() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getMbar() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(2).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getSize() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin());
}
::mlir::OpOperand &getDstMemMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSrcMemMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getMbarMutable() {
auto range = getODSOperandIndexAndLength(2);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSizeMutable() {
auto range = getODSOperandIndexAndLength(3);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dstMem, ::mlir::Value srcMem, ::mlir::Value mbar, ::mlir::Value size);
static CpAsyncBulkSharedCTAToSharedClusterOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dstMem, ::mlir::Value srcMem, ::mlir::Value mbar, ::mlir::Value size);
static CpAsyncBulkSharedCTAToSharedClusterOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dstMem, ::mlir::Value srcMem, ::mlir::Value mbar, ::mlir::Value size);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dstMem, ::mlir::Value srcMem, ::mlir::Value mbar, ::mlir::Value size);
static CpAsyncBulkSharedCTAToSharedClusterOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dstMem, ::mlir::Value srcMem, ::mlir::Value mbar, ::mlir::Value size);
static CpAsyncBulkSharedCTAToSharedClusterOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dstMem, ::mlir::Value srcMem, ::mlir::Value mbar, ::mlir::Value size);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncBulkSharedCTAToSharedClusterOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncBulkSharedCTAToSharedClusterOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncBulkSharedCTAToSharedClusterOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncBulkSharedCTAToSharedClusterOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::CpAsyncBulkSharedCTAToSharedClusterOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::CpAsyncBulkTensorGlobalToSharedClusterOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class CpAsyncBulkTensorGlobalToSharedClusterOpGenericAdaptorBase {
public:
struct Properties {
using groupTy = ::mlir::NVVM::CTAGroupKindAttr;
groupTy group;
auto getGroup() const {
auto &propStorage = this->group;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::CTAGroupKindAttr>(propStorage);
}
void setGroup(const ::mlir::NVVM::CTAGroupKindAttr &propValue) {
this->group = propValue;
}
using isCTAOnlyTy = ::mlir::BoolAttr;
isCTAOnlyTy isCTAOnly;
auto getIsCTAOnly() const {
auto &propStorage = this->isCTAOnly;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setIsCTAOnly(const ::mlir::BoolAttr &propValue) {
this->isCTAOnly = propValue;
}
using modeTy = ::mlir::NVVM::TMALoadModeAttr;
modeTy mode;
auto getMode() const {
auto &propStorage = this->mode;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::TMALoadModeAttr>(propStorage);
}
void setMode(const ::mlir::NVVM::TMALoadModeAttr &propValue) {
this->mode = propValue;
}
using operandSegmentSizesTy = std::array<int32_t, 8>;
operandSegmentSizesTy operandSegmentSizes;
::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
auto &propStorage = this->operandSegmentSizes;
return propStorage;
}
void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
auto &propStorage = this->operandSegmentSizes;
::llvm::copy(propValue, propStorage.begin());
}
bool operator==(const Properties &rhs) const {
return
rhs.group == this->group &&
rhs.isCTAOnly == this->isCTAOnly &&
rhs.mode == this->mode &&
rhs.operandSegmentSizes == this->operandSegmentSizes &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
CpAsyncBulkTensorGlobalToSharedClusterOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.cp.async.bulk.tensor.shared.cluster.global", odsAttrs.getContext());
}
CpAsyncBulkTensorGlobalToSharedClusterOpGenericAdaptorBase(CpAsyncBulkTensorGlobalToSharedClusterOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::TMALoadModeAttr getModeAttr();
::mlir::NVVM::TMALoadMode getMode();
::mlir::BoolAttr getIsCTAOnlyAttr();
bool getIsCTAOnly();
::mlir::NVVM::CTAGroupKindAttr getGroupAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::NVVM::CTAGroupKindAttr>(getProperties().group);
return attr;
}
::std::optional<::mlir::NVVM::CTAGroupKind> getGroup();
};
} // namespace detail
template <typename RangeT>
class CpAsyncBulkTensorGlobalToSharedClusterOpGenericAdaptor : public detail::CpAsyncBulkTensorGlobalToSharedClusterOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::CpAsyncBulkTensorGlobalToSharedClusterOpGenericAdaptorBase;
static constexpr int odsIndex_dstMem = 0;
static constexpr int odsIndex_tmaDescriptor = 1;
static constexpr int odsIndex_coordinates = 2;
static constexpr int odsIndex_mbar = 3;
static constexpr int odsIndex_im2colOffsets = 4;
static constexpr int odsIndex_multicastMask = 5;
static constexpr int odsIndex_l2CacheHint = 6;
static constexpr int odsIndex_predicate = 7;
public:
CpAsyncBulkTensorGlobalToSharedClusterOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
CpAsyncBulkTensorGlobalToSharedClusterOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CpAsyncBulkTensorGlobalToSharedClusterOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
CpAsyncBulkTensorGlobalToSharedClusterOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : CpAsyncBulkTensorGlobalToSharedClusterOpGenericAdaptor(values, attrs, Properties{}, {}) {}
CpAsyncBulkTensorGlobalToSharedClusterOpGenericAdaptor(RangeT values, const CpAsyncBulkTensorGlobalToSharedClusterOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = CpAsyncBulkTensorGlobalToSharedClusterOp, typename = std::enable_if_t<std::is_same_v<LateInst, CpAsyncBulkTensorGlobalToSharedClusterOp>>>
CpAsyncBulkTensorGlobalToSharedClusterOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getDstMem() {
return (*getODSOperands(0).begin());
}
ValueT getTmaDescriptor() {
return (*getODSOperands(1).begin());
}
RangeT getCoordinates() {
return getODSOperands(2);
}
ValueT getMbar() {
return (*getODSOperands(3).begin());
}
RangeT getIm2colOffsets() {
return getODSOperands(4);
}
ValueT getMulticastMask() {
auto operands = getODSOperands(5);
return operands.empty() ? ValueT{} : (*operands.begin());
}
ValueT getL2CacheHint() {
auto operands = getODSOperands(6);
return operands.empty() ? ValueT{} : (*operands.begin());
}
ValueT getPredicate() {
auto operands = getODSOperands(7);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class CpAsyncBulkTensorGlobalToSharedClusterOpAdaptor : public CpAsyncBulkTensorGlobalToSharedClusterOpGenericAdaptor<::mlir::ValueRange> {
public:
using CpAsyncBulkTensorGlobalToSharedClusterOpGenericAdaptor::CpAsyncBulkTensorGlobalToSharedClusterOpGenericAdaptor;
CpAsyncBulkTensorGlobalToSharedClusterOpAdaptor(CpAsyncBulkTensorGlobalToSharedClusterOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class CpAsyncBulkTensorGlobalToSharedClusterOp : public ::mlir::Op<CpAsyncBulkTensorGlobalToSharedClusterOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<3>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::NVVM::BasicPtxBuilderInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<900>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = CpAsyncBulkTensorGlobalToSharedClusterOpAdaptor;
template <typename RangeT>
using GenericAdaptor = CpAsyncBulkTensorGlobalToSharedClusterOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_dstMem = 0;
static constexpr int odsIndex_tmaDescriptor = 1;
static constexpr int odsIndex_coordinates = 2;
static constexpr int odsIndex_mbar = 3;
static constexpr int odsIndex_im2colOffsets = 4;
static constexpr int odsIndex_multicastMask = 5;
static constexpr int odsIndex_l2CacheHint = 6;
static constexpr int odsIndex_predicate = 7;
using Properties = FoldAdaptor::Properties;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<CpAsyncBulkTensorGlobalToSharedClusterOp>::getPredicate;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<CpAsyncBulkTensorGlobalToSharedClusterOp>::hasIntrinsic;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<CpAsyncBulkTensorGlobalToSharedClusterOp>::hasSideEffect;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<CpAsyncBulkTensorGlobalToSharedClusterOp>::makeConstantI32;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<CpAsyncBulkTensorGlobalToSharedClusterOp>::getAsmValues;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("group"), ::llvm::StringRef("isCTAOnly"), ::llvm::StringRef("mode"), ::llvm::StringRef("operandSegmentSizes")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getGroupAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getGroupAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getIsCTAOnlyAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getIsCTAOnlyAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getModeAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getModeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
::mlir::StringAttr getOperandSegmentSizesAttrName() {
return (*this)->getName().getAttributeNames().back();
}
static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
return name.getAttributeNames().back();
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.cp.async.bulk.tensor.shared.cluster.global");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getDstMem() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getTmaDescriptor() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(1).begin());
}
::mlir::Operation::operand_range getCoordinates() {
return getODSOperands(2);
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getMbar() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(3).begin());
}
::mlir::Operation::operand_range getIm2colOffsets() {
return getODSOperands(4);
}
::mlir::TypedValue<::mlir::IntegerType> getMulticastMask() {
auto operands = getODSOperands(5);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::TypedValue<::mlir::IntegerType> getL2CacheHint() {
auto operands = getODSOperands(6);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::TypedValue<::mlir::IntegerType> getPredicate() {
auto operands = getODSOperands(7);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getDstMemMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getTmaDescriptorMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getCoordinatesMutable();
::mlir::OpOperand &getMbarMutable() {
auto range = getODSOperandIndexAndLength(3);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getIm2colOffsetsMutable();
::mlir::MutableOperandRange getMulticastMaskMutable();
::mlir::MutableOperandRange getL2CacheHintMutable();
::mlir::MutableOperandRange getPredicateMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::TMALoadModeAttr getModeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::TMALoadModeAttr>(getProperties().mode);
}
::mlir::NVVM::TMALoadMode getMode();
::mlir::BoolAttr getIsCTAOnlyAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().isCTAOnly);
}
bool getIsCTAOnly();
::mlir::NVVM::CTAGroupKindAttr getGroupAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::CTAGroupKindAttr>(getProperties().group);
}
::std::optional<::mlir::NVVM::CTAGroupKind> getGroup();
void setModeAttr(::mlir::NVVM::TMALoadModeAttr attr) {
getProperties().mode = attr;
}
void setMode(::mlir::NVVM::TMALoadMode attrValue);
void setIsCTAOnlyAttr(::mlir::BoolAttr attr) {
getProperties().isCTAOnly = attr;
}
void setIsCTAOnly(bool attrValue);
void setGroupAttr(::mlir::NVVM::CTAGroupKindAttr attr) {
getProperties().group = attr;
}
void setGroup(::std::optional<::mlir::NVVM::CTAGroupKind> attrValue);
::mlir::Attribute removeGroupAttr() {
auto attr = getProperties().group;
getProperties().group = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dstMem, ::mlir::Value tmaDescriptor, ::mlir::ValueRange coordinates, ::mlir::Value mbar, ::mlir::ValueRange im2colOffsets, /*optional*/::mlir::Value multicastMask, /*optional*/::mlir::Value l2CacheHint, ::mlir::NVVM::TMALoadModeAttr mode, ::mlir::BoolAttr isCTAOnly, /*optional*/::mlir::NVVM::CTAGroupKindAttr group, /*optional*/::mlir::Value predicate);
static CpAsyncBulkTensorGlobalToSharedClusterOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dstMem, ::mlir::Value tmaDescriptor, ::mlir::ValueRange coordinates, ::mlir::Value mbar, ::mlir::ValueRange im2colOffsets, /*optional*/::mlir::Value multicastMask, /*optional*/::mlir::Value l2CacheHint, ::mlir::NVVM::TMALoadModeAttr mode, ::mlir::BoolAttr isCTAOnly, /*optional*/::mlir::NVVM::CTAGroupKindAttr group, /*optional*/::mlir::Value predicate);
static CpAsyncBulkTensorGlobalToSharedClusterOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dstMem, ::mlir::Value tmaDescriptor, ::mlir::ValueRange coordinates, ::mlir::Value mbar, ::mlir::ValueRange im2colOffsets, /*optional*/::mlir::Value multicastMask, /*optional*/::mlir::Value l2CacheHint, ::mlir::NVVM::TMALoadModeAttr mode, ::mlir::BoolAttr isCTAOnly, /*optional*/::mlir::NVVM::CTAGroupKindAttr group, /*optional*/::mlir::Value predicate);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dstMem, ::mlir::Value tmaDescriptor, ::mlir::ValueRange coordinates, ::mlir::Value mbar, ::mlir::ValueRange im2colOffsets, /*optional*/::mlir::Value multicastMask, /*optional*/::mlir::Value l2CacheHint, ::mlir::NVVM::TMALoadModeAttr mode, ::mlir::BoolAttr isCTAOnly, /*optional*/::mlir::NVVM::CTAGroupKindAttr group, /*optional*/::mlir::Value predicate);
static CpAsyncBulkTensorGlobalToSharedClusterOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dstMem, ::mlir::Value tmaDescriptor, ::mlir::ValueRange coordinates, ::mlir::Value mbar, ::mlir::ValueRange im2colOffsets, /*optional*/::mlir::Value multicastMask, /*optional*/::mlir::Value l2CacheHint, ::mlir::NVVM::TMALoadModeAttr mode, ::mlir::BoolAttr isCTAOnly, /*optional*/::mlir::NVVM::CTAGroupKindAttr group, /*optional*/::mlir::Value predicate);
static CpAsyncBulkTensorGlobalToSharedClusterOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dstMem, ::mlir::Value tmaDescriptor, ::mlir::ValueRange coordinates, ::mlir::Value mbar, ::mlir::ValueRange im2colOffsets, /*optional*/::mlir::Value multicastMask, /*optional*/::mlir::Value l2CacheHint, ::mlir::NVVM::TMALoadModeAttr mode, ::mlir::BoolAttr isCTAOnly, /*optional*/::mlir::NVVM::CTAGroupKindAttr group, /*optional*/::mlir::Value predicate);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dstMem, ::mlir::Value tmaDescriptor, ::mlir::ValueRange coordinates, ::mlir::Value mbar, ::mlir::ValueRange im2colOffsets, /*optional*/::mlir::Value multicastMask, /*optional*/::mlir::Value l2CacheHint, ::mlir::NVVM::TMALoadMode mode, bool isCTAOnly, /*optional*/::mlir::NVVM::CTAGroupKindAttr group, /*optional*/::mlir::Value predicate);
static CpAsyncBulkTensorGlobalToSharedClusterOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dstMem, ::mlir::Value tmaDescriptor, ::mlir::ValueRange coordinates, ::mlir::Value mbar, ::mlir::ValueRange im2colOffsets, /*optional*/::mlir::Value multicastMask, /*optional*/::mlir::Value l2CacheHint, ::mlir::NVVM::TMALoadMode mode, bool isCTAOnly, /*optional*/::mlir::NVVM::CTAGroupKindAttr group, /*optional*/::mlir::Value predicate);
static CpAsyncBulkTensorGlobalToSharedClusterOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dstMem, ::mlir::Value tmaDescriptor, ::mlir::ValueRange coordinates, ::mlir::Value mbar, ::mlir::ValueRange im2colOffsets, /*optional*/::mlir::Value multicastMask, /*optional*/::mlir::Value l2CacheHint, ::mlir::NVVM::TMALoadMode mode, bool isCTAOnly, /*optional*/::mlir::NVVM::CTAGroupKindAttr group, /*optional*/::mlir::Value predicate);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dstMem, ::mlir::Value tmaDescriptor, ::mlir::ValueRange coordinates, ::mlir::Value mbar, ::mlir::ValueRange im2colOffsets, /*optional*/::mlir::Value multicastMask, /*optional*/::mlir::Value l2CacheHint, ::mlir::NVVM::TMALoadMode mode, bool isCTAOnly, /*optional*/::mlir::NVVM::CTAGroupKindAttr group, /*optional*/::mlir::Value predicate);
static CpAsyncBulkTensorGlobalToSharedClusterOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dstMem, ::mlir::Value tmaDescriptor, ::mlir::ValueRange coordinates, ::mlir::Value mbar, ::mlir::ValueRange im2colOffsets, /*optional*/::mlir::Value multicastMask, /*optional*/::mlir::Value l2CacheHint, ::mlir::NVVM::TMALoadMode mode, bool isCTAOnly, /*optional*/::mlir::NVVM::CTAGroupKindAttr group, /*optional*/::mlir::Value predicate);
static CpAsyncBulkTensorGlobalToSharedClusterOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dstMem, ::mlir::Value tmaDescriptor, ::mlir::ValueRange coordinates, ::mlir::Value mbar, ::mlir::ValueRange im2colOffsets, /*optional*/::mlir::Value multicastMask, /*optional*/::mlir::Value l2CacheHint, ::mlir::NVVM::TMALoadMode mode, bool isCTAOnly, /*optional*/::mlir::NVVM::CTAGroupKindAttr group, /*optional*/::mlir::Value predicate);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncBulkTensorGlobalToSharedClusterOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncBulkTensorGlobalToSharedClusterOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncBulkTensorGlobalToSharedClusterOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncBulkTensorGlobalToSharedClusterOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
std::string getPtx();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 3 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
bool hasIntrinsic() { return !getPredicate(); }
bool getAsmValues(RewriterBase &rewriter,
llvm::SmallVectorImpl<std::pair<mlir::Value, mlir::NVVM::PTXRegisterMod>> &asmValues);
static mlir::NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase& builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::CpAsyncBulkTensorGlobalToSharedClusterOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::CpAsyncBulkTensorGlobalToSharedClusterOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::CpAsyncBulkTensorPrefetchOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class CpAsyncBulkTensorPrefetchOpGenericAdaptorBase {
public:
struct Properties {
using modeTy = ::mlir::NVVM::TMALoadModeAttr;
modeTy mode;
auto getMode() const {
auto &propStorage = this->mode;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::TMALoadModeAttr>(propStorage);
}
void setMode(const ::mlir::NVVM::TMALoadModeAttr &propValue) {
this->mode = propValue;
}
using operandSegmentSizesTy = std::array<int32_t, 4>;
operandSegmentSizesTy operandSegmentSizes;
::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
auto &propStorage = this->operandSegmentSizes;
return propStorage;
}
void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
auto &propStorage = this->operandSegmentSizes;
::llvm::copy(propValue, propStorage.begin());
}
bool operator==(const Properties &rhs) const {
return
rhs.mode == this->mode &&
rhs.operandSegmentSizes == this->operandSegmentSizes &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
CpAsyncBulkTensorPrefetchOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.cp.async.bulk.tensor.prefetch", odsAttrs.getContext());
}
CpAsyncBulkTensorPrefetchOpGenericAdaptorBase(CpAsyncBulkTensorPrefetchOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::TMALoadModeAttr getModeAttr();
::mlir::NVVM::TMALoadMode getMode();
};
} // namespace detail
template <typename RangeT>
class CpAsyncBulkTensorPrefetchOpGenericAdaptor : public detail::CpAsyncBulkTensorPrefetchOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::CpAsyncBulkTensorPrefetchOpGenericAdaptorBase;
static constexpr int odsIndex_tmaDescriptor = 0;
static constexpr int odsIndex_coordinates = 1;
static constexpr int odsIndex_im2colOffsets = 2;
static constexpr int odsIndex_l2CacheHint = 3;
public:
CpAsyncBulkTensorPrefetchOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
CpAsyncBulkTensorPrefetchOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CpAsyncBulkTensorPrefetchOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
CpAsyncBulkTensorPrefetchOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : CpAsyncBulkTensorPrefetchOpGenericAdaptor(values, attrs, Properties{}, {}) {}
CpAsyncBulkTensorPrefetchOpGenericAdaptor(RangeT values, const CpAsyncBulkTensorPrefetchOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = CpAsyncBulkTensorPrefetchOp, typename = std::enable_if_t<std::is_same_v<LateInst, CpAsyncBulkTensorPrefetchOp>>>
CpAsyncBulkTensorPrefetchOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getTmaDescriptor() {
return (*getODSOperands(0).begin());
}
RangeT getCoordinates() {
return getODSOperands(1);
}
RangeT getIm2colOffsets() {
return getODSOperands(2);
}
ValueT getL2CacheHint() {
auto operands = getODSOperands(3);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class CpAsyncBulkTensorPrefetchOpAdaptor : public CpAsyncBulkTensorPrefetchOpGenericAdaptor<::mlir::ValueRange> {
public:
using CpAsyncBulkTensorPrefetchOpGenericAdaptor::CpAsyncBulkTensorPrefetchOpGenericAdaptor;
CpAsyncBulkTensorPrefetchOpAdaptor(CpAsyncBulkTensorPrefetchOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class CpAsyncBulkTensorPrefetchOp : public ::mlir::Op<CpAsyncBulkTensorPrefetchOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<1>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = CpAsyncBulkTensorPrefetchOpAdaptor;
template <typename RangeT>
using GenericAdaptor = CpAsyncBulkTensorPrefetchOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_tmaDescriptor = 0;
static constexpr int odsIndex_coordinates = 1;
static constexpr int odsIndex_im2colOffsets = 2;
static constexpr int odsIndex_l2CacheHint = 3;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("mode"), ::llvm::StringRef("operandSegmentSizes")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getModeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getModeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getOperandSegmentSizesAttrName() {
return (*this)->getName().getAttributeNames().back();
}
static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
return name.getAttributeNames().back();
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.cp.async.bulk.tensor.prefetch");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getTmaDescriptor() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin());
}
::mlir::Operation::operand_range getCoordinates() {
return getODSOperands(1);
}
::mlir::Operation::operand_range getIm2colOffsets() {
return getODSOperands(2);
}
::mlir::TypedValue<::mlir::IntegerType> getL2CacheHint() {
auto operands = getODSOperands(3);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getTmaDescriptorMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getCoordinatesMutable();
::mlir::MutableOperandRange getIm2colOffsetsMutable();
::mlir::MutableOperandRange getL2CacheHintMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::TMALoadModeAttr getModeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::TMALoadModeAttr>(getProperties().mode);
}
::mlir::NVVM::TMALoadMode getMode();
void setModeAttr(::mlir::NVVM::TMALoadModeAttr attr) {
getProperties().mode = attr;
}
void setMode(::mlir::NVVM::TMALoadMode attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value tmaDescriptor, ::mlir::ValueRange coordinates, ::mlir::ValueRange im2colOffsets, ::mlir::NVVM::TMALoadModeAttr mode, /*optional*/::mlir::Value l2CacheHint);
static CpAsyncBulkTensorPrefetchOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value tmaDescriptor, ::mlir::ValueRange coordinates, ::mlir::ValueRange im2colOffsets, ::mlir::NVVM::TMALoadModeAttr mode, /*optional*/::mlir::Value l2CacheHint);
static CpAsyncBulkTensorPrefetchOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value tmaDescriptor, ::mlir::ValueRange coordinates, ::mlir::ValueRange im2colOffsets, ::mlir::NVVM::TMALoadModeAttr mode, /*optional*/::mlir::Value l2CacheHint);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value tmaDescriptor, ::mlir::ValueRange coordinates, ::mlir::ValueRange im2colOffsets, ::mlir::NVVM::TMALoadModeAttr mode, /*optional*/::mlir::Value l2CacheHint);
static CpAsyncBulkTensorPrefetchOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value tmaDescriptor, ::mlir::ValueRange coordinates, ::mlir::ValueRange im2colOffsets, ::mlir::NVVM::TMALoadModeAttr mode, /*optional*/::mlir::Value l2CacheHint);
static CpAsyncBulkTensorPrefetchOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value tmaDescriptor, ::mlir::ValueRange coordinates, ::mlir::ValueRange im2colOffsets, ::mlir::NVVM::TMALoadModeAttr mode, /*optional*/::mlir::Value l2CacheHint);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value tmaDescriptor, ::mlir::ValueRange coordinates, ::mlir::ValueRange im2colOffsets, ::mlir::NVVM::TMALoadMode mode, /*optional*/::mlir::Value l2CacheHint);
static CpAsyncBulkTensorPrefetchOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value tmaDescriptor, ::mlir::ValueRange coordinates, ::mlir::ValueRange im2colOffsets, ::mlir::NVVM::TMALoadMode mode, /*optional*/::mlir::Value l2CacheHint);
static CpAsyncBulkTensorPrefetchOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value tmaDescriptor, ::mlir::ValueRange coordinates, ::mlir::ValueRange im2colOffsets, ::mlir::NVVM::TMALoadMode mode, /*optional*/::mlir::Value l2CacheHint);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value tmaDescriptor, ::mlir::ValueRange coordinates, ::mlir::ValueRange im2colOffsets, ::mlir::NVVM::TMALoadMode mode, /*optional*/::mlir::Value l2CacheHint);
static CpAsyncBulkTensorPrefetchOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value tmaDescriptor, ::mlir::ValueRange coordinates, ::mlir::ValueRange im2colOffsets, ::mlir::NVVM::TMALoadMode mode, /*optional*/::mlir::Value l2CacheHint);
static CpAsyncBulkTensorPrefetchOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value tmaDescriptor, ::mlir::ValueRange coordinates, ::mlir::ValueRange im2colOffsets, ::mlir::NVVM::TMALoadMode mode, /*optional*/::mlir::Value l2CacheHint);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncBulkTensorPrefetchOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncBulkTensorPrefetchOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncBulkTensorPrefetchOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncBulkTensorPrefetchOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::CpAsyncBulkTensorPrefetchOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::CpAsyncBulkTensorPrefetchOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::CpAsyncBulkTensorReduceOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class CpAsyncBulkTensorReduceOpGenericAdaptorBase {
public:
struct Properties {
using modeTy = ::mlir::NVVM::TMAStoreModeAttr;
modeTy mode;
auto getMode() const {
auto &propStorage = this->mode;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::TMAStoreModeAttr>(propStorage);
}
void setMode(const ::mlir::NVVM::TMAStoreModeAttr &propValue) {
this->mode = propValue;
}
using redKindTy = ::mlir::NVVM::TMAReduxKindAttr;
redKindTy redKind;
auto getRedKind() const {
auto &propStorage = this->redKind;
return ::llvm::cast<::mlir::NVVM::TMAReduxKindAttr>(propStorage);
}
void setRedKind(const ::mlir::NVVM::TMAReduxKindAttr &propValue) {
this->redKind = propValue;
}
using operandSegmentSizesTy = std::array<int32_t, 4>;
operandSegmentSizesTy operandSegmentSizes;
::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
auto &propStorage = this->operandSegmentSizes;
return propStorage;
}
void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
auto &propStorage = this->operandSegmentSizes;
::llvm::copy(propValue, propStorage.begin());
}
bool operator==(const Properties &rhs) const {
return
rhs.mode == this->mode &&
rhs.redKind == this->redKind &&
rhs.operandSegmentSizes == this->operandSegmentSizes &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
CpAsyncBulkTensorReduceOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.cp.async.bulk.tensor.reduce", odsAttrs.getContext());
}
CpAsyncBulkTensorReduceOpGenericAdaptorBase(CpAsyncBulkTensorReduceOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::TMAReduxKindAttr getRedKindAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::TMAReduxKindAttr>(getProperties().redKind);
return attr;
}
::mlir::NVVM::TMAReduxKind getRedKind();
::mlir::NVVM::TMAStoreModeAttr getModeAttr();
::mlir::NVVM::TMAStoreMode getMode();
};
} // namespace detail
template <typename RangeT>
class CpAsyncBulkTensorReduceOpGenericAdaptor : public detail::CpAsyncBulkTensorReduceOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::CpAsyncBulkTensorReduceOpGenericAdaptorBase;
static constexpr int odsIndex_tmaDescriptor = 0;
static constexpr int odsIndex_srcMem = 1;
static constexpr int odsIndex_coordinates = 2;
static constexpr int odsIndex_l2CacheHint = 3;
public:
CpAsyncBulkTensorReduceOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
CpAsyncBulkTensorReduceOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CpAsyncBulkTensorReduceOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
CpAsyncBulkTensorReduceOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : CpAsyncBulkTensorReduceOpGenericAdaptor(values, attrs, Properties{}, {}) {}
CpAsyncBulkTensorReduceOpGenericAdaptor(RangeT values, const CpAsyncBulkTensorReduceOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = CpAsyncBulkTensorReduceOp, typename = std::enable_if_t<std::is_same_v<LateInst, CpAsyncBulkTensorReduceOp>>>
CpAsyncBulkTensorReduceOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getTmaDescriptor() {
return (*getODSOperands(0).begin());
}
ValueT getSrcMem() {
return (*getODSOperands(1).begin());
}
RangeT getCoordinates() {
return getODSOperands(2);
}
ValueT getL2CacheHint() {
auto operands = getODSOperands(3);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class CpAsyncBulkTensorReduceOpAdaptor : public CpAsyncBulkTensorReduceOpGenericAdaptor<::mlir::ValueRange> {
public:
using CpAsyncBulkTensorReduceOpGenericAdaptor::CpAsyncBulkTensorReduceOpGenericAdaptor;
CpAsyncBulkTensorReduceOpAdaptor(CpAsyncBulkTensorReduceOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class CpAsyncBulkTensorReduceOp : public ::mlir::Op<CpAsyncBulkTensorReduceOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = CpAsyncBulkTensorReduceOpAdaptor;
template <typename RangeT>
using GenericAdaptor = CpAsyncBulkTensorReduceOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_tmaDescriptor = 0;
static constexpr int odsIndex_srcMem = 1;
static constexpr int odsIndex_coordinates = 2;
static constexpr int odsIndex_l2CacheHint = 3;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("mode"), ::llvm::StringRef("redKind"), ::llvm::StringRef("operandSegmentSizes")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getModeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getModeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getRedKindAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getRedKindAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getOperandSegmentSizesAttrName() {
return (*this)->getName().getAttributeNames().back();
}
static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
return name.getAttributeNames().back();
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.cp.async.bulk.tensor.reduce");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getTmaDescriptor() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getSrcMem() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(1).begin());
}
::mlir::Operation::operand_range getCoordinates() {
return getODSOperands(2);
}
::mlir::TypedValue<::mlir::IntegerType> getL2CacheHint() {
auto operands = getODSOperands(3);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getTmaDescriptorMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSrcMemMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getCoordinatesMutable();
::mlir::MutableOperandRange getL2CacheHintMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::TMAReduxKindAttr getRedKindAttr() {
return ::llvm::cast<::mlir::NVVM::TMAReduxKindAttr>(getProperties().redKind);
}
::mlir::NVVM::TMAReduxKind getRedKind();
::mlir::NVVM::TMAStoreModeAttr getModeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::TMAStoreModeAttr>(getProperties().mode);
}
::mlir::NVVM::TMAStoreMode getMode();
void setRedKindAttr(::mlir::NVVM::TMAReduxKindAttr attr) {
getProperties().redKind = attr;
}
void setRedKind(::mlir::NVVM::TMAReduxKind attrValue);
void setModeAttr(::mlir::NVVM::TMAStoreModeAttr attr) {
getProperties().mode = attr;
}
void setMode(::mlir::NVVM::TMAStoreMode attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value tmaDescriptor, ::mlir::Value srcMem, ::mlir::NVVM::TMAReduxKindAttr redKind, ::mlir::NVVM::TMAStoreModeAttr mode, ::mlir::ValueRange coordinates, /*optional*/::mlir::Value l2CacheHint);
static CpAsyncBulkTensorReduceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value tmaDescriptor, ::mlir::Value srcMem, ::mlir::NVVM::TMAReduxKindAttr redKind, ::mlir::NVVM::TMAStoreModeAttr mode, ::mlir::ValueRange coordinates, /*optional*/::mlir::Value l2CacheHint);
static CpAsyncBulkTensorReduceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value tmaDescriptor, ::mlir::Value srcMem, ::mlir::NVVM::TMAReduxKindAttr redKind, ::mlir::NVVM::TMAStoreModeAttr mode, ::mlir::ValueRange coordinates, /*optional*/::mlir::Value l2CacheHint);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value tmaDescriptor, ::mlir::Value srcMem, ::mlir::NVVM::TMAReduxKindAttr redKind, ::mlir::NVVM::TMAStoreModeAttr mode, ::mlir::ValueRange coordinates, /*optional*/::mlir::Value l2CacheHint);
static CpAsyncBulkTensorReduceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value tmaDescriptor, ::mlir::Value srcMem, ::mlir::NVVM::TMAReduxKindAttr redKind, ::mlir::NVVM::TMAStoreModeAttr mode, ::mlir::ValueRange coordinates, /*optional*/::mlir::Value l2CacheHint);
static CpAsyncBulkTensorReduceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value tmaDescriptor, ::mlir::Value srcMem, ::mlir::NVVM::TMAReduxKindAttr redKind, ::mlir::NVVM::TMAStoreModeAttr mode, ::mlir::ValueRange coordinates, /*optional*/::mlir::Value l2CacheHint);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value tmaDescriptor, ::mlir::Value srcMem, ::mlir::NVVM::TMAReduxKind redKind, ::mlir::NVVM::TMAStoreMode mode, ::mlir::ValueRange coordinates, /*optional*/::mlir::Value l2CacheHint);
static CpAsyncBulkTensorReduceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value tmaDescriptor, ::mlir::Value srcMem, ::mlir::NVVM::TMAReduxKind redKind, ::mlir::NVVM::TMAStoreMode mode, ::mlir::ValueRange coordinates, /*optional*/::mlir::Value l2CacheHint);
static CpAsyncBulkTensorReduceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value tmaDescriptor, ::mlir::Value srcMem, ::mlir::NVVM::TMAReduxKind redKind, ::mlir::NVVM::TMAStoreMode mode, ::mlir::ValueRange coordinates, /*optional*/::mlir::Value l2CacheHint);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value tmaDescriptor, ::mlir::Value srcMem, ::mlir::NVVM::TMAReduxKind redKind, ::mlir::NVVM::TMAStoreMode mode, ::mlir::ValueRange coordinates, /*optional*/::mlir::Value l2CacheHint);
static CpAsyncBulkTensorReduceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value tmaDescriptor, ::mlir::Value srcMem, ::mlir::NVVM::TMAReduxKind redKind, ::mlir::NVVM::TMAStoreMode mode, ::mlir::ValueRange coordinates, /*optional*/::mlir::Value l2CacheHint);
static CpAsyncBulkTensorReduceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value tmaDescriptor, ::mlir::Value srcMem, ::mlir::NVVM::TMAReduxKind redKind, ::mlir::NVVM::TMAStoreMode mode, ::mlir::ValueRange coordinates, /*optional*/::mlir::Value l2CacheHint);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncBulkTensorReduceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncBulkTensorReduceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncBulkTensorReduceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncBulkTensorReduceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static mlir::NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op,
LLVM::ModuleTranslation &mt, llvm::IRBuilderBase& builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::CpAsyncBulkTensorReduceOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::CpAsyncBulkTensorReduceOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::CpAsyncBulkTensorSharedCTAToGlobalOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class CpAsyncBulkTensorSharedCTAToGlobalOpGenericAdaptorBase {
public:
struct Properties {
using modeTy = ::mlir::NVVM::TMAStoreModeAttr;
modeTy mode;
auto getMode() const {
auto &propStorage = this->mode;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::TMAStoreModeAttr>(propStorage);
}
void setMode(const ::mlir::NVVM::TMAStoreModeAttr &propValue) {
this->mode = propValue;
}
using operandSegmentSizesTy = std::array<int32_t, 5>;
operandSegmentSizesTy operandSegmentSizes;
::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
auto &propStorage = this->operandSegmentSizes;
return propStorage;
}
void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
auto &propStorage = this->operandSegmentSizes;
::llvm::copy(propValue, propStorage.begin());
}
bool operator==(const Properties &rhs) const {
return
rhs.mode == this->mode &&
rhs.operandSegmentSizes == this->operandSegmentSizes &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
CpAsyncBulkTensorSharedCTAToGlobalOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.cp.async.bulk.tensor.global.shared.cta", odsAttrs.getContext());
}
CpAsyncBulkTensorSharedCTAToGlobalOpGenericAdaptorBase(CpAsyncBulkTensorSharedCTAToGlobalOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::TMAStoreModeAttr getModeAttr();
::mlir::NVVM::TMAStoreMode getMode();
};
} // namespace detail
template <typename RangeT>
class CpAsyncBulkTensorSharedCTAToGlobalOpGenericAdaptor : public detail::CpAsyncBulkTensorSharedCTAToGlobalOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::CpAsyncBulkTensorSharedCTAToGlobalOpGenericAdaptorBase;
static constexpr int odsIndex_tmaDescriptor = 0;
static constexpr int odsIndex_srcMem = 1;
static constexpr int odsIndex_coordinates = 2;
static constexpr int odsIndex_l2CacheHint = 3;
static constexpr int odsIndex_predicate = 4;
public:
CpAsyncBulkTensorSharedCTAToGlobalOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
CpAsyncBulkTensorSharedCTAToGlobalOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CpAsyncBulkTensorSharedCTAToGlobalOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
CpAsyncBulkTensorSharedCTAToGlobalOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : CpAsyncBulkTensorSharedCTAToGlobalOpGenericAdaptor(values, attrs, Properties{}, {}) {}
CpAsyncBulkTensorSharedCTAToGlobalOpGenericAdaptor(RangeT values, const CpAsyncBulkTensorSharedCTAToGlobalOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = CpAsyncBulkTensorSharedCTAToGlobalOp, typename = std::enable_if_t<std::is_same_v<LateInst, CpAsyncBulkTensorSharedCTAToGlobalOp>>>
CpAsyncBulkTensorSharedCTAToGlobalOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getTmaDescriptor() {
return (*getODSOperands(0).begin());
}
ValueT getSrcMem() {
return (*getODSOperands(1).begin());
}
RangeT getCoordinates() {
return getODSOperands(2);
}
ValueT getL2CacheHint() {
auto operands = getODSOperands(3);
return operands.empty() ? ValueT{} : (*operands.begin());
}
ValueT getPredicate() {
auto operands = getODSOperands(4);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class CpAsyncBulkTensorSharedCTAToGlobalOpAdaptor : public CpAsyncBulkTensorSharedCTAToGlobalOpGenericAdaptor<::mlir::ValueRange> {
public:
using CpAsyncBulkTensorSharedCTAToGlobalOpGenericAdaptor::CpAsyncBulkTensorSharedCTAToGlobalOpGenericAdaptor;
CpAsyncBulkTensorSharedCTAToGlobalOpAdaptor(CpAsyncBulkTensorSharedCTAToGlobalOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class CpAsyncBulkTensorSharedCTAToGlobalOp : public ::mlir::Op<CpAsyncBulkTensorSharedCTAToGlobalOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::NVVM::BasicPtxBuilderInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = CpAsyncBulkTensorSharedCTAToGlobalOpAdaptor;
template <typename RangeT>
using GenericAdaptor = CpAsyncBulkTensorSharedCTAToGlobalOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_tmaDescriptor = 0;
static constexpr int odsIndex_srcMem = 1;
static constexpr int odsIndex_coordinates = 2;
static constexpr int odsIndex_l2CacheHint = 3;
static constexpr int odsIndex_predicate = 4;
using Properties = FoldAdaptor::Properties;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<CpAsyncBulkTensorSharedCTAToGlobalOp>::getPredicate;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<CpAsyncBulkTensorSharedCTAToGlobalOp>::hasIntrinsic;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<CpAsyncBulkTensorSharedCTAToGlobalOp>::hasSideEffect;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<CpAsyncBulkTensorSharedCTAToGlobalOp>::makeConstantI32;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<CpAsyncBulkTensorSharedCTAToGlobalOp>::getAsmValues;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("mode"), ::llvm::StringRef("operandSegmentSizes")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getModeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getModeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getOperandSegmentSizesAttrName() {
return (*this)->getName().getAttributeNames().back();
}
static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
return name.getAttributeNames().back();
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.cp.async.bulk.tensor.global.shared.cta");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getTmaDescriptor() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getSrcMem() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(1).begin());
}
::mlir::Operation::operand_range getCoordinates() {
return getODSOperands(2);
}
::mlir::TypedValue<::mlir::IntegerType> getL2CacheHint() {
auto operands = getODSOperands(3);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::TypedValue<::mlir::IntegerType> getPredicate() {
auto operands = getODSOperands(4);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getTmaDescriptorMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSrcMemMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getCoordinatesMutable();
::mlir::MutableOperandRange getL2CacheHintMutable();
::mlir::MutableOperandRange getPredicateMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::TMAStoreModeAttr getModeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::TMAStoreModeAttr>(getProperties().mode);
}
::mlir::NVVM::TMAStoreMode getMode();
void setModeAttr(::mlir::NVVM::TMAStoreModeAttr attr) {
getProperties().mode = attr;
}
void setMode(::mlir::NVVM::TMAStoreMode attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value tmaDescriptor, ::mlir::Value srcMem, ::mlir::ValueRange coordinates, /*optional*/::mlir::Value l2CacheHint, ::mlir::NVVM::TMAStoreModeAttr mode, /*optional*/::mlir::Value predicate);
static CpAsyncBulkTensorSharedCTAToGlobalOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value tmaDescriptor, ::mlir::Value srcMem, ::mlir::ValueRange coordinates, /*optional*/::mlir::Value l2CacheHint, ::mlir::NVVM::TMAStoreModeAttr mode, /*optional*/::mlir::Value predicate);
static CpAsyncBulkTensorSharedCTAToGlobalOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value tmaDescriptor, ::mlir::Value srcMem, ::mlir::ValueRange coordinates, /*optional*/::mlir::Value l2CacheHint, ::mlir::NVVM::TMAStoreModeAttr mode, /*optional*/::mlir::Value predicate);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value tmaDescriptor, ::mlir::Value srcMem, ::mlir::ValueRange coordinates, /*optional*/::mlir::Value l2CacheHint, ::mlir::NVVM::TMAStoreModeAttr mode, /*optional*/::mlir::Value predicate);
static CpAsyncBulkTensorSharedCTAToGlobalOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value tmaDescriptor, ::mlir::Value srcMem, ::mlir::ValueRange coordinates, /*optional*/::mlir::Value l2CacheHint, ::mlir::NVVM::TMAStoreModeAttr mode, /*optional*/::mlir::Value predicate);
static CpAsyncBulkTensorSharedCTAToGlobalOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value tmaDescriptor, ::mlir::Value srcMem, ::mlir::ValueRange coordinates, /*optional*/::mlir::Value l2CacheHint, ::mlir::NVVM::TMAStoreModeAttr mode, /*optional*/::mlir::Value predicate);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value tmaDescriptor, ::mlir::Value srcMem, ::mlir::ValueRange coordinates, /*optional*/::mlir::Value l2CacheHint, ::mlir::NVVM::TMAStoreMode mode, /*optional*/::mlir::Value predicate);
static CpAsyncBulkTensorSharedCTAToGlobalOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value tmaDescriptor, ::mlir::Value srcMem, ::mlir::ValueRange coordinates, /*optional*/::mlir::Value l2CacheHint, ::mlir::NVVM::TMAStoreMode mode, /*optional*/::mlir::Value predicate);
static CpAsyncBulkTensorSharedCTAToGlobalOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value tmaDescriptor, ::mlir::Value srcMem, ::mlir::ValueRange coordinates, /*optional*/::mlir::Value l2CacheHint, ::mlir::NVVM::TMAStoreMode mode, /*optional*/::mlir::Value predicate);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value tmaDescriptor, ::mlir::Value srcMem, ::mlir::ValueRange coordinates, /*optional*/::mlir::Value l2CacheHint, ::mlir::NVVM::TMAStoreMode mode, /*optional*/::mlir::Value predicate);
static CpAsyncBulkTensorSharedCTAToGlobalOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value tmaDescriptor, ::mlir::Value srcMem, ::mlir::ValueRange coordinates, /*optional*/::mlir::Value l2CacheHint, ::mlir::NVVM::TMAStoreMode mode, /*optional*/::mlir::Value predicate);
static CpAsyncBulkTensorSharedCTAToGlobalOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value tmaDescriptor, ::mlir::Value srcMem, ::mlir::ValueRange coordinates, /*optional*/::mlir::Value l2CacheHint, ::mlir::NVVM::TMAStoreMode mode, /*optional*/::mlir::Value predicate);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncBulkTensorSharedCTAToGlobalOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncBulkTensorSharedCTAToGlobalOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncBulkTensorSharedCTAToGlobalOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncBulkTensorSharedCTAToGlobalOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
std::string getPtx();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
bool hasIntrinsic() { return !getPredicate(); }
static mlir::NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase& builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::CpAsyncBulkTensorSharedCTAToGlobalOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::CpAsyncBulkTensorSharedCTAToGlobalOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::CpAsyncBulkWaitGroupOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class CpAsyncBulkWaitGroupOpGenericAdaptorBase {
public:
struct Properties {
using groupTy = ::mlir::IntegerAttr;
groupTy group;
auto getGroup() const {
auto &propStorage = this->group;
return ::llvm::cast<::mlir::IntegerAttr>(propStorage);
}
void setGroup(const ::mlir::IntegerAttr &propValue) {
this->group = propValue;
}
using readTy = ::mlir::UnitAttr;
readTy read;
auto getRead() const {
auto &propStorage = this->read;
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage);
}
void setRead(const ::mlir::UnitAttr &propValue) {
this->read = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.group == this->group &&
rhs.read == this->read &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
CpAsyncBulkWaitGroupOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.cp.async.bulk.wait_group", odsAttrs.getContext());
}
CpAsyncBulkWaitGroupOpGenericAdaptorBase(CpAsyncBulkWaitGroupOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::IntegerAttr getGroupAttr() {
auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().group);
return attr;
}
uint32_t getGroup();
::mlir::UnitAttr getReadAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().read);
return attr;
}
::std::optional<bool> getRead();
};
} // namespace detail
template <typename RangeT>
class CpAsyncBulkWaitGroupOpGenericAdaptor : public detail::CpAsyncBulkWaitGroupOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::CpAsyncBulkWaitGroupOpGenericAdaptorBase;
public:
CpAsyncBulkWaitGroupOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
CpAsyncBulkWaitGroupOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CpAsyncBulkWaitGroupOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
CpAsyncBulkWaitGroupOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CpAsyncBulkWaitGroupOpGenericAdaptor(values, attrs, Properties{}, {}) {}
CpAsyncBulkWaitGroupOpGenericAdaptor(RangeT values, const CpAsyncBulkWaitGroupOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = CpAsyncBulkWaitGroupOp, typename = std::enable_if_t<std::is_same_v<LateInst, CpAsyncBulkWaitGroupOp>>>
CpAsyncBulkWaitGroupOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class CpAsyncBulkWaitGroupOpAdaptor : public CpAsyncBulkWaitGroupOpGenericAdaptor<::mlir::ValueRange> {
public:
using CpAsyncBulkWaitGroupOpGenericAdaptor::CpAsyncBulkWaitGroupOpGenericAdaptor;
CpAsyncBulkWaitGroupOpAdaptor(CpAsyncBulkWaitGroupOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class CpAsyncBulkWaitGroupOp : public ::mlir::Op<CpAsyncBulkWaitGroupOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<900>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = CpAsyncBulkWaitGroupOpAdaptor;
template <typename RangeT>
using GenericAdaptor = CpAsyncBulkWaitGroupOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("group"), ::llvm::StringRef("read")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getGroupAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getGroupAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getReadAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getReadAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.cp.async.bulk.wait_group");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::IntegerAttr getGroupAttr() {
return ::llvm::cast<::mlir::IntegerAttr>(getProperties().group);
}
uint32_t getGroup();
::mlir::UnitAttr getReadAttr() {
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().read);
}
::std::optional<bool> getRead();
void setGroupAttr(::mlir::IntegerAttr attr) {
getProperties().group = attr;
}
void setGroup(uint32_t attrValue);
void setReadAttr(::mlir::UnitAttr attr) {
getProperties().read = attr;
}
void setRead(bool attrValue);
::mlir::Attribute removeReadAttr() {
auto attr = getProperties().read;
getProperties().read = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr group, /*optional*/::mlir::UnitAttr read);
static CpAsyncBulkWaitGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr group, /*optional*/::mlir::UnitAttr read);
static CpAsyncBulkWaitGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr group, /*optional*/::mlir::UnitAttr read);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr group, /*optional*/::mlir::UnitAttr read);
static CpAsyncBulkWaitGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr group, /*optional*/::mlir::UnitAttr read);
static CpAsyncBulkWaitGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr group, /*optional*/::mlir::UnitAttr read);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t group, /*optional*/::mlir::UnitAttr read);
static CpAsyncBulkWaitGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t group, /*optional*/::mlir::UnitAttr read);
static CpAsyncBulkWaitGroupOp create(::mlir::ImplicitLocOpBuilder &builder, uint32_t group, /*optional*/::mlir::UnitAttr read);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t group, /*optional*/::mlir::UnitAttr read);
static CpAsyncBulkWaitGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t group, /*optional*/::mlir::UnitAttr read);
static CpAsyncBulkWaitGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t group, /*optional*/::mlir::UnitAttr read);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncBulkWaitGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncBulkWaitGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncBulkWaitGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncBulkWaitGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::CpAsyncBulkWaitGroupOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::CpAsyncBulkWaitGroupOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::CpAsyncCommitGroupOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class CpAsyncCommitGroupOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
CpAsyncCommitGroupOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.cp.async.commit.group", odsAttrs.getContext());
}
CpAsyncCommitGroupOpGenericAdaptorBase(CpAsyncCommitGroupOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class CpAsyncCommitGroupOpGenericAdaptor : public detail::CpAsyncCommitGroupOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::CpAsyncCommitGroupOpGenericAdaptorBase;
public:
CpAsyncCommitGroupOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
CpAsyncCommitGroupOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CpAsyncCommitGroupOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
CpAsyncCommitGroupOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CpAsyncCommitGroupOpGenericAdaptor(values, attrs, Properties{}, {}) {}
CpAsyncCommitGroupOpGenericAdaptor(RangeT values, const CpAsyncCommitGroupOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = CpAsyncCommitGroupOp, typename = std::enable_if_t<std::is_same_v<LateInst, CpAsyncCommitGroupOp>>>
CpAsyncCommitGroupOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class CpAsyncCommitGroupOpAdaptor : public CpAsyncCommitGroupOpGenericAdaptor<::mlir::ValueRange> {
public:
using CpAsyncCommitGroupOpGenericAdaptor::CpAsyncCommitGroupOpGenericAdaptor;
CpAsyncCommitGroupOpAdaptor(CpAsyncCommitGroupOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class CpAsyncCommitGroupOp : public ::mlir::Op<CpAsyncCommitGroupOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants> {
public:
using Op::Op;
using Op::print;
using Adaptor = CpAsyncCommitGroupOpAdaptor;
template <typename RangeT>
using GenericAdaptor = CpAsyncCommitGroupOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.cp.async.commit.group");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static CpAsyncCommitGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location);
static CpAsyncCommitGroupOp create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static CpAsyncCommitGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static CpAsyncCommitGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncCommitGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncCommitGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncCommitGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncCommitGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::CpAsyncCommitGroupOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::CpAsyncMBarrierArriveOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class CpAsyncMBarrierArriveOpGenericAdaptorBase {
public:
struct Properties {
using noincTy = ::mlir::IntegerAttr;
noincTy noinc;
auto getNoinc() const {
auto &propStorage = this->noinc;
return ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(propStorage);
}
void setNoinc(const ::mlir::IntegerAttr &propValue) {
this->noinc = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.noinc == this->noinc &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
CpAsyncMBarrierArriveOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.cp.async.mbarrier.arrive", odsAttrs.getContext());
}
CpAsyncMBarrierArriveOpGenericAdaptorBase(CpAsyncMBarrierArriveOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::IntegerAttr getNoincAttr();
bool getNoinc();
};
} // namespace detail
template <typename RangeT>
class CpAsyncMBarrierArriveOpGenericAdaptor : public detail::CpAsyncMBarrierArriveOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::CpAsyncMBarrierArriveOpGenericAdaptorBase;
static constexpr int odsIndex_addr = 0;
public:
CpAsyncMBarrierArriveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
CpAsyncMBarrierArriveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CpAsyncMBarrierArriveOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
CpAsyncMBarrierArriveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CpAsyncMBarrierArriveOpGenericAdaptor(values, attrs, Properties{}, {}) {}
CpAsyncMBarrierArriveOpGenericAdaptor(RangeT values, const CpAsyncMBarrierArriveOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = CpAsyncMBarrierArriveOp, typename = std::enable_if_t<std::is_same_v<LateInst, CpAsyncMBarrierArriveOp>>>
CpAsyncMBarrierArriveOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getAddr() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class CpAsyncMBarrierArriveOpAdaptor : public CpAsyncMBarrierArriveOpGenericAdaptor<::mlir::ValueRange> {
public:
using CpAsyncMBarrierArriveOpGenericAdaptor::CpAsyncMBarrierArriveOpGenericAdaptor;
CpAsyncMBarrierArriveOpAdaptor(CpAsyncMBarrierArriveOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class CpAsyncMBarrierArriveOp : public ::mlir::Op<CpAsyncMBarrierArriveOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = CpAsyncMBarrierArriveOpAdaptor;
template <typename RangeT>
using GenericAdaptor = CpAsyncMBarrierArriveOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_addr = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("noinc")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getNoincAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getNoincAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.cp.async.mbarrier.arrive");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getAddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getAddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::IntegerAttr getNoincAttr() {
return ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().noinc);
}
bool getNoinc();
void setNoincAttr(::mlir::IntegerAttr attr) {
getProperties().noinc = attr;
}
void setNoinc(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, ::mlir::IntegerAttr noinc);
static CpAsyncMBarrierArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, ::mlir::IntegerAttr noinc);
static CpAsyncMBarrierArriveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, ::mlir::IntegerAttr noinc);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::IntegerAttr noinc);
static CpAsyncMBarrierArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::IntegerAttr noinc);
static CpAsyncMBarrierArriveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::IntegerAttr noinc);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, bool noinc = 0);
static CpAsyncMBarrierArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, bool noinc = 0);
static CpAsyncMBarrierArriveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, bool noinc = 0);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, bool noinc = 0);
static CpAsyncMBarrierArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, bool noinc = 0);
static CpAsyncMBarrierArriveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, bool noinc = 0);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncMBarrierArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncMBarrierArriveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncMBarrierArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncMBarrierArriveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::CpAsyncMBarrierArriveOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::CpAsyncMBarrierArriveOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::CpAsyncOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class CpAsyncOpGenericAdaptorBase {
public:
struct Properties {
using modifierTy = ::mlir::NVVM::LoadCacheModifierKindAttr;
modifierTy modifier;
auto getModifier() const {
auto &propStorage = this->modifier;
return ::llvm::cast<::mlir::NVVM::LoadCacheModifierKindAttr>(propStorage);
}
void setModifier(const ::mlir::NVVM::LoadCacheModifierKindAttr &propValue) {
this->modifier = propValue;
}
using sizeTy = ::mlir::IntegerAttr;
sizeTy size;
auto getSize() const {
auto &propStorage = this->size;
return ::llvm::cast<::mlir::IntegerAttr>(propStorage);
}
void setSize(const ::mlir::IntegerAttr &propValue) {
this->size = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.modifier == this->modifier &&
rhs.size == this->size &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
CpAsyncOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.cp.async.shared.global", odsAttrs.getContext());
}
CpAsyncOpGenericAdaptorBase(CpAsyncOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::IntegerAttr getSizeAttr() {
auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().size);
return attr;
}
uint32_t getSize();
::mlir::NVVM::LoadCacheModifierKindAttr getModifierAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::LoadCacheModifierKindAttr>(getProperties().modifier);
return attr;
}
::mlir::NVVM::LoadCacheModifierKind getModifier();
};
} // namespace detail
template <typename RangeT>
class CpAsyncOpGenericAdaptor : public detail::CpAsyncOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::CpAsyncOpGenericAdaptorBase;
static constexpr int odsIndex_dst = 0;
static constexpr int odsIndex_src = 1;
static constexpr int odsIndex_cpSize = 2;
public:
CpAsyncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
CpAsyncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CpAsyncOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
CpAsyncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CpAsyncOpGenericAdaptor(values, attrs, Properties{}, {}) {}
CpAsyncOpGenericAdaptor(RangeT values, const CpAsyncOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = CpAsyncOp, typename = std::enable_if_t<std::is_same_v<LateInst, CpAsyncOp>>>
CpAsyncOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getDst() {
return (*getODSOperands(0).begin());
}
ValueT getSrc() {
return (*getODSOperands(1).begin());
}
ValueT getCpSize() {
auto operands = getODSOperands(2);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class CpAsyncOpAdaptor : public CpAsyncOpGenericAdaptor<::mlir::ValueRange> {
public:
using CpAsyncOpGenericAdaptor::CpAsyncOpGenericAdaptor;
CpAsyncOpAdaptor(CpAsyncOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class CpAsyncOp : public ::mlir::Op<CpAsyncOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = CpAsyncOpAdaptor;
template <typename RangeT>
using GenericAdaptor = CpAsyncOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_dst = 0;
static constexpr int odsIndex_src = 1;
static constexpr int odsIndex_cpSize = 2;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("modifier"), ::llvm::StringRef("size")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getModifierAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getModifierAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getSizeAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getSizeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.cp.async.shared.global");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getDst() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getCpSize() {
auto operands = getODSOperands(2);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getDstMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getCpSizeMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::IntegerAttr getSizeAttr() {
return ::llvm::cast<::mlir::IntegerAttr>(getProperties().size);
}
uint32_t getSize();
::mlir::NVVM::LoadCacheModifierKindAttr getModifierAttr() {
return ::llvm::cast<::mlir::NVVM::LoadCacheModifierKindAttr>(getProperties().modifier);
}
::mlir::NVVM::LoadCacheModifierKind getModifier();
void setSizeAttr(::mlir::IntegerAttr attr) {
getProperties().size = attr;
}
void setSize(uint32_t attrValue);
void setModifierAttr(::mlir::NVVM::LoadCacheModifierKindAttr attr) {
getProperties().modifier = attr;
}
void setModifier(::mlir::NVVM::LoadCacheModifierKind attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dst, ::mlir::Value src, ::mlir::IntegerAttr size, ::mlir::NVVM::LoadCacheModifierKindAttr modifier, /*optional*/::mlir::Value cpSize);
static CpAsyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dst, ::mlir::Value src, ::mlir::IntegerAttr size, ::mlir::NVVM::LoadCacheModifierKindAttr modifier, /*optional*/::mlir::Value cpSize);
static CpAsyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dst, ::mlir::Value src, ::mlir::IntegerAttr size, ::mlir::NVVM::LoadCacheModifierKindAttr modifier, /*optional*/::mlir::Value cpSize);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value src, ::mlir::IntegerAttr size, ::mlir::NVVM::LoadCacheModifierKindAttr modifier, /*optional*/::mlir::Value cpSize);
static CpAsyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value src, ::mlir::IntegerAttr size, ::mlir::NVVM::LoadCacheModifierKindAttr modifier, /*optional*/::mlir::Value cpSize);
static CpAsyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value src, ::mlir::IntegerAttr size, ::mlir::NVVM::LoadCacheModifierKindAttr modifier, /*optional*/::mlir::Value cpSize);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dst, ::mlir::Value src, uint32_t size, ::mlir::NVVM::LoadCacheModifierKind modifier, /*optional*/::mlir::Value cpSize);
static CpAsyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dst, ::mlir::Value src, uint32_t size, ::mlir::NVVM::LoadCacheModifierKind modifier, /*optional*/::mlir::Value cpSize);
static CpAsyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dst, ::mlir::Value src, uint32_t size, ::mlir::NVVM::LoadCacheModifierKind modifier, /*optional*/::mlir::Value cpSize);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value src, uint32_t size, ::mlir::NVVM::LoadCacheModifierKind modifier, /*optional*/::mlir::Value cpSize);
static CpAsyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value src, uint32_t size, ::mlir::NVVM::LoadCacheModifierKind modifier, /*optional*/::mlir::Value cpSize);
static CpAsyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value src, uint32_t size, ::mlir::NVVM::LoadCacheModifierKind modifier, /*optional*/::mlir::Value cpSize);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static llvm::Intrinsic::ID
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::SmallVector<llvm::Value *> &args);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::CpAsyncOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::CpAsyncOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::CpAsyncWaitGroupOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class CpAsyncWaitGroupOpGenericAdaptorBase {
public:
struct Properties {
using nTy = ::mlir::IntegerAttr;
nTy n;
auto getN() const {
auto &propStorage = this->n;
return ::llvm::cast<::mlir::IntegerAttr>(propStorage);
}
void setN(const ::mlir::IntegerAttr &propValue) {
this->n = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.n == this->n &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
CpAsyncWaitGroupOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.cp.async.wait.group", odsAttrs.getContext());
}
CpAsyncWaitGroupOpGenericAdaptorBase(CpAsyncWaitGroupOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::IntegerAttr getNAttr() {
auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().n);
return attr;
}
uint32_t getN();
};
} // namespace detail
template <typename RangeT>
class CpAsyncWaitGroupOpGenericAdaptor : public detail::CpAsyncWaitGroupOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::CpAsyncWaitGroupOpGenericAdaptorBase;
public:
CpAsyncWaitGroupOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
CpAsyncWaitGroupOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CpAsyncWaitGroupOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
CpAsyncWaitGroupOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CpAsyncWaitGroupOpGenericAdaptor(values, attrs, Properties{}, {}) {}
CpAsyncWaitGroupOpGenericAdaptor(RangeT values, const CpAsyncWaitGroupOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = CpAsyncWaitGroupOp, typename = std::enable_if_t<std::is_same_v<LateInst, CpAsyncWaitGroupOp>>>
CpAsyncWaitGroupOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class CpAsyncWaitGroupOpAdaptor : public CpAsyncWaitGroupOpGenericAdaptor<::mlir::ValueRange> {
public:
using CpAsyncWaitGroupOpGenericAdaptor::CpAsyncWaitGroupOpGenericAdaptor;
CpAsyncWaitGroupOpAdaptor(CpAsyncWaitGroupOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class CpAsyncWaitGroupOp : public ::mlir::Op<CpAsyncWaitGroupOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = CpAsyncWaitGroupOpAdaptor;
template <typename RangeT>
using GenericAdaptor = CpAsyncWaitGroupOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("n")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getNAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getNAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.cp.async.wait.group");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::IntegerAttr getNAttr() {
return ::llvm::cast<::mlir::IntegerAttr>(getProperties().n);
}
uint32_t getN();
void setNAttr(::mlir::IntegerAttr attr) {
getProperties().n = attr;
}
void setN(uint32_t attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr n);
static CpAsyncWaitGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr n);
static CpAsyncWaitGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr n);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr n);
static CpAsyncWaitGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr n);
static CpAsyncWaitGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr n);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t n);
static CpAsyncWaitGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t n);
static CpAsyncWaitGroupOp create(::mlir::ImplicitLocOpBuilder &builder, uint32_t n);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t n);
static CpAsyncWaitGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t n);
static CpAsyncWaitGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t n);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncWaitGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static CpAsyncWaitGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncWaitGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static CpAsyncWaitGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::CpAsyncWaitGroupOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::CpAsyncWaitGroupOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::DivFOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class DivFOpGenericAdaptorBase {
public:
struct Properties {
using approxTy = ::mlir::BoolAttr;
approxTy approx;
auto getApprox() const {
auto &propStorage = this->approx;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setApprox(const ::mlir::BoolAttr &propValue) {
this->approx = propValue;
}
using ftzTy = ::mlir::BoolAttr;
ftzTy ftz;
auto getFtz() const {
auto &propStorage = this->ftz;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setFtz(const ::mlir::BoolAttr &propValue) {
this->ftz = propValue;
}
using fullTy = ::mlir::BoolAttr;
fullTy full;
auto getFull() const {
auto &propStorage = this->full;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setFull(const ::mlir::BoolAttr &propValue) {
this->full = propValue;
}
using rndTy = ::mlir::NVVM::FPRoundingModeAttr;
rndTy rnd;
auto getRnd() const {
auto &propStorage = this->rnd;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::FPRoundingModeAttr>(propStorage);
}
void setRnd(const ::mlir::NVVM::FPRoundingModeAttr &propValue) {
this->rnd = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.approx == this->approx &&
rhs.ftz == this->ftz &&
rhs.full == this->full &&
rhs.rnd == this->rnd &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
DivFOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.divf", odsAttrs.getContext());
}
DivFOpGenericAdaptorBase(DivFOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::FPRoundingModeAttr getRndAttr();
::mlir::NVVM::FPRoundingMode getRnd();
::mlir::BoolAttr getFtzAttr();
bool getFtz();
::mlir::BoolAttr getApproxAttr();
bool getApprox();
::mlir::BoolAttr getFullAttr();
bool getFull();
};
} // namespace detail
template <typename RangeT>
class DivFOpGenericAdaptor : public detail::DivFOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::DivFOpGenericAdaptorBase;
static constexpr int odsIndex_lhs = 0;
static constexpr int odsIndex_rhs = 1;
public:
DivFOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
DivFOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : DivFOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
DivFOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : DivFOpGenericAdaptor(values, attrs, Properties{}, {}) {}
DivFOpGenericAdaptor(RangeT values, const DivFOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = DivFOp, typename = std::enable_if_t<std::is_same_v<LateInst, DivFOp>>>
DivFOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getLhs() {
return (*getODSOperands(0).begin());
}
ValueT getRhs() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class DivFOpAdaptor : public DivFOpGenericAdaptor<::mlir::ValueRange> {
public:
using DivFOpGenericAdaptor::DivFOpGenericAdaptor;
DivFOpAdaptor(DivFOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class DivFOp : public ::mlir::Op<DivFOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = DivFOpAdaptor;
template <typename RangeT>
using GenericAdaptor = DivFOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_lhs = 0;
static constexpr int odsIndex_rhs = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("approx"), ::llvm::StringRef("ftz"), ::llvm::StringRef("full"), ::llvm::StringRef("rnd")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getApproxAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getApproxAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getFtzAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getFtzAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getFullAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getFullAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
::mlir::StringAttr getRndAttrName() {
return getAttributeNameForIndex(3);
}
static ::mlir::StringAttr getRndAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 3);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.divf");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getLhs() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::Type> getRhs() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getLhsMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getRhsMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::FPRoundingModeAttr getRndAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::FPRoundingModeAttr>(getProperties().rnd);
}
::mlir::NVVM::FPRoundingMode getRnd();
::mlir::BoolAttr getFtzAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().ftz);
}
bool getFtz();
::mlir::BoolAttr getApproxAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().approx);
}
bool getApprox();
::mlir::BoolAttr getFullAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().full);
}
bool getFull();
void setRndAttr(::mlir::NVVM::FPRoundingModeAttr attr) {
getProperties().rnd = attr;
}
void setRnd(::mlir::NVVM::FPRoundingMode attrValue);
void setFtzAttr(::mlir::BoolAttr attr) {
getProperties().ftz = attr;
}
void setFtz(bool attrValue);
void setApproxAttr(::mlir::BoolAttr attr) {
getProperties().approx = attr;
}
void setApprox(bool attrValue);
void setFullAttr(::mlir::BoolAttr attr) {
getProperties().full = attr;
}
void setFull(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::BoolAttr ftz = nullptr, ::mlir::BoolAttr approx = nullptr, ::mlir::BoolAttr full = nullptr);
static DivFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::BoolAttr ftz = nullptr, ::mlir::BoolAttr approx = nullptr, ::mlir::BoolAttr full = nullptr);
static DivFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::BoolAttr ftz = nullptr, ::mlir::BoolAttr approx = nullptr, ::mlir::BoolAttr full = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::BoolAttr ftz = nullptr, ::mlir::BoolAttr approx = nullptr, ::mlir::BoolAttr full = nullptr);
static DivFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::BoolAttr ftz = nullptr, ::mlir::BoolAttr approx = nullptr, ::mlir::BoolAttr full = nullptr);
static DivFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::BoolAttr ftz = nullptr, ::mlir::BoolAttr approx = nullptr, ::mlir::BoolAttr full = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::BoolAttr ftz = nullptr, ::mlir::BoolAttr approx = nullptr, ::mlir::BoolAttr full = nullptr);
static DivFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::BoolAttr ftz = nullptr, ::mlir::BoolAttr approx = nullptr, ::mlir::BoolAttr full = nullptr);
static DivFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::BoolAttr ftz = nullptr, ::mlir::BoolAttr approx = nullptr, ::mlir::BoolAttr full = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, bool ftz = false, bool approx = false, bool full = false);
static DivFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, bool ftz = false, bool approx = false, bool full = false);
static DivFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, bool ftz = false, bool approx = false, bool full = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, bool ftz = false, bool approx = false, bool full = false);
static DivFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, bool ftz = false, bool approx = false, bool full = false);
static DivFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, bool ftz = false, bool approx = false, bool full = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, bool ftz = false, bool approx = false, bool full = false);
static DivFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, bool ftz = false, bool approx = false, bool full = false);
static DivFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, bool ftz = false, bool approx = false, bool full = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static DivFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static DivFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static DivFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static DivFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static DivFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static DivFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static DivFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static DivFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 4 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::DivFOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::DivFOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::DotAccumulate2WayOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class DotAccumulate2WayOpGenericAdaptorBase {
public:
struct Properties {
using a_typeTy = ::mlir::NVVM::DotAccumulateTypeAttr;
a_typeTy a_type;
auto getAType() const {
auto &propStorage = this->a_type;
return ::llvm::cast<::mlir::NVVM::DotAccumulateTypeAttr>(propStorage);
}
void setAType(const ::mlir::NVVM::DotAccumulateTypeAttr &propValue) {
this->a_type = propValue;
}
using b_hiTy = ::mlir::BoolAttr;
b_hiTy b_hi;
auto getBHi() const {
auto &propStorage = this->b_hi;
return ::llvm::cast<::mlir::BoolAttr>(propStorage);
}
void setBHi(const ::mlir::BoolAttr &propValue) {
this->b_hi = propValue;
}
using b_typeTy = ::mlir::NVVM::DotAccumulateTypeAttr;
b_typeTy b_type;
auto getBType() const {
auto &propStorage = this->b_type;
return ::llvm::cast<::mlir::NVVM::DotAccumulateTypeAttr>(propStorage);
}
void setBType(const ::mlir::NVVM::DotAccumulateTypeAttr &propValue) {
this->b_type = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.a_type == this->a_type &&
rhs.b_hi == this->b_hi &&
rhs.b_type == this->b_type &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
DotAccumulate2WayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.dot.accumulate.2way", odsAttrs.getContext());
}
DotAccumulate2WayOpGenericAdaptorBase(DotAccumulate2WayOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::DotAccumulateTypeAttr getATypeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::DotAccumulateTypeAttr>(getProperties().a_type);
return attr;
}
::mlir::NVVM::DotAccumulateType getAType();
::mlir::NVVM::DotAccumulateTypeAttr getBTypeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::DotAccumulateTypeAttr>(getProperties().b_type);
return attr;
}
::mlir::NVVM::DotAccumulateType getBType();
::mlir::BoolAttr getBHiAttr() {
auto attr = ::llvm::cast<::mlir::BoolAttr>(getProperties().b_hi);
return attr;
}
bool getBHi();
};
} // namespace detail
template <typename RangeT>
class DotAccumulate2WayOpGenericAdaptor : public detail::DotAccumulate2WayOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::DotAccumulate2WayOpGenericAdaptorBase;
static constexpr int odsIndex_a = 0;
static constexpr int odsIndex_b = 1;
static constexpr int odsIndex_c = 2;
public:
DotAccumulate2WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
DotAccumulate2WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : DotAccumulate2WayOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
DotAccumulate2WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : DotAccumulate2WayOpGenericAdaptor(values, attrs, Properties{}, {}) {}
DotAccumulate2WayOpGenericAdaptor(RangeT values, const DotAccumulate2WayOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = DotAccumulate2WayOp, typename = std::enable_if_t<std::is_same_v<LateInst, DotAccumulate2WayOp>>>
DotAccumulate2WayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getA() {
return (*getODSOperands(0).begin());
}
ValueT getB() {
return (*getODSOperands(1).begin());
}
ValueT getC() {
return (*getODSOperands(2).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class DotAccumulate2WayOpAdaptor : public DotAccumulate2WayOpGenericAdaptor<::mlir::ValueRange> {
public:
using DotAccumulate2WayOpGenericAdaptor::DotAccumulate2WayOpGenericAdaptor;
DotAccumulate2WayOpAdaptor(DotAccumulate2WayOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class DotAccumulate2WayOp : public ::mlir::Op<DotAccumulate2WayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<3>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = DotAccumulate2WayOpAdaptor;
template <typename RangeT>
using GenericAdaptor = DotAccumulate2WayOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_a = 0;
static constexpr int odsIndex_b = 1;
static constexpr int odsIndex_c = 2;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("a_type"), ::llvm::StringRef("b_hi"), ::llvm::StringRef("b_type")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getATypeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getATypeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getBHiAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getBHiAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getBTypeAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getBTypeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.dot.accumulate.2way");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getA() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::VectorType> getB() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getC() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin());
}
::mlir::OpOperand &getAMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getBMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getCMutable() {
auto range = getODSOperandIndexAndLength(2);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::DotAccumulateTypeAttr getATypeAttr() {
return ::llvm::cast<::mlir::NVVM::DotAccumulateTypeAttr>(getProperties().a_type);
}
::mlir::NVVM::DotAccumulateType getAType();
::mlir::NVVM::DotAccumulateTypeAttr getBTypeAttr() {
return ::llvm::cast<::mlir::NVVM::DotAccumulateTypeAttr>(getProperties().b_type);
}
::mlir::NVVM::DotAccumulateType getBType();
::mlir::BoolAttr getBHiAttr() {
return ::llvm::cast<::mlir::BoolAttr>(getProperties().b_hi);
}
bool getBHi();
void setATypeAttr(::mlir::NVVM::DotAccumulateTypeAttr attr) {
getProperties().a_type = attr;
}
void setAType(::mlir::NVVM::DotAccumulateType attrValue);
void setBTypeAttr(::mlir::NVVM::DotAccumulateTypeAttr attr) {
getProperties().b_type = attr;
}
void setBType(::mlir::NVVM::DotAccumulateType attrValue);
void setBHiAttr(::mlir::BoolAttr attr) {
getProperties().b_hi = attr;
}
void setBHi(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::NVVM::DotAccumulateTypeAttr a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateTypeAttr b_type, ::mlir::Value c, ::mlir::BoolAttr b_hi);
static DotAccumulate2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::NVVM::DotAccumulateTypeAttr a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateTypeAttr b_type, ::mlir::Value c, ::mlir::BoolAttr b_hi);
static DotAccumulate2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::NVVM::DotAccumulateTypeAttr a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateTypeAttr b_type, ::mlir::Value c, ::mlir::BoolAttr b_hi);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::NVVM::DotAccumulateTypeAttr a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateTypeAttr b_type, ::mlir::Value c, ::mlir::BoolAttr b_hi);
static DotAccumulate2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::NVVM::DotAccumulateTypeAttr a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateTypeAttr b_type, ::mlir::Value c, ::mlir::BoolAttr b_hi);
static DotAccumulate2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::NVVM::DotAccumulateTypeAttr a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateTypeAttr b_type, ::mlir::Value c, ::mlir::BoolAttr b_hi);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::NVVM::DotAccumulateTypeAttr a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateTypeAttr b_type, ::mlir::Value c, ::mlir::BoolAttr b_hi);
static DotAccumulate2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::NVVM::DotAccumulateTypeAttr a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateTypeAttr b_type, ::mlir::Value c, ::mlir::BoolAttr b_hi);
static DotAccumulate2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::NVVM::DotAccumulateTypeAttr a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateTypeAttr b_type, ::mlir::Value c, ::mlir::BoolAttr b_hi);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::NVVM::DotAccumulateType a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateType b_type, ::mlir::Value c, bool b_hi);
static DotAccumulate2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::NVVM::DotAccumulateType a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateType b_type, ::mlir::Value c, bool b_hi);
static DotAccumulate2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::NVVM::DotAccumulateType a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateType b_type, ::mlir::Value c, bool b_hi);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::NVVM::DotAccumulateType a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateType b_type, ::mlir::Value c, bool b_hi);
static DotAccumulate2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::NVVM::DotAccumulateType a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateType b_type, ::mlir::Value c, bool b_hi);
static DotAccumulate2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::NVVM::DotAccumulateType a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateType b_type, ::mlir::Value c, bool b_hi);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::NVVM::DotAccumulateType a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateType b_type, ::mlir::Value c, bool b_hi);
static DotAccumulate2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::NVVM::DotAccumulateType a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateType b_type, ::mlir::Value c, bool b_hi);
static DotAccumulate2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::NVVM::DotAccumulateType a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateType b_type, ::mlir::Value c, bool b_hi);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static DotAccumulate2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static DotAccumulate2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static DotAccumulate2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static DotAccumulate2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static DotAccumulate2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static DotAccumulate2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static DotAccumulate2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static DotAccumulate2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 3 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::DotAccumulate2WayOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::DotAccumulate2WayOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::DotAccumulate4WayOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class DotAccumulate4WayOpGenericAdaptorBase {
public:
struct Properties {
using a_typeTy = ::mlir::NVVM::DotAccumulateTypeAttr;
a_typeTy a_type;
auto getAType() const {
auto &propStorage = this->a_type;
return ::llvm::cast<::mlir::NVVM::DotAccumulateTypeAttr>(propStorage);
}
void setAType(const ::mlir::NVVM::DotAccumulateTypeAttr &propValue) {
this->a_type = propValue;
}
using b_typeTy = ::mlir::NVVM::DotAccumulateTypeAttr;
b_typeTy b_type;
auto getBType() const {
auto &propStorage = this->b_type;
return ::llvm::cast<::mlir::NVVM::DotAccumulateTypeAttr>(propStorage);
}
void setBType(const ::mlir::NVVM::DotAccumulateTypeAttr &propValue) {
this->b_type = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.a_type == this->a_type &&
rhs.b_type == this->b_type &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
DotAccumulate4WayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.dot.accumulate.4way", odsAttrs.getContext());
}
DotAccumulate4WayOpGenericAdaptorBase(DotAccumulate4WayOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::DotAccumulateTypeAttr getATypeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::DotAccumulateTypeAttr>(getProperties().a_type);
return attr;
}
::mlir::NVVM::DotAccumulateType getAType();
::mlir::NVVM::DotAccumulateTypeAttr getBTypeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::DotAccumulateTypeAttr>(getProperties().b_type);
return attr;
}
::mlir::NVVM::DotAccumulateType getBType();
};
} // namespace detail
template <typename RangeT>
class DotAccumulate4WayOpGenericAdaptor : public detail::DotAccumulate4WayOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::DotAccumulate4WayOpGenericAdaptorBase;
static constexpr int odsIndex_a = 0;
static constexpr int odsIndex_b = 1;
static constexpr int odsIndex_c = 2;
public:
DotAccumulate4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
DotAccumulate4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : DotAccumulate4WayOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
DotAccumulate4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : DotAccumulate4WayOpGenericAdaptor(values, attrs, Properties{}, {}) {}
DotAccumulate4WayOpGenericAdaptor(RangeT values, const DotAccumulate4WayOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = DotAccumulate4WayOp, typename = std::enable_if_t<std::is_same_v<LateInst, DotAccumulate4WayOp>>>
DotAccumulate4WayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getA() {
return (*getODSOperands(0).begin());
}
ValueT getB() {
return (*getODSOperands(1).begin());
}
ValueT getC() {
return (*getODSOperands(2).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class DotAccumulate4WayOpAdaptor : public DotAccumulate4WayOpGenericAdaptor<::mlir::ValueRange> {
public:
using DotAccumulate4WayOpGenericAdaptor::DotAccumulate4WayOpGenericAdaptor;
DotAccumulate4WayOpAdaptor(DotAccumulate4WayOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class DotAccumulate4WayOp : public ::mlir::Op<DotAccumulate4WayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<3>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = DotAccumulate4WayOpAdaptor;
template <typename RangeT>
using GenericAdaptor = DotAccumulate4WayOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_a = 0;
static constexpr int odsIndex_b = 1;
static constexpr int odsIndex_c = 2;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("a_type"), ::llvm::StringRef("b_type")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getATypeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getATypeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getBTypeAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getBTypeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.dot.accumulate.4way");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getA() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::VectorType> getB() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getC() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin());
}
::mlir::OpOperand &getAMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getBMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getCMutable() {
auto range = getODSOperandIndexAndLength(2);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::DotAccumulateTypeAttr getATypeAttr() {
return ::llvm::cast<::mlir::NVVM::DotAccumulateTypeAttr>(getProperties().a_type);
}
::mlir::NVVM::DotAccumulateType getAType();
::mlir::NVVM::DotAccumulateTypeAttr getBTypeAttr() {
return ::llvm::cast<::mlir::NVVM::DotAccumulateTypeAttr>(getProperties().b_type);
}
::mlir::NVVM::DotAccumulateType getBType();
void setATypeAttr(::mlir::NVVM::DotAccumulateTypeAttr attr) {
getProperties().a_type = attr;
}
void setAType(::mlir::NVVM::DotAccumulateType attrValue);
void setBTypeAttr(::mlir::NVVM::DotAccumulateTypeAttr attr) {
getProperties().b_type = attr;
}
void setBType(::mlir::NVVM::DotAccumulateType attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::NVVM::DotAccumulateTypeAttr a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateTypeAttr b_type, ::mlir::Value c);
static DotAccumulate4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::NVVM::DotAccumulateTypeAttr a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateTypeAttr b_type, ::mlir::Value c);
static DotAccumulate4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::NVVM::DotAccumulateTypeAttr a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateTypeAttr b_type, ::mlir::Value c);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::NVVM::DotAccumulateTypeAttr a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateTypeAttr b_type, ::mlir::Value c);
static DotAccumulate4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::NVVM::DotAccumulateTypeAttr a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateTypeAttr b_type, ::mlir::Value c);
static DotAccumulate4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::NVVM::DotAccumulateTypeAttr a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateTypeAttr b_type, ::mlir::Value c);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::NVVM::DotAccumulateTypeAttr a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateTypeAttr b_type, ::mlir::Value c);
static DotAccumulate4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::NVVM::DotAccumulateTypeAttr a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateTypeAttr b_type, ::mlir::Value c);
static DotAccumulate4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::NVVM::DotAccumulateTypeAttr a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateTypeAttr b_type, ::mlir::Value c);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::NVVM::DotAccumulateType a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateType b_type, ::mlir::Value c);
static DotAccumulate4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::NVVM::DotAccumulateType a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateType b_type, ::mlir::Value c);
static DotAccumulate4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::NVVM::DotAccumulateType a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateType b_type, ::mlir::Value c);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::NVVM::DotAccumulateType a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateType b_type, ::mlir::Value c);
static DotAccumulate4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::NVVM::DotAccumulateType a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateType b_type, ::mlir::Value c);
static DotAccumulate4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::NVVM::DotAccumulateType a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateType b_type, ::mlir::Value c);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::NVVM::DotAccumulateType a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateType b_type, ::mlir::Value c);
static DotAccumulate4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::NVVM::DotAccumulateType a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateType b_type, ::mlir::Value c);
static DotAccumulate4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::NVVM::DotAccumulateType a_type, ::mlir::Value b, ::mlir::NVVM::DotAccumulateType b_type, ::mlir::Value c);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static DotAccumulate4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static DotAccumulate4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static DotAccumulate4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static DotAccumulate4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static DotAccumulate4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static DotAccumulate4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static DotAccumulate4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static DotAccumulate4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::DotAccumulate4WayOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::DotAccumulate4WayOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::DynamicSmemSize declarations
//===----------------------------------------------------------------------===//
namespace detail {
class DynamicSmemSizeGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
DynamicSmemSizeGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.dynamic.smem.size", odsAttrs.getContext());
}
DynamicSmemSizeGenericAdaptorBase(DynamicSmemSize op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class DynamicSmemSizeGenericAdaptor : public detail::DynamicSmemSizeGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::DynamicSmemSizeGenericAdaptorBase;
public:
DynamicSmemSizeGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
DynamicSmemSizeGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : DynamicSmemSizeGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
DynamicSmemSizeGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : DynamicSmemSizeGenericAdaptor(values, attrs, Properties{}, {}) {}
DynamicSmemSizeGenericAdaptor(RangeT values, const DynamicSmemSizeGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = DynamicSmemSize, typename = std::enable_if_t<std::is_same_v<LateInst, DynamicSmemSize>>>
DynamicSmemSizeGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class DynamicSmemSizeAdaptor : public DynamicSmemSizeGenericAdaptor<::mlir::ValueRange> {
public:
using DynamicSmemSizeGenericAdaptor::DynamicSmemSizeGenericAdaptor;
DynamicSmemSizeAdaptor(DynamicSmemSize op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class DynamicSmemSize : public ::mlir::Op<DynamicSmemSize, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = DynamicSmemSizeAdaptor;
template <typename RangeT>
using GenericAdaptor = DynamicSmemSizeGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.dynamic.smem.size");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static DynamicSmemSize create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static DynamicSmemSize create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static DynamicSmemSize create(::mlir::OpBuilder &builder, ::mlir::Location location);
static DynamicSmemSize create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static DynamicSmemSize create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static DynamicSmemSize create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static DynamicSmemSize create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static DynamicSmemSize create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static DynamicSmemSize create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static DynamicSmemSize create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static DynamicSmemSize create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static DynamicSmemSize create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static DynamicSmemSize create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static DynamicSmemSize create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::DynamicSmemSize)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ElectSyncOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ElectSyncOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ElectSyncOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.elect.sync", odsAttrs.getContext());
}
ElectSyncOpGenericAdaptorBase(ElectSyncOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class ElectSyncOpGenericAdaptor : public detail::ElectSyncOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ElectSyncOpGenericAdaptorBase;
static constexpr int odsIndex_membermask = 0;
public:
ElectSyncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ElectSyncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ElectSyncOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ElectSyncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ElectSyncOpGenericAdaptor(values, attrs, Properties{}, {}) {}
ElectSyncOpGenericAdaptor(RangeT values, const ElectSyncOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ElectSyncOp, typename = std::enable_if_t<std::is_same_v<LateInst, ElectSyncOp>>>
ElectSyncOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getMembermask() {
auto operands = getODSOperands(0);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ElectSyncOpAdaptor : public ElectSyncOpGenericAdaptor<::mlir::ValueRange> {
public:
using ElectSyncOpGenericAdaptor::ElectSyncOpGenericAdaptor;
ElectSyncOpAdaptor(ElectSyncOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ElectSyncOp : public ::mlir::Op<ElectSyncOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::VariadicOperands, ::mlir::OpTrait::OpInvariants, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ElectSyncOpAdaptor;
template <typename RangeT>
using GenericAdaptor = ElectSyncOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_membermask = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.elect.sync");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getMembermask() {
auto operands = getODSOperands(0);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::MutableOperandRange getMembermaskMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getPred() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type pred, /*optional*/::mlir::Value membermask);
static ElectSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type pred, /*optional*/::mlir::Value membermask);
static ElectSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type pred, /*optional*/::mlir::Value membermask);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::Value membermask);
static ElectSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::Value membermask);
static ElectSyncOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::Value membermask);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::Value membermask);
static ElectSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::Value membermask);
static ElectSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::Value membermask);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ElectSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ElectSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ElectSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ElectSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ElectSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ElectSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ElectSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ElectSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ElectSyncOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg0Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg0OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg0OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg0", odsAttrs.getContext());
}
EnvReg0OpGenericAdaptorBase(EnvReg0Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg0OpGenericAdaptor : public detail::EnvReg0OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg0OpGenericAdaptorBase;
public:
EnvReg0OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg0OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg0OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg0OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg0OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg0OpGenericAdaptor(RangeT values, const EnvReg0OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg0Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg0Op>>>
EnvReg0OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg0OpAdaptor : public EnvReg0OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg0OpGenericAdaptor::EnvReg0OpGenericAdaptor;
EnvReg0OpAdaptor(EnvReg0Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg0Op : public ::mlir::Op<EnvReg0Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg0OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg0OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg0");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg0Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg0Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg0Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg0Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg0Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg0Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg0Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg0Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg0Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg0Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg0Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg0Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg0Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg0Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg0Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg10Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg10OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg10OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg10", odsAttrs.getContext());
}
EnvReg10OpGenericAdaptorBase(EnvReg10Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg10OpGenericAdaptor : public detail::EnvReg10OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg10OpGenericAdaptorBase;
public:
EnvReg10OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg10OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg10OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg10OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg10OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg10OpGenericAdaptor(RangeT values, const EnvReg10OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg10Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg10Op>>>
EnvReg10OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg10OpAdaptor : public EnvReg10OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg10OpGenericAdaptor::EnvReg10OpGenericAdaptor;
EnvReg10OpAdaptor(EnvReg10Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg10Op : public ::mlir::Op<EnvReg10Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg10OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg10OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg10");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg10Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg10Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg10Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg10Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg10Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg10Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg10Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg10Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg10Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg11Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg11OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg11OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg11", odsAttrs.getContext());
}
EnvReg11OpGenericAdaptorBase(EnvReg11Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg11OpGenericAdaptor : public detail::EnvReg11OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg11OpGenericAdaptorBase;
public:
EnvReg11OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg11OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg11OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg11OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg11OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg11OpGenericAdaptor(RangeT values, const EnvReg11OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg11Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg11Op>>>
EnvReg11OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg11OpAdaptor : public EnvReg11OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg11OpGenericAdaptor::EnvReg11OpGenericAdaptor;
EnvReg11OpAdaptor(EnvReg11Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg11Op : public ::mlir::Op<EnvReg11Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg11OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg11OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg11");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg11Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg11Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg11Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg11Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg11Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg11Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg11Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg11Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg11Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg11Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg11Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg11Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg11Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg11Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg11Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg12Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg12OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg12OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg12", odsAttrs.getContext());
}
EnvReg12OpGenericAdaptorBase(EnvReg12Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg12OpGenericAdaptor : public detail::EnvReg12OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg12OpGenericAdaptorBase;
public:
EnvReg12OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg12OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg12OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg12OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg12OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg12OpGenericAdaptor(RangeT values, const EnvReg12OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg12Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg12Op>>>
EnvReg12OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg12OpAdaptor : public EnvReg12OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg12OpGenericAdaptor::EnvReg12OpGenericAdaptor;
EnvReg12OpAdaptor(EnvReg12Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg12Op : public ::mlir::Op<EnvReg12Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg12OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg12OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg12");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg12Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg12Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg12Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg12Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg12Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg12Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg12Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg12Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg12Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg12Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg12Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg12Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg12Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg12Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg12Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg13Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg13OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg13OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg13", odsAttrs.getContext());
}
EnvReg13OpGenericAdaptorBase(EnvReg13Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg13OpGenericAdaptor : public detail::EnvReg13OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg13OpGenericAdaptorBase;
public:
EnvReg13OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg13OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg13OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg13OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg13OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg13OpGenericAdaptor(RangeT values, const EnvReg13OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg13Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg13Op>>>
EnvReg13OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg13OpAdaptor : public EnvReg13OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg13OpGenericAdaptor::EnvReg13OpGenericAdaptor;
EnvReg13OpAdaptor(EnvReg13Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg13Op : public ::mlir::Op<EnvReg13Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg13OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg13OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg13");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg13Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg13Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg13Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg13Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg13Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg13Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg13Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg13Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg13Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg13Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg13Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg13Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg13Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg13Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg13Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg14Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg14OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg14OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg14", odsAttrs.getContext());
}
EnvReg14OpGenericAdaptorBase(EnvReg14Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg14OpGenericAdaptor : public detail::EnvReg14OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg14OpGenericAdaptorBase;
public:
EnvReg14OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg14OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg14OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg14OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg14OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg14OpGenericAdaptor(RangeT values, const EnvReg14OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg14Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg14Op>>>
EnvReg14OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg14OpAdaptor : public EnvReg14OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg14OpGenericAdaptor::EnvReg14OpGenericAdaptor;
EnvReg14OpAdaptor(EnvReg14Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg14Op : public ::mlir::Op<EnvReg14Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg14OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg14OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg14");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg14Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg14Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg14Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg14Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg14Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg14Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg14Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg14Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg14Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg14Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg14Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg14Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg14Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg14Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg14Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg15Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg15OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg15OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg15", odsAttrs.getContext());
}
EnvReg15OpGenericAdaptorBase(EnvReg15Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg15OpGenericAdaptor : public detail::EnvReg15OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg15OpGenericAdaptorBase;
public:
EnvReg15OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg15OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg15OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg15OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg15OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg15OpGenericAdaptor(RangeT values, const EnvReg15OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg15Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg15Op>>>
EnvReg15OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg15OpAdaptor : public EnvReg15OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg15OpGenericAdaptor::EnvReg15OpGenericAdaptor;
EnvReg15OpAdaptor(EnvReg15Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg15Op : public ::mlir::Op<EnvReg15Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg15OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg15OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg15");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg15Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg15Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg15Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg15Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg15Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg15Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg15Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg15Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg15Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg15Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg15Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg15Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg15Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg15Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg15Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg16Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg16OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg16OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg16", odsAttrs.getContext());
}
EnvReg16OpGenericAdaptorBase(EnvReg16Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg16OpGenericAdaptor : public detail::EnvReg16OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg16OpGenericAdaptorBase;
public:
EnvReg16OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg16OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg16OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg16OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg16OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg16OpGenericAdaptor(RangeT values, const EnvReg16OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg16Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg16Op>>>
EnvReg16OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg16OpAdaptor : public EnvReg16OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg16OpGenericAdaptor::EnvReg16OpGenericAdaptor;
EnvReg16OpAdaptor(EnvReg16Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg16Op : public ::mlir::Op<EnvReg16Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg16OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg16OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg16");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg16Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg16Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg16Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg16Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg16Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg16Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg16Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg16Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg16Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg16Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg16Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg16Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg16Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg16Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg16Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg17Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg17OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg17OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg17", odsAttrs.getContext());
}
EnvReg17OpGenericAdaptorBase(EnvReg17Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg17OpGenericAdaptor : public detail::EnvReg17OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg17OpGenericAdaptorBase;
public:
EnvReg17OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg17OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg17OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg17OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg17OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg17OpGenericAdaptor(RangeT values, const EnvReg17OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg17Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg17Op>>>
EnvReg17OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg17OpAdaptor : public EnvReg17OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg17OpGenericAdaptor::EnvReg17OpGenericAdaptor;
EnvReg17OpAdaptor(EnvReg17Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg17Op : public ::mlir::Op<EnvReg17Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg17OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg17OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg17");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg17Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg17Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg17Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg17Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg17Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg17Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg17Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg17Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg17Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg17Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg17Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg17Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg17Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg17Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg17Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg18Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg18OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg18OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg18", odsAttrs.getContext());
}
EnvReg18OpGenericAdaptorBase(EnvReg18Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg18OpGenericAdaptor : public detail::EnvReg18OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg18OpGenericAdaptorBase;
public:
EnvReg18OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg18OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg18OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg18OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg18OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg18OpGenericAdaptor(RangeT values, const EnvReg18OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg18Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg18Op>>>
EnvReg18OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg18OpAdaptor : public EnvReg18OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg18OpGenericAdaptor::EnvReg18OpGenericAdaptor;
EnvReg18OpAdaptor(EnvReg18Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg18Op : public ::mlir::Op<EnvReg18Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg18OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg18OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg18");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg18Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg18Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg18Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg18Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg18Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg18Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg18Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg18Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg18Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg18Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg18Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg18Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg18Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg18Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg18Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg19Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg19OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg19OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg19", odsAttrs.getContext());
}
EnvReg19OpGenericAdaptorBase(EnvReg19Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg19OpGenericAdaptor : public detail::EnvReg19OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg19OpGenericAdaptorBase;
public:
EnvReg19OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg19OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg19OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg19OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg19OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg19OpGenericAdaptor(RangeT values, const EnvReg19OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg19Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg19Op>>>
EnvReg19OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg19OpAdaptor : public EnvReg19OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg19OpGenericAdaptor::EnvReg19OpGenericAdaptor;
EnvReg19OpAdaptor(EnvReg19Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg19Op : public ::mlir::Op<EnvReg19Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg19OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg19OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg19");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg19Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg19Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg19Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg19Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg19Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg19Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg19Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg19Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg19Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg19Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg19Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg19Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg19Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg19Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg19Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg1Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg1OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg1OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg1", odsAttrs.getContext());
}
EnvReg1OpGenericAdaptorBase(EnvReg1Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg1OpGenericAdaptor : public detail::EnvReg1OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg1OpGenericAdaptorBase;
public:
EnvReg1OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg1OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg1OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg1OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg1OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg1OpGenericAdaptor(RangeT values, const EnvReg1OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg1Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg1Op>>>
EnvReg1OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg1OpAdaptor : public EnvReg1OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg1OpGenericAdaptor::EnvReg1OpGenericAdaptor;
EnvReg1OpAdaptor(EnvReg1Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg1Op : public ::mlir::Op<EnvReg1Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg1OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg1OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg1");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg1Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg1Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg1Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg1Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg1Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg1Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg1Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg1Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg1Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg1Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg1Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg1Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg1Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg1Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg1Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg20Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg20OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg20OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg20", odsAttrs.getContext());
}
EnvReg20OpGenericAdaptorBase(EnvReg20Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg20OpGenericAdaptor : public detail::EnvReg20OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg20OpGenericAdaptorBase;
public:
EnvReg20OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg20OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg20OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg20OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg20OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg20OpGenericAdaptor(RangeT values, const EnvReg20OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg20Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg20Op>>>
EnvReg20OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg20OpAdaptor : public EnvReg20OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg20OpGenericAdaptor::EnvReg20OpGenericAdaptor;
EnvReg20OpAdaptor(EnvReg20Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg20Op : public ::mlir::Op<EnvReg20Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg20OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg20OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg20");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg20Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg20Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg20Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg20Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg20Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg20Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg20Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg20Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg20Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg20Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg20Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg20Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg20Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg20Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg20Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg21Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg21OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg21OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg21", odsAttrs.getContext());
}
EnvReg21OpGenericAdaptorBase(EnvReg21Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg21OpGenericAdaptor : public detail::EnvReg21OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg21OpGenericAdaptorBase;
public:
EnvReg21OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg21OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg21OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg21OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg21OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg21OpGenericAdaptor(RangeT values, const EnvReg21OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg21Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg21Op>>>
EnvReg21OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg21OpAdaptor : public EnvReg21OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg21OpGenericAdaptor::EnvReg21OpGenericAdaptor;
EnvReg21OpAdaptor(EnvReg21Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg21Op : public ::mlir::Op<EnvReg21Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg21OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg21OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg21");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg21Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg21Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg21Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg21Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg21Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg21Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg21Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg21Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg21Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg21Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg21Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg21Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg21Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg21Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg21Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg22Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg22OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg22OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg22", odsAttrs.getContext());
}
EnvReg22OpGenericAdaptorBase(EnvReg22Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg22OpGenericAdaptor : public detail::EnvReg22OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg22OpGenericAdaptorBase;
public:
EnvReg22OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg22OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg22OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg22OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg22OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg22OpGenericAdaptor(RangeT values, const EnvReg22OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg22Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg22Op>>>
EnvReg22OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg22OpAdaptor : public EnvReg22OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg22OpGenericAdaptor::EnvReg22OpGenericAdaptor;
EnvReg22OpAdaptor(EnvReg22Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg22Op : public ::mlir::Op<EnvReg22Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg22OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg22OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg22");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg22Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg22Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg22Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg22Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg22Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg22Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg22Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg22Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg22Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg22Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg22Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg22Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg22Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg22Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg22Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg23Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg23OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg23OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg23", odsAttrs.getContext());
}
EnvReg23OpGenericAdaptorBase(EnvReg23Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg23OpGenericAdaptor : public detail::EnvReg23OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg23OpGenericAdaptorBase;
public:
EnvReg23OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg23OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg23OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg23OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg23OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg23OpGenericAdaptor(RangeT values, const EnvReg23OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg23Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg23Op>>>
EnvReg23OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg23OpAdaptor : public EnvReg23OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg23OpGenericAdaptor::EnvReg23OpGenericAdaptor;
EnvReg23OpAdaptor(EnvReg23Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg23Op : public ::mlir::Op<EnvReg23Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg23OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg23OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg23");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg23Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg23Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg23Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg23Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg23Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg23Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg23Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg23Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg23Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg23Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg23Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg23Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg23Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg23Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg23Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg24Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg24OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg24OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg24", odsAttrs.getContext());
}
EnvReg24OpGenericAdaptorBase(EnvReg24Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg24OpGenericAdaptor : public detail::EnvReg24OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg24OpGenericAdaptorBase;
public:
EnvReg24OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg24OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg24OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg24OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg24OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg24OpGenericAdaptor(RangeT values, const EnvReg24OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg24Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg24Op>>>
EnvReg24OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg24OpAdaptor : public EnvReg24OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg24OpGenericAdaptor::EnvReg24OpGenericAdaptor;
EnvReg24OpAdaptor(EnvReg24Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg24Op : public ::mlir::Op<EnvReg24Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg24OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg24OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg24");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg24Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg24Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg24Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg24Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg24Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg24Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg24Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg24Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg24Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg24Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg24Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg24Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg24Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg24Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg24Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg25Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg25OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg25OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg25", odsAttrs.getContext());
}
EnvReg25OpGenericAdaptorBase(EnvReg25Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg25OpGenericAdaptor : public detail::EnvReg25OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg25OpGenericAdaptorBase;
public:
EnvReg25OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg25OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg25OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg25OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg25OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg25OpGenericAdaptor(RangeT values, const EnvReg25OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg25Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg25Op>>>
EnvReg25OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg25OpAdaptor : public EnvReg25OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg25OpGenericAdaptor::EnvReg25OpGenericAdaptor;
EnvReg25OpAdaptor(EnvReg25Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg25Op : public ::mlir::Op<EnvReg25Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg25OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg25OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg25");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg25Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg25Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg25Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg25Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg25Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg25Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg25Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg25Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg25Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg25Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg25Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg25Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg25Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg25Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg25Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg26Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg26OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg26OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg26", odsAttrs.getContext());
}
EnvReg26OpGenericAdaptorBase(EnvReg26Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg26OpGenericAdaptor : public detail::EnvReg26OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg26OpGenericAdaptorBase;
public:
EnvReg26OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg26OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg26OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg26OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg26OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg26OpGenericAdaptor(RangeT values, const EnvReg26OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg26Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg26Op>>>
EnvReg26OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg26OpAdaptor : public EnvReg26OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg26OpGenericAdaptor::EnvReg26OpGenericAdaptor;
EnvReg26OpAdaptor(EnvReg26Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg26Op : public ::mlir::Op<EnvReg26Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg26OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg26OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg26");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg26Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg26Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg26Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg26Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg26Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg26Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg26Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg26Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg26Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg26Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg26Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg26Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg26Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg26Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg26Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg27Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg27OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg27OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg27", odsAttrs.getContext());
}
EnvReg27OpGenericAdaptorBase(EnvReg27Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg27OpGenericAdaptor : public detail::EnvReg27OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg27OpGenericAdaptorBase;
public:
EnvReg27OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg27OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg27OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg27OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg27OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg27OpGenericAdaptor(RangeT values, const EnvReg27OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg27Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg27Op>>>
EnvReg27OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg27OpAdaptor : public EnvReg27OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg27OpGenericAdaptor::EnvReg27OpGenericAdaptor;
EnvReg27OpAdaptor(EnvReg27Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg27Op : public ::mlir::Op<EnvReg27Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg27OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg27OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg27");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg27Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg27Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg27Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg27Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg27Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg27Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg27Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg27Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg27Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg27Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg27Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg27Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg27Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg27Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg27Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg28Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg28OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg28OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg28", odsAttrs.getContext());
}
EnvReg28OpGenericAdaptorBase(EnvReg28Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg28OpGenericAdaptor : public detail::EnvReg28OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg28OpGenericAdaptorBase;
public:
EnvReg28OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg28OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg28OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg28OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg28OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg28OpGenericAdaptor(RangeT values, const EnvReg28OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg28Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg28Op>>>
EnvReg28OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg28OpAdaptor : public EnvReg28OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg28OpGenericAdaptor::EnvReg28OpGenericAdaptor;
EnvReg28OpAdaptor(EnvReg28Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg28Op : public ::mlir::Op<EnvReg28Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg28OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg28OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg28");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg28Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg28Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg28Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg28Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg28Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg28Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg28Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg28Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg28Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg28Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg28Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg28Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg28Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg28Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg28Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg29Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg29OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg29OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg29", odsAttrs.getContext());
}
EnvReg29OpGenericAdaptorBase(EnvReg29Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg29OpGenericAdaptor : public detail::EnvReg29OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg29OpGenericAdaptorBase;
public:
EnvReg29OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg29OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg29OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg29OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg29OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg29OpGenericAdaptor(RangeT values, const EnvReg29OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg29Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg29Op>>>
EnvReg29OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg29OpAdaptor : public EnvReg29OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg29OpGenericAdaptor::EnvReg29OpGenericAdaptor;
EnvReg29OpAdaptor(EnvReg29Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg29Op : public ::mlir::Op<EnvReg29Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg29OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg29OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg29");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg29Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg29Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg29Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg29Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg29Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg29Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg29Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg29Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg29Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg29Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg29Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg29Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg29Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg29Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg29Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg2Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg2OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg2", odsAttrs.getContext());
}
EnvReg2OpGenericAdaptorBase(EnvReg2Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg2OpGenericAdaptor : public detail::EnvReg2OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg2OpGenericAdaptorBase;
public:
EnvReg2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg2OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg2OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg2OpGenericAdaptor(RangeT values, const EnvReg2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg2Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg2Op>>>
EnvReg2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg2OpAdaptor : public EnvReg2OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg2OpGenericAdaptor::EnvReg2OpGenericAdaptor;
EnvReg2OpAdaptor(EnvReg2Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg2Op : public ::mlir::Op<EnvReg2Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg2OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg2OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg2");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg2Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg2Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg2Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg30Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg30OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg30OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg30", odsAttrs.getContext());
}
EnvReg30OpGenericAdaptorBase(EnvReg30Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg30OpGenericAdaptor : public detail::EnvReg30OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg30OpGenericAdaptorBase;
public:
EnvReg30OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg30OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg30OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg30OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg30OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg30OpGenericAdaptor(RangeT values, const EnvReg30OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg30Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg30Op>>>
EnvReg30OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg30OpAdaptor : public EnvReg30OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg30OpGenericAdaptor::EnvReg30OpGenericAdaptor;
EnvReg30OpAdaptor(EnvReg30Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg30Op : public ::mlir::Op<EnvReg30Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg30OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg30OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg30");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg30Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg30Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg30Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg30Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg30Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg30Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg30Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg30Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg30Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg30Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg30Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg30Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg30Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg30Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg30Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg31Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg31OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg31OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg31", odsAttrs.getContext());
}
EnvReg31OpGenericAdaptorBase(EnvReg31Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg31OpGenericAdaptor : public detail::EnvReg31OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg31OpGenericAdaptorBase;
public:
EnvReg31OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg31OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg31OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg31OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg31OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg31OpGenericAdaptor(RangeT values, const EnvReg31OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg31Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg31Op>>>
EnvReg31OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg31OpAdaptor : public EnvReg31OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg31OpGenericAdaptor::EnvReg31OpGenericAdaptor;
EnvReg31OpAdaptor(EnvReg31Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg31Op : public ::mlir::Op<EnvReg31Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg31OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg31OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg31");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg31Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg31Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg31Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg31Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg31Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg31Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg31Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg31Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg31Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg31Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg31Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg31Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg31Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg31Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg31Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg3Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg3OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg3OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg3", odsAttrs.getContext());
}
EnvReg3OpGenericAdaptorBase(EnvReg3Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg3OpGenericAdaptor : public detail::EnvReg3OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg3OpGenericAdaptorBase;
public:
EnvReg3OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg3OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg3OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg3OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg3OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg3OpGenericAdaptor(RangeT values, const EnvReg3OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg3Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg3Op>>>
EnvReg3OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg3OpAdaptor : public EnvReg3OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg3OpGenericAdaptor::EnvReg3OpGenericAdaptor;
EnvReg3OpAdaptor(EnvReg3Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg3Op : public ::mlir::Op<EnvReg3Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg3OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg3OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg3");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg3Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg3Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg3Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg3Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg3Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg3Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg3Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg3Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg3Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg3Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg3Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg3Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg3Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg3Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg3Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg4Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg4OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg4OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg4", odsAttrs.getContext());
}
EnvReg4OpGenericAdaptorBase(EnvReg4Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg4OpGenericAdaptor : public detail::EnvReg4OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg4OpGenericAdaptorBase;
public:
EnvReg4OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg4OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg4OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg4OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg4OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg4OpGenericAdaptor(RangeT values, const EnvReg4OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg4Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg4Op>>>
EnvReg4OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg4OpAdaptor : public EnvReg4OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg4OpGenericAdaptor::EnvReg4OpGenericAdaptor;
EnvReg4OpAdaptor(EnvReg4Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg4Op : public ::mlir::Op<EnvReg4Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg4OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg4OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg4");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg4Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg4Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg4Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg4Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg4Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg5Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg5OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg5OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg5", odsAttrs.getContext());
}
EnvReg5OpGenericAdaptorBase(EnvReg5Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg5OpGenericAdaptor : public detail::EnvReg5OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg5OpGenericAdaptorBase;
public:
EnvReg5OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg5OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg5OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg5OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg5OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg5OpGenericAdaptor(RangeT values, const EnvReg5OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg5Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg5Op>>>
EnvReg5OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg5OpAdaptor : public EnvReg5OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg5OpGenericAdaptor::EnvReg5OpGenericAdaptor;
EnvReg5OpAdaptor(EnvReg5Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg5Op : public ::mlir::Op<EnvReg5Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg5OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg5OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg5");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg5Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg5Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg5Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg5Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg5Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg5Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg5Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg5Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg5Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg5Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg5Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg5Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg5Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg5Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg5Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg6Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg6OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg6OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg6", odsAttrs.getContext());
}
EnvReg6OpGenericAdaptorBase(EnvReg6Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg6OpGenericAdaptor : public detail::EnvReg6OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg6OpGenericAdaptorBase;
public:
EnvReg6OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg6OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg6OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg6OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg6OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg6OpGenericAdaptor(RangeT values, const EnvReg6OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg6Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg6Op>>>
EnvReg6OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg6OpAdaptor : public EnvReg6OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg6OpGenericAdaptor::EnvReg6OpGenericAdaptor;
EnvReg6OpAdaptor(EnvReg6Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg6Op : public ::mlir::Op<EnvReg6Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg6OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg6OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg6");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg6Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg6Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg6Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg6Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg6Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg6Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg6Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg6Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg6Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg6Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg6Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg6Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg6Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg6Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg6Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg7Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg7OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg7OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg7", odsAttrs.getContext());
}
EnvReg7OpGenericAdaptorBase(EnvReg7Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg7OpGenericAdaptor : public detail::EnvReg7OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg7OpGenericAdaptorBase;
public:
EnvReg7OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg7OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg7OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg7OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg7OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg7OpGenericAdaptor(RangeT values, const EnvReg7OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg7Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg7Op>>>
EnvReg7OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg7OpAdaptor : public EnvReg7OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg7OpGenericAdaptor::EnvReg7OpGenericAdaptor;
EnvReg7OpAdaptor(EnvReg7Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg7Op : public ::mlir::Op<EnvReg7Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg7OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg7OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg7");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg7Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg7Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg7Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg7Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg7Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg7Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg7Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg7Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg7Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg7Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg7Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg7Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg7Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg7Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg7Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg8Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg8OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg8OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg8", odsAttrs.getContext());
}
EnvReg8OpGenericAdaptorBase(EnvReg8Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg8OpGenericAdaptor : public detail::EnvReg8OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg8OpGenericAdaptorBase;
public:
EnvReg8OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg8OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg8OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg8OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg8OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg8OpGenericAdaptor(RangeT values, const EnvReg8OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg8Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg8Op>>>
EnvReg8OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg8OpAdaptor : public EnvReg8OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg8OpGenericAdaptor::EnvReg8OpGenericAdaptor;
EnvReg8OpAdaptor(EnvReg8Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg8Op : public ::mlir::Op<EnvReg8Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg8OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg8OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg8");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg8Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg8Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg8Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg8Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg8Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg8Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg8Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg8Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg8Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg8Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg8Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg8Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg8Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg8Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg8Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::EnvReg9Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class EnvReg9OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
EnvReg9OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.envreg9", odsAttrs.getContext());
}
EnvReg9OpGenericAdaptorBase(EnvReg9Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class EnvReg9OpGenericAdaptor : public detail::EnvReg9OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::EnvReg9OpGenericAdaptorBase;
public:
EnvReg9OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
EnvReg9OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EnvReg9OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
EnvReg9OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EnvReg9OpGenericAdaptor(values, attrs, Properties{}, {}) {}
EnvReg9OpGenericAdaptor(RangeT values, const EnvReg9OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = EnvReg9Op, typename = std::enable_if_t<std::is_same_v<LateInst, EnvReg9Op>>>
EnvReg9OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class EnvReg9OpAdaptor : public EnvReg9OpGenericAdaptor<::mlir::ValueRange> {
public:
using EnvReg9OpGenericAdaptor::EnvReg9OpGenericAdaptor;
EnvReg9OpAdaptor(EnvReg9Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class EnvReg9Op : public ::mlir::Op<EnvReg9Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = EnvReg9OpAdaptor;
template <typename RangeT>
using GenericAdaptor = EnvReg9OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.envreg9");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static EnvReg9Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static EnvReg9Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static EnvReg9Op create(::mlir::OpBuilder &builder, ::mlir::Location location);
static EnvReg9Op create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static EnvReg9Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static EnvReg9Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg9Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg9Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg9Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static EnvReg9Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg9Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg9Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg9Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static EnvReg9Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::EnvReg9Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::Ex2Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class Ex2OpGenericAdaptorBase {
public:
struct Properties {
using ftzTy = ::mlir::BoolAttr;
ftzTy ftz;
auto getFtz() const {
auto &propStorage = this->ftz;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setFtz(const ::mlir::BoolAttr &propValue) {
this->ftz = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.ftz == this->ftz &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
Ex2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.ex2", odsAttrs.getContext());
}
Ex2OpGenericAdaptorBase(Ex2Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::BoolAttr getFtzAttr();
bool getFtz();
};
} // namespace detail
template <typename RangeT>
class Ex2OpGenericAdaptor : public detail::Ex2OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::Ex2OpGenericAdaptorBase;
static constexpr int odsIndex_src = 0;
public:
Ex2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
Ex2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Ex2OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
Ex2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : Ex2OpGenericAdaptor(values, attrs, Properties{}, {}) {}
Ex2OpGenericAdaptor(RangeT values, const Ex2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = Ex2Op, typename = std::enable_if_t<std::is_same_v<LateInst, Ex2Op>>>
Ex2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrc() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class Ex2OpAdaptor : public Ex2OpGenericAdaptor<::mlir::ValueRange> {
public:
using Ex2OpGenericAdaptor::Ex2OpGenericAdaptor;
Ex2OpAdaptor(Ex2Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class Ex2Op : public ::mlir::Op<Ex2Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::FloatType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = Ex2OpAdaptor;
template <typename RangeT>
using GenericAdaptor = Ex2OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("ftz")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getFtzAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getFtzAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.ex2");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::FloatType> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::FloatType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::BoolAttr getFtzAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().ftz);
}
bool getFtz();
void setFtzAttr(::mlir::BoolAttr attr) {
getProperties().ftz = attr;
}
void setFtz(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::BoolAttr ftz);
static Ex2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::BoolAttr ftz);
static Ex2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::BoolAttr ftz);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value src, ::mlir::BoolAttr ftz);
static Ex2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value src, ::mlir::BoolAttr ftz);
static Ex2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value src, ::mlir::BoolAttr ftz);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr ftz);
static Ex2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr ftz);
static Ex2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr ftz);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, bool ftz = false);
static Ex2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, bool ftz = false);
static Ex2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, bool ftz = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value src, bool ftz = false);
static Ex2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value src, bool ftz = false);
static Ex2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value src, bool ftz = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool ftz = false);
static Ex2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool ftz = false);
static Ex2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool ftz = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Ex2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Ex2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Ex2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Ex2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Ex2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Ex2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Ex2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Ex2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::Ex2Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::Ex2OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::Exit declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ExitGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ExitGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.exit", odsAttrs.getContext());
}
ExitGenericAdaptorBase(Exit op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class ExitGenericAdaptor : public detail::ExitGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ExitGenericAdaptorBase;
public:
ExitGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ExitGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ExitGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ExitGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ExitGenericAdaptor(values, attrs, Properties{}, {}) {}
ExitGenericAdaptor(RangeT values, const ExitGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = Exit, typename = std::enable_if_t<std::is_same_v<LateInst, Exit>>>
ExitGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ExitAdaptor : public ExitGenericAdaptor<::mlir::ValueRange> {
public:
using ExitGenericAdaptor::ExitGenericAdaptor;
ExitAdaptor(Exit op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class Exit : public ::mlir::Op<Exit, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants> {
public:
using Op::Op;
using Op::print;
using Adaptor = ExitAdaptor;
template <typename RangeT>
using GenericAdaptor = ExitGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.exit");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static Exit create(::mlir::OpBuilder &builder, ::mlir::Location location);
static Exit create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static Exit create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static Exit create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Exit create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Exit create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Exit create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Exit create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::Exit)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::FenceMbarrierInitOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class FenceMbarrierInitOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
FenceMbarrierInitOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.fence.mbarrier.init", odsAttrs.getContext());
}
FenceMbarrierInitOpGenericAdaptorBase(FenceMbarrierInitOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class FenceMbarrierInitOpGenericAdaptor : public detail::FenceMbarrierInitOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::FenceMbarrierInitOpGenericAdaptorBase;
public:
FenceMbarrierInitOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
FenceMbarrierInitOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : FenceMbarrierInitOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
FenceMbarrierInitOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : FenceMbarrierInitOpGenericAdaptor(values, attrs, Properties{}, {}) {}
FenceMbarrierInitOpGenericAdaptor(RangeT values, const FenceMbarrierInitOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = FenceMbarrierInitOp, typename = std::enable_if_t<std::is_same_v<LateInst, FenceMbarrierInitOp>>>
FenceMbarrierInitOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class FenceMbarrierInitOpAdaptor : public FenceMbarrierInitOpGenericAdaptor<::mlir::ValueRange> {
public:
using FenceMbarrierInitOpGenericAdaptor::FenceMbarrierInitOpGenericAdaptor;
FenceMbarrierInitOpAdaptor(FenceMbarrierInitOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class FenceMbarrierInitOp : public ::mlir::Op<FenceMbarrierInitOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants> {
public:
using Op::Op;
using Op::print;
using Adaptor = FenceMbarrierInitOpAdaptor;
template <typename RangeT>
using GenericAdaptor = FenceMbarrierInitOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.fence.mbarrier.init");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static FenceMbarrierInitOp create(::mlir::OpBuilder &builder, ::mlir::Location location);
static FenceMbarrierInitOp create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static FenceMbarrierInitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static FenceMbarrierInitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static FenceMbarrierInitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static FenceMbarrierInitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static FenceMbarrierInitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static FenceMbarrierInitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::FenceMbarrierInitOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::FenceProxyAcquireOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class FenceProxyAcquireOpGenericAdaptorBase {
public:
struct Properties {
using fromProxyTy = ::mlir::NVVM::ProxyKindAttr;
fromProxyTy fromProxy;
auto getFromProxy() const {
auto &propStorage = this->fromProxy;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::ProxyKindAttr>(propStorage);
}
void setFromProxy(const ::mlir::NVVM::ProxyKindAttr &propValue) {
this->fromProxy = propValue;
}
using scopeTy = ::mlir::NVVM::MemScopeKindAttr;
scopeTy scope;
auto getScope() const {
auto &propStorage = this->scope;
return ::llvm::cast<::mlir::NVVM::MemScopeKindAttr>(propStorage);
}
void setScope(const ::mlir::NVVM::MemScopeKindAttr &propValue) {
this->scope = propValue;
}
using toProxyTy = ::mlir::NVVM::ProxyKindAttr;
toProxyTy toProxy;
auto getToProxy() const {
auto &propStorage = this->toProxy;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::ProxyKindAttr>(propStorage);
}
void setToProxy(const ::mlir::NVVM::ProxyKindAttr &propValue) {
this->toProxy = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.fromProxy == this->fromProxy &&
rhs.scope == this->scope &&
rhs.toProxy == this->toProxy &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
FenceProxyAcquireOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.fence.proxy.acquire", odsAttrs.getContext());
}
FenceProxyAcquireOpGenericAdaptorBase(FenceProxyAcquireOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::MemScopeKindAttr getScopeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MemScopeKindAttr>(getProperties().scope);
return attr;
}
::mlir::NVVM::MemScopeKind getScope();
::mlir::NVVM::ProxyKindAttr getFromProxyAttr();
::mlir::NVVM::ProxyKind getFromProxy();
::mlir::NVVM::ProxyKindAttr getToProxyAttr();
::mlir::NVVM::ProxyKind getToProxy();
};
} // namespace detail
template <typename RangeT>
class FenceProxyAcquireOpGenericAdaptor : public detail::FenceProxyAcquireOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::FenceProxyAcquireOpGenericAdaptorBase;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_size = 1;
public:
FenceProxyAcquireOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
FenceProxyAcquireOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : FenceProxyAcquireOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
FenceProxyAcquireOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : FenceProxyAcquireOpGenericAdaptor(values, attrs, Properties{}, {}) {}
FenceProxyAcquireOpGenericAdaptor(RangeT values, const FenceProxyAcquireOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = FenceProxyAcquireOp, typename = std::enable_if_t<std::is_same_v<LateInst, FenceProxyAcquireOp>>>
FenceProxyAcquireOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getAddr() {
return (*getODSOperands(0).begin());
}
ValueT getSize() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class FenceProxyAcquireOpAdaptor : public FenceProxyAcquireOpGenericAdaptor<::mlir::ValueRange> {
public:
using FenceProxyAcquireOpGenericAdaptor::FenceProxyAcquireOpGenericAdaptor;
FenceProxyAcquireOpAdaptor(FenceProxyAcquireOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class FenceProxyAcquireOp : public ::mlir::Op<FenceProxyAcquireOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = FenceProxyAcquireOpAdaptor;
template <typename RangeT>
using GenericAdaptor = FenceProxyAcquireOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_size = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fromProxy"), ::llvm::StringRef("scope"), ::llvm::StringRef("toProxy")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getFromProxyAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getFromProxyAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getScopeAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getScopeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getToProxyAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getToProxyAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.fence.proxy.acquire");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getAddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getSize() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getAddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSizeMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::MemScopeKindAttr getScopeAttr() {
return ::llvm::cast<::mlir::NVVM::MemScopeKindAttr>(getProperties().scope);
}
::mlir::NVVM::MemScopeKind getScope();
::mlir::NVVM::ProxyKindAttr getFromProxyAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::ProxyKindAttr>(getProperties().fromProxy);
}
::mlir::NVVM::ProxyKind getFromProxy();
::mlir::NVVM::ProxyKindAttr getToProxyAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::ProxyKindAttr>(getProperties().toProxy);
}
::mlir::NVVM::ProxyKind getToProxy();
void setScopeAttr(::mlir::NVVM::MemScopeKindAttr attr) {
getProperties().scope = attr;
}
void setScope(::mlir::NVVM::MemScopeKind attrValue);
void setFromProxyAttr(::mlir::NVVM::ProxyKindAttr attr) {
getProperties().fromProxy = attr;
}
void setFromProxy(::mlir::NVVM::ProxyKind attrValue);
void setToProxyAttr(::mlir::NVVM::ProxyKindAttr attr) {
getProperties().toProxy = attr;
}
void setToProxy(::mlir::NVVM::ProxyKind attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::Value addr, ::mlir::Value size, ::mlir::NVVM::ProxyKindAttr fromProxy = nullptr, ::mlir::NVVM::ProxyKindAttr toProxy = nullptr);
static FenceProxyAcquireOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::Value addr, ::mlir::Value size, ::mlir::NVVM::ProxyKindAttr fromProxy = nullptr, ::mlir::NVVM::ProxyKindAttr toProxy = nullptr);
static FenceProxyAcquireOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::Value addr, ::mlir::Value size, ::mlir::NVVM::ProxyKindAttr fromProxy = nullptr, ::mlir::NVVM::ProxyKindAttr toProxy = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::Value addr, ::mlir::Value size, ::mlir::NVVM::ProxyKindAttr fromProxy = nullptr, ::mlir::NVVM::ProxyKindAttr toProxy = nullptr);
static FenceProxyAcquireOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::Value addr, ::mlir::Value size, ::mlir::NVVM::ProxyKindAttr fromProxy = nullptr, ::mlir::NVVM::ProxyKindAttr toProxy = nullptr);
static FenceProxyAcquireOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::Value addr, ::mlir::Value size, ::mlir::NVVM::ProxyKindAttr fromProxy = nullptr, ::mlir::NVVM::ProxyKindAttr toProxy = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::MemScopeKind scope, ::mlir::Value addr, ::mlir::Value size, ::mlir::NVVM::ProxyKind fromProxy = ProxyKind::GENERIC, ::mlir::NVVM::ProxyKind toProxy = ProxyKind::TENSORMAP);
static FenceProxyAcquireOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::MemScopeKind scope, ::mlir::Value addr, ::mlir::Value size, ::mlir::NVVM::ProxyKind fromProxy = ProxyKind::GENERIC, ::mlir::NVVM::ProxyKind toProxy = ProxyKind::TENSORMAP);
static FenceProxyAcquireOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::MemScopeKind scope, ::mlir::Value addr, ::mlir::Value size, ::mlir::NVVM::ProxyKind fromProxy = ProxyKind::GENERIC, ::mlir::NVVM::ProxyKind toProxy = ProxyKind::TENSORMAP);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemScopeKind scope, ::mlir::Value addr, ::mlir::Value size, ::mlir::NVVM::ProxyKind fromProxy = ProxyKind::GENERIC, ::mlir::NVVM::ProxyKind toProxy = ProxyKind::TENSORMAP);
static FenceProxyAcquireOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemScopeKind scope, ::mlir::Value addr, ::mlir::Value size, ::mlir::NVVM::ProxyKind fromProxy = ProxyKind::GENERIC, ::mlir::NVVM::ProxyKind toProxy = ProxyKind::TENSORMAP);
static FenceProxyAcquireOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemScopeKind scope, ::mlir::Value addr, ::mlir::Value size, ::mlir::NVVM::ProxyKind fromProxy = ProxyKind::GENERIC, ::mlir::NVVM::ProxyKind toProxy = ProxyKind::TENSORMAP);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static FenceProxyAcquireOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static FenceProxyAcquireOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static FenceProxyAcquireOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static FenceProxyAcquireOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 3 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::FenceProxyAcquireOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::FenceProxyAcquireOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::FenceProxyOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class FenceProxyOpGenericAdaptorBase {
public:
struct Properties {
using kindTy = ::mlir::NVVM::ProxyKindAttr;
kindTy kind;
auto getKind() const {
auto &propStorage = this->kind;
return ::llvm::cast<::mlir::NVVM::ProxyKindAttr>(propStorage);
}
void setKind(const ::mlir::NVVM::ProxyKindAttr &propValue) {
this->kind = propValue;
}
using spaceTy = ::mlir::NVVM::SharedSpaceAttr;
spaceTy space;
auto getSpace() const {
auto &propStorage = this->space;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SharedSpaceAttr>(propStorage);
}
void setSpace(const ::mlir::NVVM::SharedSpaceAttr &propValue) {
this->space = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.kind == this->kind &&
rhs.space == this->space &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
FenceProxyOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.fence.proxy", odsAttrs.getContext());
}
FenceProxyOpGenericAdaptorBase(FenceProxyOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::ProxyKindAttr getKindAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::ProxyKindAttr>(getProperties().kind);
return attr;
}
::mlir::NVVM::ProxyKind getKind();
::mlir::NVVM::SharedSpaceAttr getSpaceAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::NVVM::SharedSpaceAttr>(getProperties().space);
return attr;
}
::std::optional<::mlir::NVVM::SharedSpace> getSpace();
};
} // namespace detail
template <typename RangeT>
class FenceProxyOpGenericAdaptor : public detail::FenceProxyOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::FenceProxyOpGenericAdaptorBase;
public:
FenceProxyOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
FenceProxyOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : FenceProxyOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
FenceProxyOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : FenceProxyOpGenericAdaptor(values, attrs, Properties{}, {}) {}
FenceProxyOpGenericAdaptor(RangeT values, const FenceProxyOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = FenceProxyOp, typename = std::enable_if_t<std::is_same_v<LateInst, FenceProxyOp>>>
FenceProxyOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class FenceProxyOpAdaptor : public FenceProxyOpGenericAdaptor<::mlir::ValueRange> {
public:
using FenceProxyOpGenericAdaptor::FenceProxyOpGenericAdaptor;
FenceProxyOpAdaptor(FenceProxyOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class FenceProxyOp : public ::mlir::Op<FenceProxyOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = FenceProxyOpAdaptor;
template <typename RangeT>
using GenericAdaptor = FenceProxyOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("kind"), ::llvm::StringRef("space")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getKindAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getKindAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getSpaceAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getSpaceAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.fence.proxy");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::ProxyKindAttr getKindAttr() {
return ::llvm::cast<::mlir::NVVM::ProxyKindAttr>(getProperties().kind);
}
::mlir::NVVM::ProxyKind getKind();
::mlir::NVVM::SharedSpaceAttr getSpaceAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SharedSpaceAttr>(getProperties().space);
}
::std::optional<::mlir::NVVM::SharedSpace> getSpace();
void setKindAttr(::mlir::NVVM::ProxyKindAttr attr) {
getProperties().kind = attr;
}
void setKind(::mlir::NVVM::ProxyKind attrValue);
void setSpaceAttr(::mlir::NVVM::SharedSpaceAttr attr) {
getProperties().space = attr;
}
void setSpace(::std::optional<::mlir::NVVM::SharedSpace> attrValue);
::mlir::Attribute removeSpaceAttr() {
auto attr = getProperties().space;
getProperties().space = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::ProxyKindAttr kind, /*optional*/::mlir::NVVM::SharedSpaceAttr space);
static FenceProxyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::ProxyKindAttr kind, /*optional*/::mlir::NVVM::SharedSpaceAttr space);
static FenceProxyOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::ProxyKindAttr kind, /*optional*/::mlir::NVVM::SharedSpaceAttr space);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::ProxyKindAttr kind, /*optional*/::mlir::NVVM::SharedSpaceAttr space);
static FenceProxyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::ProxyKindAttr kind, /*optional*/::mlir::NVVM::SharedSpaceAttr space);
static FenceProxyOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::ProxyKindAttr kind, /*optional*/::mlir::NVVM::SharedSpaceAttr space);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::ProxyKind kind, /*optional*/::mlir::NVVM::SharedSpaceAttr space);
static FenceProxyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::ProxyKind kind, /*optional*/::mlir::NVVM::SharedSpaceAttr space);
static FenceProxyOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::ProxyKind kind, /*optional*/::mlir::NVVM::SharedSpaceAttr space);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::ProxyKind kind, /*optional*/::mlir::NVVM::SharedSpaceAttr space);
static FenceProxyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::ProxyKind kind, /*optional*/::mlir::NVVM::SharedSpaceAttr space);
static FenceProxyOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::ProxyKind kind, /*optional*/::mlir::NVVM::SharedSpaceAttr space);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static FenceProxyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static FenceProxyOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static FenceProxyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static FenceProxyOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::FenceProxyOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::FenceProxyOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::FenceProxyReleaseOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class FenceProxyReleaseOpGenericAdaptorBase {
public:
struct Properties {
using fromProxyTy = ::mlir::NVVM::ProxyKindAttr;
fromProxyTy fromProxy;
auto getFromProxy() const {
auto &propStorage = this->fromProxy;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::ProxyKindAttr>(propStorage);
}
void setFromProxy(const ::mlir::NVVM::ProxyKindAttr &propValue) {
this->fromProxy = propValue;
}
using scopeTy = ::mlir::NVVM::MemScopeKindAttr;
scopeTy scope;
auto getScope() const {
auto &propStorage = this->scope;
return ::llvm::cast<::mlir::NVVM::MemScopeKindAttr>(propStorage);
}
void setScope(const ::mlir::NVVM::MemScopeKindAttr &propValue) {
this->scope = propValue;
}
using toProxyTy = ::mlir::NVVM::ProxyKindAttr;
toProxyTy toProxy;
auto getToProxy() const {
auto &propStorage = this->toProxy;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::ProxyKindAttr>(propStorage);
}
void setToProxy(const ::mlir::NVVM::ProxyKindAttr &propValue) {
this->toProxy = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.fromProxy == this->fromProxy &&
rhs.scope == this->scope &&
rhs.toProxy == this->toProxy &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
FenceProxyReleaseOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.fence.proxy.release", odsAttrs.getContext());
}
FenceProxyReleaseOpGenericAdaptorBase(FenceProxyReleaseOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::MemScopeKindAttr getScopeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MemScopeKindAttr>(getProperties().scope);
return attr;
}
::mlir::NVVM::MemScopeKind getScope();
::mlir::NVVM::ProxyKindAttr getFromProxyAttr();
::mlir::NVVM::ProxyKind getFromProxy();
::mlir::NVVM::ProxyKindAttr getToProxyAttr();
::mlir::NVVM::ProxyKind getToProxy();
};
} // namespace detail
template <typename RangeT>
class FenceProxyReleaseOpGenericAdaptor : public detail::FenceProxyReleaseOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::FenceProxyReleaseOpGenericAdaptorBase;
public:
FenceProxyReleaseOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
FenceProxyReleaseOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : FenceProxyReleaseOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
FenceProxyReleaseOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : FenceProxyReleaseOpGenericAdaptor(values, attrs, Properties{}, {}) {}
FenceProxyReleaseOpGenericAdaptor(RangeT values, const FenceProxyReleaseOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = FenceProxyReleaseOp, typename = std::enable_if_t<std::is_same_v<LateInst, FenceProxyReleaseOp>>>
FenceProxyReleaseOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class FenceProxyReleaseOpAdaptor : public FenceProxyReleaseOpGenericAdaptor<::mlir::ValueRange> {
public:
using FenceProxyReleaseOpGenericAdaptor::FenceProxyReleaseOpGenericAdaptor;
FenceProxyReleaseOpAdaptor(FenceProxyReleaseOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class FenceProxyReleaseOp : public ::mlir::Op<FenceProxyReleaseOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = FenceProxyReleaseOpAdaptor;
template <typename RangeT>
using GenericAdaptor = FenceProxyReleaseOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fromProxy"), ::llvm::StringRef("scope"), ::llvm::StringRef("toProxy")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getFromProxyAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getFromProxyAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getScopeAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getScopeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getToProxyAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getToProxyAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.fence.proxy.release");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::MemScopeKindAttr getScopeAttr() {
return ::llvm::cast<::mlir::NVVM::MemScopeKindAttr>(getProperties().scope);
}
::mlir::NVVM::MemScopeKind getScope();
::mlir::NVVM::ProxyKindAttr getFromProxyAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::ProxyKindAttr>(getProperties().fromProxy);
}
::mlir::NVVM::ProxyKind getFromProxy();
::mlir::NVVM::ProxyKindAttr getToProxyAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::ProxyKindAttr>(getProperties().toProxy);
}
::mlir::NVVM::ProxyKind getToProxy();
void setScopeAttr(::mlir::NVVM::MemScopeKindAttr attr) {
getProperties().scope = attr;
}
void setScope(::mlir::NVVM::MemScopeKind attrValue);
void setFromProxyAttr(::mlir::NVVM::ProxyKindAttr attr) {
getProperties().fromProxy = attr;
}
void setFromProxy(::mlir::NVVM::ProxyKind attrValue);
void setToProxyAttr(::mlir::NVVM::ProxyKindAttr attr) {
getProperties().toProxy = attr;
}
void setToProxy(::mlir::NVVM::ProxyKind attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::NVVM::ProxyKindAttr fromProxy = nullptr, ::mlir::NVVM::ProxyKindAttr toProxy = nullptr);
static FenceProxyReleaseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::NVVM::ProxyKindAttr fromProxy = nullptr, ::mlir::NVVM::ProxyKindAttr toProxy = nullptr);
static FenceProxyReleaseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::NVVM::ProxyKindAttr fromProxy = nullptr, ::mlir::NVVM::ProxyKindAttr toProxy = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::NVVM::ProxyKindAttr fromProxy = nullptr, ::mlir::NVVM::ProxyKindAttr toProxy = nullptr);
static FenceProxyReleaseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::NVVM::ProxyKindAttr fromProxy = nullptr, ::mlir::NVVM::ProxyKindAttr toProxy = nullptr);
static FenceProxyReleaseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::NVVM::ProxyKindAttr fromProxy = nullptr, ::mlir::NVVM::ProxyKindAttr toProxy = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::MemScopeKind scope, ::mlir::NVVM::ProxyKind fromProxy = ProxyKind::GENERIC, ::mlir::NVVM::ProxyKind toProxy = ProxyKind::TENSORMAP);
static FenceProxyReleaseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::MemScopeKind scope, ::mlir::NVVM::ProxyKind fromProxy = ProxyKind::GENERIC, ::mlir::NVVM::ProxyKind toProxy = ProxyKind::TENSORMAP);
static FenceProxyReleaseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::MemScopeKind scope, ::mlir::NVVM::ProxyKind fromProxy = ProxyKind::GENERIC, ::mlir::NVVM::ProxyKind toProxy = ProxyKind::TENSORMAP);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemScopeKind scope, ::mlir::NVVM::ProxyKind fromProxy = ProxyKind::GENERIC, ::mlir::NVVM::ProxyKind toProxy = ProxyKind::TENSORMAP);
static FenceProxyReleaseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemScopeKind scope, ::mlir::NVVM::ProxyKind fromProxy = ProxyKind::GENERIC, ::mlir::NVVM::ProxyKind toProxy = ProxyKind::TENSORMAP);
static FenceProxyReleaseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemScopeKind scope, ::mlir::NVVM::ProxyKind fromProxy = ProxyKind::GENERIC, ::mlir::NVVM::ProxyKind toProxy = ProxyKind::TENSORMAP);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static FenceProxyReleaseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static FenceProxyReleaseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static FenceProxyReleaseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static FenceProxyReleaseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 3 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::FenceProxyReleaseOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::FenceProxyReleaseOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::FenceProxySyncRestrictOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class FenceProxySyncRestrictOpGenericAdaptorBase {
public:
struct Properties {
using fromProxyTy = ::mlir::NVVM::ProxyKindAttr;
fromProxyTy fromProxy;
auto getFromProxy() const {
auto &propStorage = this->fromProxy;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::ProxyKindAttr>(propStorage);
}
void setFromProxy(const ::mlir::NVVM::ProxyKindAttr &propValue) {
this->fromProxy = propValue;
}
using orderTy = ::mlir::NVVM::MemOrderKindAttr;
orderTy order;
auto getOrder() const {
auto &propStorage = this->order;
return ::llvm::cast<::mlir::NVVM::MemOrderKindAttr>(propStorage);
}
void setOrder(const ::mlir::NVVM::MemOrderKindAttr &propValue) {
this->order = propValue;
}
using toProxyTy = ::mlir::NVVM::ProxyKindAttr;
toProxyTy toProxy;
auto getToProxy() const {
auto &propStorage = this->toProxy;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::ProxyKindAttr>(propStorage);
}
void setToProxy(const ::mlir::NVVM::ProxyKindAttr &propValue) {
this->toProxy = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.fromProxy == this->fromProxy &&
rhs.order == this->order &&
rhs.toProxy == this->toProxy &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
FenceProxySyncRestrictOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.fence.proxy.sync_restrict", odsAttrs.getContext());
}
FenceProxySyncRestrictOpGenericAdaptorBase(FenceProxySyncRestrictOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::MemOrderKindAttr getOrderAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MemOrderKindAttr>(getProperties().order);
return attr;
}
::mlir::NVVM::MemOrderKind getOrder();
::mlir::NVVM::ProxyKindAttr getFromProxyAttr();
::mlir::NVVM::ProxyKind getFromProxy();
::mlir::NVVM::ProxyKindAttr getToProxyAttr();
::mlir::NVVM::ProxyKind getToProxy();
};
} // namespace detail
template <typename RangeT>
class FenceProxySyncRestrictOpGenericAdaptor : public detail::FenceProxySyncRestrictOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::FenceProxySyncRestrictOpGenericAdaptorBase;
public:
FenceProxySyncRestrictOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
FenceProxySyncRestrictOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : FenceProxySyncRestrictOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
FenceProxySyncRestrictOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : FenceProxySyncRestrictOpGenericAdaptor(values, attrs, Properties{}, {}) {}
FenceProxySyncRestrictOpGenericAdaptor(RangeT values, const FenceProxySyncRestrictOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = FenceProxySyncRestrictOp, typename = std::enable_if_t<std::is_same_v<LateInst, FenceProxySyncRestrictOp>>>
FenceProxySyncRestrictOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class FenceProxySyncRestrictOpAdaptor : public FenceProxySyncRestrictOpGenericAdaptor<::mlir::ValueRange> {
public:
using FenceProxySyncRestrictOpGenericAdaptor::FenceProxySyncRestrictOpGenericAdaptor;
FenceProxySyncRestrictOpAdaptor(FenceProxySyncRestrictOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class FenceProxySyncRestrictOp : public ::mlir::Op<FenceProxySyncRestrictOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = FenceProxySyncRestrictOpAdaptor;
template <typename RangeT>
using GenericAdaptor = FenceProxySyncRestrictOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fromProxy"), ::llvm::StringRef("order"), ::llvm::StringRef("toProxy")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getFromProxyAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getFromProxyAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getOrderAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getOrderAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getToProxyAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getToProxyAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.fence.proxy.sync_restrict");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::MemOrderKindAttr getOrderAttr() {
return ::llvm::cast<::mlir::NVVM::MemOrderKindAttr>(getProperties().order);
}
::mlir::NVVM::MemOrderKind getOrder();
::mlir::NVVM::ProxyKindAttr getFromProxyAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::ProxyKindAttr>(getProperties().fromProxy);
}
::mlir::NVVM::ProxyKind getFromProxy();
::mlir::NVVM::ProxyKindAttr getToProxyAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::ProxyKindAttr>(getProperties().toProxy);
}
::mlir::NVVM::ProxyKind getToProxy();
void setOrderAttr(::mlir::NVVM::MemOrderKindAttr attr) {
getProperties().order = attr;
}
void setOrder(::mlir::NVVM::MemOrderKind attrValue);
void setFromProxyAttr(::mlir::NVVM::ProxyKindAttr attr) {
getProperties().fromProxy = attr;
}
void setFromProxy(::mlir::NVVM::ProxyKind attrValue);
void setToProxyAttr(::mlir::NVVM::ProxyKindAttr attr) {
getProperties().toProxy = attr;
}
void setToProxy(::mlir::NVVM::ProxyKind attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::MemOrderKindAttr order, ::mlir::NVVM::ProxyKindAttr fromProxy = nullptr, ::mlir::NVVM::ProxyKindAttr toProxy = nullptr);
static FenceProxySyncRestrictOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::MemOrderKindAttr order, ::mlir::NVVM::ProxyKindAttr fromProxy = nullptr, ::mlir::NVVM::ProxyKindAttr toProxy = nullptr);
static FenceProxySyncRestrictOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::MemOrderKindAttr order, ::mlir::NVVM::ProxyKindAttr fromProxy = nullptr, ::mlir::NVVM::ProxyKindAttr toProxy = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemOrderKindAttr order, ::mlir::NVVM::ProxyKindAttr fromProxy = nullptr, ::mlir::NVVM::ProxyKindAttr toProxy = nullptr);
static FenceProxySyncRestrictOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemOrderKindAttr order, ::mlir::NVVM::ProxyKindAttr fromProxy = nullptr, ::mlir::NVVM::ProxyKindAttr toProxy = nullptr);
static FenceProxySyncRestrictOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemOrderKindAttr order, ::mlir::NVVM::ProxyKindAttr fromProxy = nullptr, ::mlir::NVVM::ProxyKindAttr toProxy = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::MemOrderKind order, ::mlir::NVVM::ProxyKind fromProxy = ProxyKind::GENERIC, ::mlir::NVVM::ProxyKind toProxy = ProxyKind::async);
static FenceProxySyncRestrictOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::MemOrderKind order, ::mlir::NVVM::ProxyKind fromProxy = ProxyKind::GENERIC, ::mlir::NVVM::ProxyKind toProxy = ProxyKind::async);
static FenceProxySyncRestrictOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::MemOrderKind order, ::mlir::NVVM::ProxyKind fromProxy = ProxyKind::GENERIC, ::mlir::NVVM::ProxyKind toProxy = ProxyKind::async);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemOrderKind order, ::mlir::NVVM::ProxyKind fromProxy = ProxyKind::GENERIC, ::mlir::NVVM::ProxyKind toProxy = ProxyKind::async);
static FenceProxySyncRestrictOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemOrderKind order, ::mlir::NVVM::ProxyKind fromProxy = ProxyKind::GENERIC, ::mlir::NVVM::ProxyKind toProxy = ProxyKind::async);
static FenceProxySyncRestrictOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemOrderKind order, ::mlir::NVVM::ProxyKind fromProxy = ProxyKind::GENERIC, ::mlir::NVVM::ProxyKind toProxy = ProxyKind::async);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static FenceProxySyncRestrictOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static FenceProxySyncRestrictOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static FenceProxySyncRestrictOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static FenceProxySyncRestrictOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 3 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::FenceProxySyncRestrictOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::FenceProxySyncRestrictOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::FenceScClusterOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class FenceScClusterOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
FenceScClusterOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.fence.sc.cluster", odsAttrs.getContext());
}
FenceScClusterOpGenericAdaptorBase(FenceScClusterOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class FenceScClusterOpGenericAdaptor : public detail::FenceScClusterOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::FenceScClusterOpGenericAdaptorBase;
public:
FenceScClusterOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
FenceScClusterOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : FenceScClusterOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
FenceScClusterOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : FenceScClusterOpGenericAdaptor(values, attrs, Properties{}, {}) {}
FenceScClusterOpGenericAdaptor(RangeT values, const FenceScClusterOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = FenceScClusterOp, typename = std::enable_if_t<std::is_same_v<LateInst, FenceScClusterOp>>>
FenceScClusterOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class FenceScClusterOpAdaptor : public FenceScClusterOpGenericAdaptor<::mlir::ValueRange> {
public:
using FenceScClusterOpGenericAdaptor::FenceScClusterOpGenericAdaptor;
FenceScClusterOpAdaptor(FenceScClusterOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class FenceScClusterOp : public ::mlir::Op<FenceScClusterOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants> {
public:
using Op::Op;
using Op::print;
using Adaptor = FenceScClusterOpAdaptor;
template <typename RangeT>
using GenericAdaptor = FenceScClusterOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.fence.sc.cluster");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static FenceScClusterOp create(::mlir::OpBuilder &builder, ::mlir::Location location);
static FenceScClusterOp create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static FenceScClusterOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static FenceScClusterOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static FenceScClusterOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static FenceScClusterOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static FenceScClusterOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static FenceScClusterOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::FenceScClusterOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::FenceSyncRestrictOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class FenceSyncRestrictOpGenericAdaptorBase {
public:
struct Properties {
using orderTy = ::mlir::NVVM::MemOrderKindAttr;
orderTy order;
auto getOrder() const {
auto &propStorage = this->order;
return ::llvm::cast<::mlir::NVVM::MemOrderKindAttr>(propStorage);
}
void setOrder(const ::mlir::NVVM::MemOrderKindAttr &propValue) {
this->order = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.order == this->order &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
FenceSyncRestrictOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.fence.sync_restrict", odsAttrs.getContext());
}
FenceSyncRestrictOpGenericAdaptorBase(FenceSyncRestrictOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::MemOrderKindAttr getOrderAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MemOrderKindAttr>(getProperties().order);
return attr;
}
::mlir::NVVM::MemOrderKind getOrder();
};
} // namespace detail
template <typename RangeT>
class FenceSyncRestrictOpGenericAdaptor : public detail::FenceSyncRestrictOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::FenceSyncRestrictOpGenericAdaptorBase;
public:
FenceSyncRestrictOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
FenceSyncRestrictOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : FenceSyncRestrictOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
FenceSyncRestrictOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : FenceSyncRestrictOpGenericAdaptor(values, attrs, Properties{}, {}) {}
FenceSyncRestrictOpGenericAdaptor(RangeT values, const FenceSyncRestrictOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = FenceSyncRestrictOp, typename = std::enable_if_t<std::is_same_v<LateInst, FenceSyncRestrictOp>>>
FenceSyncRestrictOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class FenceSyncRestrictOpAdaptor : public FenceSyncRestrictOpGenericAdaptor<::mlir::ValueRange> {
public:
using FenceSyncRestrictOpGenericAdaptor::FenceSyncRestrictOpGenericAdaptor;
FenceSyncRestrictOpAdaptor(FenceSyncRestrictOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class FenceSyncRestrictOp : public ::mlir::Op<FenceSyncRestrictOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = FenceSyncRestrictOpAdaptor;
template <typename RangeT>
using GenericAdaptor = FenceSyncRestrictOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("order")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getOrderAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getOrderAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.fence.sync_restrict");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::MemOrderKindAttr getOrderAttr() {
return ::llvm::cast<::mlir::NVVM::MemOrderKindAttr>(getProperties().order);
}
::mlir::NVVM::MemOrderKind getOrder();
void setOrderAttr(::mlir::NVVM::MemOrderKindAttr attr) {
getProperties().order = attr;
}
void setOrder(::mlir::NVVM::MemOrderKind attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::MemOrderKindAttr order);
static FenceSyncRestrictOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::MemOrderKindAttr order);
static FenceSyncRestrictOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::MemOrderKindAttr order);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemOrderKindAttr order);
static FenceSyncRestrictOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemOrderKindAttr order);
static FenceSyncRestrictOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemOrderKindAttr order);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::MemOrderKind order);
static FenceSyncRestrictOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::MemOrderKind order);
static FenceSyncRestrictOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::MemOrderKind order);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemOrderKind order);
static FenceSyncRestrictOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemOrderKind order);
static FenceSyncRestrictOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemOrderKind order);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static FenceSyncRestrictOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static FenceSyncRestrictOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static FenceSyncRestrictOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static FenceSyncRestrictOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::FenceSyncRestrictOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::FenceSyncRestrictOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::FmaOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class FmaOpGenericAdaptorBase {
public:
struct Properties {
using ftzTy = ::mlir::BoolAttr;
ftzTy ftz;
auto getFtz() const {
auto &propStorage = this->ftz;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setFtz(const ::mlir::BoolAttr &propValue) {
this->ftz = propValue;
}
using oobTy = ::mlir::BoolAttr;
oobTy oob;
auto getOob() const {
auto &propStorage = this->oob;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setOob(const ::mlir::BoolAttr &propValue) {
this->oob = propValue;
}
using reluTy = ::mlir::BoolAttr;
reluTy relu;
auto getRelu() const {
auto &propStorage = this->relu;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelu(const ::mlir::BoolAttr &propValue) {
this->relu = propValue;
}
using rndTy = ::mlir::NVVM::FPRoundingModeAttr;
rndTy rnd;
auto getRnd() const {
auto &propStorage = this->rnd;
return ::llvm::cast<::mlir::NVVM::FPRoundingModeAttr>(propStorage);
}
void setRnd(const ::mlir::NVVM::FPRoundingModeAttr &propValue) {
this->rnd = propValue;
}
using satTy = ::mlir::NVVM::SaturationModeAttr;
satTy sat;
auto getSat() const {
auto &propStorage = this->sat;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SaturationModeAttr>(propStorage);
}
void setSat(const ::mlir::NVVM::SaturationModeAttr &propValue) {
this->sat = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.ftz == this->ftz &&
rhs.oob == this->oob &&
rhs.relu == this->relu &&
rhs.rnd == this->rnd &&
rhs.sat == this->sat &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
FmaOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.fma", odsAttrs.getContext());
}
FmaOpGenericAdaptorBase(FmaOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::FPRoundingModeAttr getRndAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::FPRoundingModeAttr>(getProperties().rnd);
return attr;
}
::mlir::NVVM::FPRoundingMode getRnd();
::mlir::NVVM::SaturationModeAttr getSatAttr();
::mlir::NVVM::SaturationMode getSat();
::mlir::BoolAttr getFtzAttr();
bool getFtz();
::mlir::BoolAttr getReluAttr();
bool getRelu();
::mlir::BoolAttr getOobAttr();
bool getOob();
};
} // namespace detail
template <typename RangeT>
class FmaOpGenericAdaptor : public detail::FmaOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::FmaOpGenericAdaptorBase;
static constexpr int odsIndex_a = 0;
static constexpr int odsIndex_b = 1;
static constexpr int odsIndex_c = 2;
public:
FmaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
FmaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : FmaOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
FmaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : FmaOpGenericAdaptor(values, attrs, Properties{}, {}) {}
FmaOpGenericAdaptor(RangeT values, const FmaOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = FmaOp, typename = std::enable_if_t<std::is_same_v<LateInst, FmaOp>>>
FmaOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getA() {
return (*getODSOperands(0).begin());
}
ValueT getB() {
return (*getODSOperands(1).begin());
}
ValueT getC() {
return (*getODSOperands(2).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class FmaOpAdaptor : public FmaOpGenericAdaptor<::mlir::ValueRange> {
public:
using FmaOpGenericAdaptor::FmaOpGenericAdaptor;
FmaOpAdaptor(FmaOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class FmaOp : public ::mlir::Op<FmaOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<3>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = FmaOpAdaptor;
template <typename RangeT>
using GenericAdaptor = FmaOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_a = 0;
static constexpr int odsIndex_b = 1;
static constexpr int odsIndex_c = 2;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("ftz"), ::llvm::StringRef("oob"), ::llvm::StringRef("relu"), ::llvm::StringRef("rnd"), ::llvm::StringRef("sat")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getFtzAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getFtzAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getOobAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getOobAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getReluAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getReluAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
::mlir::StringAttr getRndAttrName() {
return getAttributeNameForIndex(3);
}
static ::mlir::StringAttr getRndAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 3);
}
::mlir::StringAttr getSatAttrName() {
return getAttributeNameForIndex(4);
}
static ::mlir::StringAttr getSatAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 4);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.fma");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getA() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::Type> getB() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::Type> getC() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(2).begin());
}
::mlir::OpOperand &getAMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getBMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getCMutable() {
auto range = getODSOperandIndexAndLength(2);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::FPRoundingModeAttr getRndAttr() {
return ::llvm::cast<::mlir::NVVM::FPRoundingModeAttr>(getProperties().rnd);
}
::mlir::NVVM::FPRoundingMode getRnd();
::mlir::NVVM::SaturationModeAttr getSatAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SaturationModeAttr>(getProperties().sat);
}
::mlir::NVVM::SaturationMode getSat();
::mlir::BoolAttr getFtzAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().ftz);
}
bool getFtz();
::mlir::BoolAttr getReluAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relu);
}
bool getRelu();
::mlir::BoolAttr getOobAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().oob);
}
bool getOob();
void setRndAttr(::mlir::NVVM::FPRoundingModeAttr attr) {
getProperties().rnd = attr;
}
void setRnd(::mlir::NVVM::FPRoundingMode attrValue);
void setSatAttr(::mlir::NVVM::SaturationModeAttr attr) {
getProperties().sat = attr;
}
void setSat(::mlir::NVVM::SaturationMode attrValue);
void setFtzAttr(::mlir::BoolAttr attr) {
getProperties().ftz = attr;
}
void setFtz(bool attrValue);
void setReluAttr(::mlir::BoolAttr attr) {
getProperties().relu = attr;
}
void setRelu(bool attrValue);
void setOobAttr(::mlir::BoolAttr attr) {
getProperties().oob = attr;
}
void setOob(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr, ::mlir::BoolAttr relu = nullptr, ::mlir::BoolAttr oob = nullptr);
static FmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr, ::mlir::BoolAttr relu = nullptr, ::mlir::BoolAttr oob = nullptr);
static FmaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr, ::mlir::BoolAttr relu = nullptr, ::mlir::BoolAttr oob = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr, ::mlir::BoolAttr relu = nullptr, ::mlir::BoolAttr oob = nullptr);
static FmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr, ::mlir::BoolAttr relu = nullptr, ::mlir::BoolAttr oob = nullptr);
static FmaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr, ::mlir::BoolAttr relu = nullptr, ::mlir::BoolAttr oob = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr, ::mlir::BoolAttr relu = nullptr, ::mlir::BoolAttr oob = nullptr);
static FmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr, ::mlir::BoolAttr relu = nullptr, ::mlir::BoolAttr oob = nullptr);
static FmaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr, ::mlir::BoolAttr relu = nullptr, ::mlir::BoolAttr oob = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::NVVM::FPRoundingMode rnd, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false, bool relu = false, bool oob = false);
static FmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::NVVM::FPRoundingMode rnd, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false, bool relu = false, bool oob = false);
static FmaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::NVVM::FPRoundingMode rnd, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false, bool relu = false, bool oob = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::NVVM::FPRoundingMode rnd, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false, bool relu = false, bool oob = false);
static FmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::NVVM::FPRoundingMode rnd, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false, bool relu = false, bool oob = false);
static FmaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::NVVM::FPRoundingMode rnd, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false, bool relu = false, bool oob = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::NVVM::FPRoundingMode rnd, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false, bool relu = false, bool oob = false);
static FmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::NVVM::FPRoundingMode rnd, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false, bool relu = false, bool oob = false);
static FmaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::NVVM::FPRoundingMode rnd, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false, bool relu = false, bool oob = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static FmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static FmaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static FmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static FmaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static FmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static FmaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static FmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static FmaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 5 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static void lowerFmaToLLVMIR(
Operation &op, LLVM::ModuleTranslation &mt, llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::FmaOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::FmaOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::GlobalTimerLoOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class GlobalTimerLoOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
GlobalTimerLoOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.globaltimer.lo", odsAttrs.getContext());
}
GlobalTimerLoOpGenericAdaptorBase(GlobalTimerLoOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class GlobalTimerLoOpGenericAdaptor : public detail::GlobalTimerLoOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::GlobalTimerLoOpGenericAdaptorBase;
public:
GlobalTimerLoOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
GlobalTimerLoOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : GlobalTimerLoOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
GlobalTimerLoOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : GlobalTimerLoOpGenericAdaptor(values, attrs, Properties{}, {}) {}
GlobalTimerLoOpGenericAdaptor(RangeT values, const GlobalTimerLoOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = GlobalTimerLoOp, typename = std::enable_if_t<std::is_same_v<LateInst, GlobalTimerLoOp>>>
GlobalTimerLoOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class GlobalTimerLoOpAdaptor : public GlobalTimerLoOpGenericAdaptor<::mlir::ValueRange> {
public:
using GlobalTimerLoOpGenericAdaptor::GlobalTimerLoOpGenericAdaptor;
GlobalTimerLoOpAdaptor(GlobalTimerLoOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class GlobalTimerLoOp : public ::mlir::Op<GlobalTimerLoOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = GlobalTimerLoOpAdaptor;
template <typename RangeT>
using GenericAdaptor = GlobalTimerLoOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.globaltimer.lo");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static GlobalTimerLoOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static GlobalTimerLoOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static GlobalTimerLoOp create(::mlir::OpBuilder &builder, ::mlir::Location location);
static GlobalTimerLoOp create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static GlobalTimerLoOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static GlobalTimerLoOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GlobalTimerLoOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GlobalTimerLoOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GlobalTimerLoOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GlobalTimerLoOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GlobalTimerLoOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GlobalTimerLoOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GlobalTimerLoOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GlobalTimerLoOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::GlobalTimerLoOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::GlobalTimerOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class GlobalTimerOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
GlobalTimerOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.globaltimer", odsAttrs.getContext());
}
GlobalTimerOpGenericAdaptorBase(GlobalTimerOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class GlobalTimerOpGenericAdaptor : public detail::GlobalTimerOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::GlobalTimerOpGenericAdaptorBase;
public:
GlobalTimerOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
GlobalTimerOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : GlobalTimerOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
GlobalTimerOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : GlobalTimerOpGenericAdaptor(values, attrs, Properties{}, {}) {}
GlobalTimerOpGenericAdaptor(RangeT values, const GlobalTimerOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = GlobalTimerOp, typename = std::enable_if_t<std::is_same_v<LateInst, GlobalTimerOp>>>
GlobalTimerOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class GlobalTimerOpAdaptor : public GlobalTimerOpGenericAdaptor<::mlir::ValueRange> {
public:
using GlobalTimerOpGenericAdaptor::GlobalTimerOpGenericAdaptor;
GlobalTimerOpAdaptor(GlobalTimerOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class GlobalTimerOp : public ::mlir::Op<GlobalTimerOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = GlobalTimerOpAdaptor;
template <typename RangeT>
using GenericAdaptor = GlobalTimerOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.globaltimer");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static GlobalTimerOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static GlobalTimerOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static GlobalTimerOp create(::mlir::OpBuilder &builder, ::mlir::Location location);
static GlobalTimerOp create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static GlobalTimerOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static GlobalTimerOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GlobalTimerOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GlobalTimerOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GlobalTimerOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GlobalTimerOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GlobalTimerOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GlobalTimerOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GlobalTimerOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GlobalTimerOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::GlobalTimerOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::GridDimXOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class GridDimXOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
GridDimXOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.nctaid.x", odsAttrs.getContext());
}
GridDimXOpGenericAdaptorBase(GridDimXOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class GridDimXOpGenericAdaptor : public detail::GridDimXOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::GridDimXOpGenericAdaptorBase;
public:
GridDimXOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
GridDimXOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : GridDimXOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
GridDimXOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : GridDimXOpGenericAdaptor(values, attrs, Properties{}, {}) {}
GridDimXOpGenericAdaptor(RangeT values, const GridDimXOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = GridDimXOp, typename = std::enable_if_t<std::is_same_v<LateInst, GridDimXOp>>>
GridDimXOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class GridDimXOpAdaptor : public GridDimXOpGenericAdaptor<::mlir::ValueRange> {
public:
using GridDimXOpGenericAdaptor::GridDimXOpGenericAdaptor;
GridDimXOpAdaptor(GridDimXOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class GridDimXOp : public ::mlir::Op<GridDimXOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = GridDimXOpAdaptor;
template <typename RangeT>
using GenericAdaptor = GridDimXOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<GridDimXOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.nctaid.x");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static GridDimXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static GridDimXOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static GridDimXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static GridDimXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static GridDimXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static GridDimXOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static GridDimXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static GridDimXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GridDimXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GridDimXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GridDimXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GridDimXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GridDimXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GridDimXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GridDimXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GridDimXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::GridDimXOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::GridDimXOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::GridDimYOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class GridDimYOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
GridDimYOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.nctaid.y", odsAttrs.getContext());
}
GridDimYOpGenericAdaptorBase(GridDimYOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class GridDimYOpGenericAdaptor : public detail::GridDimYOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::GridDimYOpGenericAdaptorBase;
public:
GridDimYOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
GridDimYOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : GridDimYOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
GridDimYOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : GridDimYOpGenericAdaptor(values, attrs, Properties{}, {}) {}
GridDimYOpGenericAdaptor(RangeT values, const GridDimYOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = GridDimYOp, typename = std::enable_if_t<std::is_same_v<LateInst, GridDimYOp>>>
GridDimYOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class GridDimYOpAdaptor : public GridDimYOpGenericAdaptor<::mlir::ValueRange> {
public:
using GridDimYOpGenericAdaptor::GridDimYOpGenericAdaptor;
GridDimYOpAdaptor(GridDimYOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class GridDimYOp : public ::mlir::Op<GridDimYOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = GridDimYOpAdaptor;
template <typename RangeT>
using GenericAdaptor = GridDimYOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<GridDimYOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.nctaid.y");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static GridDimYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static GridDimYOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static GridDimYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static GridDimYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static GridDimYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static GridDimYOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static GridDimYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static GridDimYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GridDimYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GridDimYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GridDimYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GridDimYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GridDimYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GridDimYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GridDimYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GridDimYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::GridDimYOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::GridDimYOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::GridDimZOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class GridDimZOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
GridDimZOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.nctaid.z", odsAttrs.getContext());
}
GridDimZOpGenericAdaptorBase(GridDimZOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class GridDimZOpGenericAdaptor : public detail::GridDimZOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::GridDimZOpGenericAdaptorBase;
public:
GridDimZOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
GridDimZOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : GridDimZOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
GridDimZOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : GridDimZOpGenericAdaptor(values, attrs, Properties{}, {}) {}
GridDimZOpGenericAdaptor(RangeT values, const GridDimZOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = GridDimZOp, typename = std::enable_if_t<std::is_same_v<LateInst, GridDimZOp>>>
GridDimZOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class GridDimZOpAdaptor : public GridDimZOpGenericAdaptor<::mlir::ValueRange> {
public:
using GridDimZOpGenericAdaptor::GridDimZOpGenericAdaptor;
GridDimZOpAdaptor(GridDimZOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class GridDimZOp : public ::mlir::Op<GridDimZOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = GridDimZOpAdaptor;
template <typename RangeT>
using GenericAdaptor = GridDimZOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<GridDimZOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.nctaid.z");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static GridDimZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static GridDimZOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static GridDimZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static GridDimZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static GridDimZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static GridDimZOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static GridDimZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static GridDimZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GridDimZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GridDimZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GridDimZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GridDimZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GridDimZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GridDimZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GridDimZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GridDimZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::GridDimZOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::GridDimZOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::GridIdOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class GridIdOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
GridIdOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.gridid", odsAttrs.getContext());
}
GridIdOpGenericAdaptorBase(GridIdOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class GridIdOpGenericAdaptor : public detail::GridIdOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::GridIdOpGenericAdaptorBase;
public:
GridIdOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
GridIdOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : GridIdOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
GridIdOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : GridIdOpGenericAdaptor(values, attrs, Properties{}, {}) {}
GridIdOpGenericAdaptor(RangeT values, const GridIdOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = GridIdOp, typename = std::enable_if_t<std::is_same_v<LateInst, GridIdOp>>>
GridIdOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class GridIdOpAdaptor : public GridIdOpGenericAdaptor<::mlir::ValueRange> {
public:
using GridIdOpGenericAdaptor::GridIdOpGenericAdaptor;
GridIdOpAdaptor(GridIdOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class GridIdOp : public ::mlir::Op<GridIdOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = GridIdOpAdaptor;
template <typename RangeT>
using GenericAdaptor = GridIdOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<GridIdOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.gridid");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static GridIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static GridIdOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static GridIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static GridIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static GridIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static GridIdOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static GridIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static GridIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GridIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GridIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GridIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GridIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GridIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GridIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GridIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GridIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::GridIdOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::GridIdOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::GriddepcontrolOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class GriddepcontrolOpGenericAdaptorBase {
public:
struct Properties {
using kindTy = ::mlir::NVVM::GridDepActionKindAttr;
kindTy kind;
auto getKind() const {
auto &propStorage = this->kind;
return ::llvm::cast<::mlir::NVVM::GridDepActionKindAttr>(propStorage);
}
void setKind(const ::mlir::NVVM::GridDepActionKindAttr &propValue) {
this->kind = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.kind == this->kind &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
GriddepcontrolOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.griddepcontrol", odsAttrs.getContext());
}
GriddepcontrolOpGenericAdaptorBase(GriddepcontrolOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::GridDepActionKindAttr getKindAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::GridDepActionKindAttr>(getProperties().kind);
return attr;
}
::mlir::NVVM::GridDepActionKind getKind();
};
} // namespace detail
template <typename RangeT>
class GriddepcontrolOpGenericAdaptor : public detail::GriddepcontrolOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::GriddepcontrolOpGenericAdaptorBase;
public:
GriddepcontrolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
GriddepcontrolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : GriddepcontrolOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
GriddepcontrolOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : GriddepcontrolOpGenericAdaptor(values, attrs, Properties{}, {}) {}
GriddepcontrolOpGenericAdaptor(RangeT values, const GriddepcontrolOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = GriddepcontrolOp, typename = std::enable_if_t<std::is_same_v<LateInst, GriddepcontrolOp>>>
GriddepcontrolOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class GriddepcontrolOpAdaptor : public GriddepcontrolOpGenericAdaptor<::mlir::ValueRange> {
public:
using GriddepcontrolOpGenericAdaptor::GriddepcontrolOpGenericAdaptor;
GriddepcontrolOpAdaptor(GriddepcontrolOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class GriddepcontrolOp : public ::mlir::Op<GriddepcontrolOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = GriddepcontrolOpAdaptor;
template <typename RangeT>
using GenericAdaptor = GriddepcontrolOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("kind")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getKindAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getKindAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.griddepcontrol");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::GridDepActionKindAttr getKindAttr() {
return ::llvm::cast<::mlir::NVVM::GridDepActionKindAttr>(getProperties().kind);
}
::mlir::NVVM::GridDepActionKind getKind();
void setKindAttr(::mlir::NVVM::GridDepActionKindAttr attr) {
getProperties().kind = attr;
}
void setKind(::mlir::NVVM::GridDepActionKind attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::GridDepActionKindAttr kind);
static GriddepcontrolOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::GridDepActionKindAttr kind);
static GriddepcontrolOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::GridDepActionKindAttr kind);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::GridDepActionKindAttr kind);
static GriddepcontrolOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::GridDepActionKindAttr kind);
static GriddepcontrolOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::GridDepActionKindAttr kind);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::GridDepActionKind kind);
static GriddepcontrolOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::GridDepActionKind kind);
static GriddepcontrolOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::GridDepActionKind kind);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::GridDepActionKind kind);
static GriddepcontrolOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::GridDepActionKind kind);
static GriddepcontrolOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::GridDepActionKind kind);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GriddepcontrolOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static GriddepcontrolOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GriddepcontrolOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static GriddepcontrolOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::GriddepcontrolOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::GriddepcontrolOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::InlinePtxOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class InlinePtxOpGenericAdaptorBase {
public:
struct Properties {
using ptxCodeTy = ::mlir::StringAttr;
ptxCodeTy ptxCode;
auto getPtxCode() const {
auto &propStorage = this->ptxCode;
return ::llvm::cast<::mlir::StringAttr>(propStorage);
}
void setPtxCode(const ::mlir::StringAttr &propValue) {
this->ptxCode = propValue;
}
using operandSegmentSizesTy = std::array<int32_t, 3>;
operandSegmentSizesTy operandSegmentSizes;
::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
auto &propStorage = this->operandSegmentSizes;
return propStorage;
}
void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
auto &propStorage = this->operandSegmentSizes;
::llvm::copy(propValue, propStorage.begin());
}
bool operator==(const Properties &rhs) const {
return
rhs.ptxCode == this->ptxCode &&
rhs.operandSegmentSizes == this->operandSegmentSizes &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
InlinePtxOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.inline_ptx", odsAttrs.getContext());
}
InlinePtxOpGenericAdaptorBase(InlinePtxOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::StringAttr getPtxCodeAttr() {
auto attr = ::llvm::cast<::mlir::StringAttr>(getProperties().ptxCode);
return attr;
}
::llvm::StringRef getPtxCode();
};
} // namespace detail
template <typename RangeT>
class InlinePtxOpGenericAdaptor : public detail::InlinePtxOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::InlinePtxOpGenericAdaptorBase;
static constexpr int odsIndex_readOnlyArgs = 0;
static constexpr int odsIndex_readWriteArgs = 1;
static constexpr int odsIndex_predicate = 2;
public:
InlinePtxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
InlinePtxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : InlinePtxOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
InlinePtxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : InlinePtxOpGenericAdaptor(values, attrs, Properties{}, {}) {}
InlinePtxOpGenericAdaptor(RangeT values, const InlinePtxOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = InlinePtxOp, typename = std::enable_if_t<std::is_same_v<LateInst, InlinePtxOp>>>
InlinePtxOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getReadOnlyArgs() {
return getODSOperands(0);
}
RangeT getReadWriteArgs() {
return getODSOperands(1);
}
ValueT getPredicate() {
auto operands = getODSOperands(2);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class InlinePtxOpAdaptor : public InlinePtxOpGenericAdaptor<::mlir::ValueRange> {
public:
using InlinePtxOpGenericAdaptor::InlinePtxOpGenericAdaptor;
InlinePtxOpAdaptor(InlinePtxOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class InlinePtxOp : public ::mlir::Op<InlinePtxOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::VariadicResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::VariadicOperands, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::NVVM::BasicPtxBuilderInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = InlinePtxOpAdaptor;
template <typename RangeT>
using GenericAdaptor = InlinePtxOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_readOnlyArgs = 0;
static constexpr int odsIndex_readWriteArgs = 1;
static constexpr int odsIndex_predicate = 2;
using Properties = FoldAdaptor::Properties;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<InlinePtxOp>::getPredicate;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<InlinePtxOp>::hasIntrinsic;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<InlinePtxOp>::hasSideEffect;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<InlinePtxOp>::makeConstantI32;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<InlinePtxOp>::getAsmValues;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("ptxCode"), ::llvm::StringRef("operandSegmentSizes")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getPtxCodeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getPtxCodeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getOperandSegmentSizesAttrName() {
return (*this)->getName().getAttributeNames().back();
}
static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
return name.getAttributeNames().back();
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.inline_ptx");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::Operation::operand_range getReadOnlyArgs() {
return getODSOperands(0);
}
::mlir::Operation::operand_range getReadWriteArgs() {
return getODSOperands(1);
}
::mlir::TypedValue<::mlir::IntegerType> getPredicate() {
auto operands = getODSOperands(2);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::MutableOperandRange getReadOnlyArgsMutable();
::mlir::MutableOperandRange getReadWriteArgsMutable();
::mlir::MutableOperandRange getPredicateMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index);
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::Operation::result_range getWriteOnlyArgs() {
return getODSResults(0);
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::StringAttr getPtxCodeAttr() {
return ::llvm::cast<::mlir::StringAttr>(getProperties().ptxCode);
}
::llvm::StringRef getPtxCode();
void setPtxCodeAttr(::mlir::StringAttr attr) {
getProperties().ptxCode = attr;
}
void setPtxCode(::llvm::StringRef attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange writeOnlyArgs, ::mlir::ValueRange readOnlyArgs, ::mlir::ValueRange readWriteArgs, ::mlir::StringAttr ptxCode, /*optional*/::mlir::Value predicate);
static InlinePtxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange writeOnlyArgs, ::mlir::ValueRange readOnlyArgs, ::mlir::ValueRange readWriteArgs, ::mlir::StringAttr ptxCode, /*optional*/::mlir::Value predicate);
static InlinePtxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange writeOnlyArgs, ::mlir::ValueRange readOnlyArgs, ::mlir::ValueRange readWriteArgs, ::mlir::StringAttr ptxCode, /*optional*/::mlir::Value predicate);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange writeOnlyArgs, ::mlir::ValueRange readOnlyArgs, ::mlir::ValueRange readWriteArgs, ::llvm::StringRef ptxCode, /*optional*/::mlir::Value predicate);
static InlinePtxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange writeOnlyArgs, ::mlir::ValueRange readOnlyArgs, ::mlir::ValueRange readWriteArgs, ::llvm::StringRef ptxCode, /*optional*/::mlir::Value predicate);
static InlinePtxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange writeOnlyArgs, ::mlir::ValueRange readOnlyArgs, ::mlir::ValueRange readWriteArgs, ::llvm::StringRef ptxCode, /*optional*/::mlir::Value predicate);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static InlinePtxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static InlinePtxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static InlinePtxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static InlinePtxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
std::string getPtx();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
bool getAsmValues(RewriterBase &, llvm::SmallVectorImpl<std::pair<mlir::Value, mlir::NVVM::PTXRegisterMod>> &);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::InlinePtxOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::InlinePtxOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::LaneIdOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class LaneIdOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
LaneIdOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.laneid", odsAttrs.getContext());
}
LaneIdOpGenericAdaptorBase(LaneIdOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class LaneIdOpGenericAdaptor : public detail::LaneIdOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::LaneIdOpGenericAdaptorBase;
public:
LaneIdOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
LaneIdOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : LaneIdOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
LaneIdOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : LaneIdOpGenericAdaptor(values, attrs, Properties{}, {}) {}
LaneIdOpGenericAdaptor(RangeT values, const LaneIdOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = LaneIdOp, typename = std::enable_if_t<std::is_same_v<LateInst, LaneIdOp>>>
LaneIdOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class LaneIdOpAdaptor : public LaneIdOpGenericAdaptor<::mlir::ValueRange> {
public:
using LaneIdOpGenericAdaptor::LaneIdOpGenericAdaptor;
LaneIdOpAdaptor(LaneIdOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class LaneIdOp : public ::mlir::Op<LaneIdOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = LaneIdOpAdaptor;
template <typename RangeT>
using GenericAdaptor = LaneIdOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<LaneIdOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.laneid");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static LaneIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static LaneIdOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static LaneIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static LaneIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static LaneIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static LaneIdOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static LaneIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static LaneIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LaneIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LaneIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LaneIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LaneIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LaneIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LaneIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LaneIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LaneIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::LaneIdOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::LaneIdOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::LaneMaskEqOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class LaneMaskEqOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
LaneMaskEqOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.lanemask.eq", odsAttrs.getContext());
}
LaneMaskEqOpGenericAdaptorBase(LaneMaskEqOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class LaneMaskEqOpGenericAdaptor : public detail::LaneMaskEqOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::LaneMaskEqOpGenericAdaptorBase;
public:
LaneMaskEqOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
LaneMaskEqOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : LaneMaskEqOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
LaneMaskEqOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : LaneMaskEqOpGenericAdaptor(values, attrs, Properties{}, {}) {}
LaneMaskEqOpGenericAdaptor(RangeT values, const LaneMaskEqOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = LaneMaskEqOp, typename = std::enable_if_t<std::is_same_v<LateInst, LaneMaskEqOp>>>
LaneMaskEqOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class LaneMaskEqOpAdaptor : public LaneMaskEqOpGenericAdaptor<::mlir::ValueRange> {
public:
using LaneMaskEqOpGenericAdaptor::LaneMaskEqOpGenericAdaptor;
LaneMaskEqOpAdaptor(LaneMaskEqOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class LaneMaskEqOp : public ::mlir::Op<LaneMaskEqOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = LaneMaskEqOpAdaptor;
template <typename RangeT>
using GenericAdaptor = LaneMaskEqOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.lanemask.eq");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static LaneMaskEqOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static LaneMaskEqOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static LaneMaskEqOp create(::mlir::OpBuilder &builder, ::mlir::Location location);
static LaneMaskEqOp create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static LaneMaskEqOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static LaneMaskEqOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LaneMaskEqOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LaneMaskEqOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LaneMaskEqOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LaneMaskEqOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LaneMaskEqOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LaneMaskEqOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LaneMaskEqOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LaneMaskEqOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::LaneMaskEqOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::LaneMaskGeOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class LaneMaskGeOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
LaneMaskGeOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.lanemask.ge", odsAttrs.getContext());
}
LaneMaskGeOpGenericAdaptorBase(LaneMaskGeOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class LaneMaskGeOpGenericAdaptor : public detail::LaneMaskGeOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::LaneMaskGeOpGenericAdaptorBase;
public:
LaneMaskGeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
LaneMaskGeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : LaneMaskGeOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
LaneMaskGeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : LaneMaskGeOpGenericAdaptor(values, attrs, Properties{}, {}) {}
LaneMaskGeOpGenericAdaptor(RangeT values, const LaneMaskGeOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = LaneMaskGeOp, typename = std::enable_if_t<std::is_same_v<LateInst, LaneMaskGeOp>>>
LaneMaskGeOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class LaneMaskGeOpAdaptor : public LaneMaskGeOpGenericAdaptor<::mlir::ValueRange> {
public:
using LaneMaskGeOpGenericAdaptor::LaneMaskGeOpGenericAdaptor;
LaneMaskGeOpAdaptor(LaneMaskGeOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class LaneMaskGeOp : public ::mlir::Op<LaneMaskGeOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = LaneMaskGeOpAdaptor;
template <typename RangeT>
using GenericAdaptor = LaneMaskGeOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.lanemask.ge");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static LaneMaskGeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static LaneMaskGeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static LaneMaskGeOp create(::mlir::OpBuilder &builder, ::mlir::Location location);
static LaneMaskGeOp create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static LaneMaskGeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static LaneMaskGeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LaneMaskGeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LaneMaskGeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LaneMaskGeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LaneMaskGeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LaneMaskGeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LaneMaskGeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LaneMaskGeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LaneMaskGeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::LaneMaskGeOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::LaneMaskGtOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class LaneMaskGtOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
LaneMaskGtOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.lanemask.gt", odsAttrs.getContext());
}
LaneMaskGtOpGenericAdaptorBase(LaneMaskGtOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class LaneMaskGtOpGenericAdaptor : public detail::LaneMaskGtOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::LaneMaskGtOpGenericAdaptorBase;
public:
LaneMaskGtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
LaneMaskGtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : LaneMaskGtOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
LaneMaskGtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : LaneMaskGtOpGenericAdaptor(values, attrs, Properties{}, {}) {}
LaneMaskGtOpGenericAdaptor(RangeT values, const LaneMaskGtOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = LaneMaskGtOp, typename = std::enable_if_t<std::is_same_v<LateInst, LaneMaskGtOp>>>
LaneMaskGtOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class LaneMaskGtOpAdaptor : public LaneMaskGtOpGenericAdaptor<::mlir::ValueRange> {
public:
using LaneMaskGtOpGenericAdaptor::LaneMaskGtOpGenericAdaptor;
LaneMaskGtOpAdaptor(LaneMaskGtOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class LaneMaskGtOp : public ::mlir::Op<LaneMaskGtOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = LaneMaskGtOpAdaptor;
template <typename RangeT>
using GenericAdaptor = LaneMaskGtOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.lanemask.gt");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static LaneMaskGtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static LaneMaskGtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static LaneMaskGtOp create(::mlir::OpBuilder &builder, ::mlir::Location location);
static LaneMaskGtOp create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static LaneMaskGtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static LaneMaskGtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LaneMaskGtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LaneMaskGtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LaneMaskGtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LaneMaskGtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LaneMaskGtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LaneMaskGtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LaneMaskGtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LaneMaskGtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::LaneMaskGtOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::LaneMaskLeOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class LaneMaskLeOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
LaneMaskLeOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.lanemask.le", odsAttrs.getContext());
}
LaneMaskLeOpGenericAdaptorBase(LaneMaskLeOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class LaneMaskLeOpGenericAdaptor : public detail::LaneMaskLeOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::LaneMaskLeOpGenericAdaptorBase;
public:
LaneMaskLeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
LaneMaskLeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : LaneMaskLeOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
LaneMaskLeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : LaneMaskLeOpGenericAdaptor(values, attrs, Properties{}, {}) {}
LaneMaskLeOpGenericAdaptor(RangeT values, const LaneMaskLeOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = LaneMaskLeOp, typename = std::enable_if_t<std::is_same_v<LateInst, LaneMaskLeOp>>>
LaneMaskLeOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class LaneMaskLeOpAdaptor : public LaneMaskLeOpGenericAdaptor<::mlir::ValueRange> {
public:
using LaneMaskLeOpGenericAdaptor::LaneMaskLeOpGenericAdaptor;
LaneMaskLeOpAdaptor(LaneMaskLeOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class LaneMaskLeOp : public ::mlir::Op<LaneMaskLeOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = LaneMaskLeOpAdaptor;
template <typename RangeT>
using GenericAdaptor = LaneMaskLeOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.lanemask.le");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static LaneMaskLeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static LaneMaskLeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static LaneMaskLeOp create(::mlir::OpBuilder &builder, ::mlir::Location location);
static LaneMaskLeOp create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static LaneMaskLeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static LaneMaskLeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LaneMaskLeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LaneMaskLeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LaneMaskLeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LaneMaskLeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LaneMaskLeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LaneMaskLeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LaneMaskLeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LaneMaskLeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::LaneMaskLeOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::LaneMaskLtOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class LaneMaskLtOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
LaneMaskLtOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.lanemask.lt", odsAttrs.getContext());
}
LaneMaskLtOpGenericAdaptorBase(LaneMaskLtOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class LaneMaskLtOpGenericAdaptor : public detail::LaneMaskLtOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::LaneMaskLtOpGenericAdaptorBase;
public:
LaneMaskLtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
LaneMaskLtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : LaneMaskLtOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
LaneMaskLtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : LaneMaskLtOpGenericAdaptor(values, attrs, Properties{}, {}) {}
LaneMaskLtOpGenericAdaptor(RangeT values, const LaneMaskLtOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = LaneMaskLtOp, typename = std::enable_if_t<std::is_same_v<LateInst, LaneMaskLtOp>>>
LaneMaskLtOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class LaneMaskLtOpAdaptor : public LaneMaskLtOpGenericAdaptor<::mlir::ValueRange> {
public:
using LaneMaskLtOpGenericAdaptor::LaneMaskLtOpGenericAdaptor;
LaneMaskLtOpAdaptor(LaneMaskLtOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class LaneMaskLtOp : public ::mlir::Op<LaneMaskLtOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = LaneMaskLtOpAdaptor;
template <typename RangeT>
using GenericAdaptor = LaneMaskLtOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.lanemask.lt");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static LaneMaskLtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static LaneMaskLtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static LaneMaskLtOp create(::mlir::OpBuilder &builder, ::mlir::Location location);
static LaneMaskLtOp create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static LaneMaskLtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static LaneMaskLtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LaneMaskLtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LaneMaskLtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LaneMaskLtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LaneMaskLtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LaneMaskLtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LaneMaskLtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LaneMaskLtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LaneMaskLtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::LaneMaskLtOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::LdMatrixOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class LdMatrixOpGenericAdaptorBase {
public:
struct Properties {
using eltTypeTy = ::mlir::NVVM::LdStMatrixEltTypeAttr;
eltTypeTy eltType;
auto getEltType() const {
auto &propStorage = this->eltType;
return ::llvm::cast<::mlir::NVVM::LdStMatrixEltTypeAttr>(propStorage);
}
void setEltType(const ::mlir::NVVM::LdStMatrixEltTypeAttr &propValue) {
this->eltType = propValue;
}
using layoutTy = ::mlir::NVVM::MMALayoutAttr;
layoutTy layout;
auto getLayout() const {
auto &propStorage = this->layout;
return ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(propStorage);
}
void setLayout(const ::mlir::NVVM::MMALayoutAttr &propValue) {
this->layout = propValue;
}
using numTy = ::mlir::IntegerAttr;
numTy num;
auto getNum() const {
auto &propStorage = this->num;
return ::llvm::cast<::mlir::IntegerAttr>(propStorage);
}
void setNum(const ::mlir::IntegerAttr &propValue) {
this->num = propValue;
}
using shapeTy = ::mlir::NVVM::LdStMatrixShapeAttr;
shapeTy shape;
auto getShape() const {
auto &propStorage = this->shape;
return ::llvm::cast<::mlir::NVVM::LdStMatrixShapeAttr>(propStorage);
}
void setShape(const ::mlir::NVVM::LdStMatrixShapeAttr &propValue) {
this->shape = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.eltType == this->eltType &&
rhs.layout == this->layout &&
rhs.num == this->num &&
rhs.shape == this->shape &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
LdMatrixOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.ldmatrix", odsAttrs.getContext());
}
LdMatrixOpGenericAdaptorBase(LdMatrixOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::IntegerAttr getNumAttr() {
auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().num);
return attr;
}
uint32_t getNum();
::mlir::NVVM::MMALayoutAttr getLayoutAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(getProperties().layout);
return attr;
}
::mlir::NVVM::MMALayout getLayout();
::mlir::NVVM::LdStMatrixShapeAttr getShapeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::LdStMatrixShapeAttr>(getProperties().shape);
return attr;
}
::mlir::NVVM::LdStMatrixShapeAttr getShape();
::mlir::NVVM::LdStMatrixEltTypeAttr getEltTypeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::LdStMatrixEltTypeAttr>(getProperties().eltType);
return attr;
}
::mlir::NVVM::LdStMatrixEltType getEltType();
};
} // namespace detail
template <typename RangeT>
class LdMatrixOpGenericAdaptor : public detail::LdMatrixOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::LdMatrixOpGenericAdaptorBase;
static constexpr int odsIndex_ptr = 0;
public:
LdMatrixOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
LdMatrixOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : LdMatrixOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
LdMatrixOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : LdMatrixOpGenericAdaptor(values, attrs, Properties{}, {}) {}
LdMatrixOpGenericAdaptor(RangeT values, const LdMatrixOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = LdMatrixOp, typename = std::enable_if_t<std::is_same_v<LateInst, LdMatrixOp>>>
LdMatrixOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getPtr() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class LdMatrixOpAdaptor : public LdMatrixOpGenericAdaptor<::mlir::ValueRange> {
public:
using LdMatrixOpGenericAdaptor::LdMatrixOpGenericAdaptor;
LdMatrixOpAdaptor(LdMatrixOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class LdMatrixOp : public ::mlir::Op<LdMatrixOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor> {
public:
using Op::Op;
using Op::print;
using Adaptor = LdMatrixOpAdaptor;
template <typename RangeT>
using GenericAdaptor = LdMatrixOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_ptr = 0;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferTypeOpInterface::Trait<LdMatrixOp>::refineReturnTypes;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("eltType"), ::llvm::StringRef("layout"), ::llvm::StringRef("num"), ::llvm::StringRef("shape")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getEltTypeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getEltTypeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getLayoutAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getLayoutAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getNumAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getNumAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
::mlir::StringAttr getShapeAttrName() {
return getAttributeNameForIndex(3);
}
static ::mlir::StringAttr getShapeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 3);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.ldmatrix");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getPtr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getPtrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::IntegerAttr getNumAttr() {
return ::llvm::cast<::mlir::IntegerAttr>(getProperties().num);
}
uint32_t getNum();
::mlir::NVVM::MMALayoutAttr getLayoutAttr() {
return ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(getProperties().layout);
}
::mlir::NVVM::MMALayout getLayout();
::mlir::NVVM::LdStMatrixShapeAttr getShapeAttr() {
return ::llvm::cast<::mlir::NVVM::LdStMatrixShapeAttr>(getProperties().shape);
}
::mlir::NVVM::LdStMatrixShapeAttr getShape();
::mlir::NVVM::LdStMatrixEltTypeAttr getEltTypeAttr() {
return ::llvm::cast<::mlir::NVVM::LdStMatrixEltTypeAttr>(getProperties().eltType);
}
::mlir::NVVM::LdStMatrixEltType getEltType();
void setNumAttr(::mlir::IntegerAttr attr) {
getProperties().num = attr;
}
void setNum(uint32_t attrValue);
void setLayoutAttr(::mlir::NVVM::MMALayoutAttr attr) {
getProperties().layout = attr;
}
void setLayout(::mlir::NVVM::MMALayout attrValue);
void setShapeAttr(::mlir::NVVM::LdStMatrixShapeAttr attr) {
getProperties().shape = attr;
}
void setEltTypeAttr(::mlir::NVVM::LdStMatrixEltTypeAttr attr) {
getProperties().eltType = attr;
}
void setEltType(::mlir::NVVM::LdStMatrixEltType attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value ptr, ::mlir::IntegerAttr num, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltTypeAttr eltType);
static LdMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptr, ::mlir::IntegerAttr num, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltTypeAttr eltType);
static LdMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptr, ::mlir::IntegerAttr num, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltTypeAttr eltType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value ptr, ::mlir::IntegerAttr num, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltTypeAttr eltType);
static LdMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value ptr, ::mlir::IntegerAttr num, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltTypeAttr eltType);
static LdMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value ptr, ::mlir::IntegerAttr num, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltTypeAttr eltType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::IntegerAttr num, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltTypeAttr eltType);
static LdMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::IntegerAttr num, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltTypeAttr eltType);
static LdMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::IntegerAttr num, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltTypeAttr eltType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value ptr, uint32_t num, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltType eltType);
static LdMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptr, uint32_t num, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltType eltType);
static LdMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptr, uint32_t num, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltType eltType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value ptr, uint32_t num, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltType eltType);
static LdMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value ptr, uint32_t num, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltType eltType);
static LdMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value ptr, uint32_t num, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltType eltType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, uint32_t num, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltType eltType);
static LdMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, uint32_t num, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltType eltType);
static LdMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, uint32_t num, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltType eltType);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LdMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LdMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LdMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static LdMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LdMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LdMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LdMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static LdMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 4 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static ::llvm::LogicalResult
inferReturnTypes(::mlir::MLIRContext *context,
std::optional<::mlir::Location> location,
Adaptor adaptor,
::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::LdMatrixOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::LdMatrixOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::Log2Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class Log2OpGenericAdaptorBase {
public:
struct Properties {
using ftzTy = ::mlir::BoolAttr;
ftzTy ftz;
auto getFtz() const {
auto &propStorage = this->ftz;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setFtz(const ::mlir::BoolAttr &propValue) {
this->ftz = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.ftz == this->ftz &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
Log2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.log2", odsAttrs.getContext());
}
Log2OpGenericAdaptorBase(Log2Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::BoolAttr getFtzAttr();
bool getFtz();
};
} // namespace detail
template <typename RangeT>
class Log2OpGenericAdaptor : public detail::Log2OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::Log2OpGenericAdaptorBase;
static constexpr int odsIndex_src = 0;
public:
Log2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
Log2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Log2OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
Log2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : Log2OpGenericAdaptor(values, attrs, Properties{}, {}) {}
Log2OpGenericAdaptor(RangeT values, const Log2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = Log2Op, typename = std::enable_if_t<std::is_same_v<LateInst, Log2Op>>>
Log2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrc() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class Log2OpAdaptor : public Log2OpGenericAdaptor<::mlir::ValueRange> {
public:
using Log2OpGenericAdaptor::Log2OpGenericAdaptor;
Log2OpAdaptor(Log2Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class Log2Op : public ::mlir::Op<Log2Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::FloatType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = Log2OpAdaptor;
template <typename RangeT>
using GenericAdaptor = Log2OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("ftz")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getFtzAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getFtzAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.log2");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::FloatType> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::FloatType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::BoolAttr getFtzAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().ftz);
}
bool getFtz();
void setFtzAttr(::mlir::BoolAttr attr) {
getProperties().ftz = attr;
}
void setFtz(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::BoolAttr ftz);
static Log2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::BoolAttr ftz);
static Log2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::BoolAttr ftz);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value src, ::mlir::BoolAttr ftz);
static Log2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value src, ::mlir::BoolAttr ftz);
static Log2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value src, ::mlir::BoolAttr ftz);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr ftz);
static Log2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr ftz);
static Log2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr ftz);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, bool ftz = false);
static Log2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, bool ftz = false);
static Log2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, bool ftz = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value src, bool ftz = false);
static Log2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value src, bool ftz = false);
static Log2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value src, bool ftz = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool ftz = false);
static Log2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool ftz = false);
static Log2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool ftz = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Log2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Log2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Log2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Log2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Log2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Log2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Log2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Log2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::Log2Op)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::Log2OpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::MBarrierArriveDropExpectTxOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class MBarrierArriveDropExpectTxOpGenericAdaptorBase {
public:
struct Properties {
using relaxedTy = ::mlir::BoolAttr;
relaxedTy relaxed;
auto getRelaxed() const {
auto &propStorage = this->relaxed;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelaxed(const ::mlir::BoolAttr &propValue) {
this->relaxed = propValue;
}
using scopeTy = ::mlir::NVVM::MemScopeKindAttr;
scopeTy scope;
auto getScope() const {
auto &propStorage = this->scope;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MemScopeKindAttr>(propStorage);
}
void setScope(const ::mlir::NVVM::MemScopeKindAttr &propValue) {
this->scope = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.relaxed == this->relaxed &&
rhs.scope == this->scope &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
MBarrierArriveDropExpectTxOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.mbarrier.arrive_drop.expect_tx", odsAttrs.getContext());
}
MBarrierArriveDropExpectTxOpGenericAdaptorBase(MBarrierArriveDropExpectTxOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::MemScopeKindAttr getScopeAttr();
::mlir::NVVM::MemScopeKind getScope();
::mlir::BoolAttr getRelaxedAttr();
bool getRelaxed();
};
} // namespace detail
template <typename RangeT>
class MBarrierArriveDropExpectTxOpGenericAdaptor : public detail::MBarrierArriveDropExpectTxOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::MBarrierArriveDropExpectTxOpGenericAdaptorBase;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_txcount = 1;
public:
MBarrierArriveDropExpectTxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
MBarrierArriveDropExpectTxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MBarrierArriveDropExpectTxOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
MBarrierArriveDropExpectTxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MBarrierArriveDropExpectTxOpGenericAdaptor(values, attrs, Properties{}, {}) {}
MBarrierArriveDropExpectTxOpGenericAdaptor(RangeT values, const MBarrierArriveDropExpectTxOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = MBarrierArriveDropExpectTxOp, typename = std::enable_if_t<std::is_same_v<LateInst, MBarrierArriveDropExpectTxOp>>>
MBarrierArriveDropExpectTxOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getAddr() {
return (*getODSOperands(0).begin());
}
ValueT getTxcount() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class MBarrierArriveDropExpectTxOpAdaptor : public MBarrierArriveDropExpectTxOpGenericAdaptor<::mlir::ValueRange> {
public:
using MBarrierArriveDropExpectTxOpGenericAdaptor::MBarrierArriveDropExpectTxOpGenericAdaptor;
MBarrierArriveDropExpectTxOpAdaptor(MBarrierArriveDropExpectTxOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class MBarrierArriveDropExpectTxOp : public ::mlir::Op<MBarrierArriveDropExpectTxOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::VariadicResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor> {
public:
using Op::Op;
using Op::print;
using Adaptor = MBarrierArriveDropExpectTxOpAdaptor;
template <typename RangeT>
using GenericAdaptor = MBarrierArriveDropExpectTxOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_txcount = 1;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferTypeOpInterface::Trait<MBarrierArriveDropExpectTxOp>::refineReturnTypes;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("relaxed"), ::llvm::StringRef("scope")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRelaxedAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRelaxedAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getScopeAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getScopeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.mbarrier.arrive_drop.expect_tx");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getAddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getTxcount() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getAddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getTxcountMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index);
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
auto results = getODSResults(0);
return results.empty() ? ::mlir::TypedValue<::mlir::IntegerType>() : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*results.begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::MemScopeKindAttr getScopeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MemScopeKindAttr>(getProperties().scope);
}
::mlir::NVVM::MemScopeKind getScope();
::mlir::BoolAttr getRelaxedAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relaxed);
}
bool getRelaxed();
void setScopeAttr(::mlir::NVVM::MemScopeKindAttr attr) {
getProperties().scope = attr;
}
void setScope(::mlir::NVVM::MemScopeKind attrValue);
void setRelaxedAttr(::mlir::BoolAttr attr) {
getProperties().relaxed = attr;
}
void setRelaxed(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::Type res, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierArriveDropExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::Type res, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierArriveDropExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::Type res, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierArriveDropExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierArriveDropExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierArriveDropExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierArriveDropExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::Type res, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierArriveDropExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::Type res, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierArriveDropExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::Type res, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierArriveDropExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierArriveDropExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierArriveDropExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierArriveDropExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierArriveDropExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierArriveDropExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierArriveDropExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierArriveDropExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierArriveDropExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierArriveDropExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierArriveDropExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierArriveDropExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static ::llvm::LogicalResult
inferReturnTypes(::mlir::MLIRContext *context,
std::optional<::mlir::Location> location,
Adaptor adaptor,
::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::MBarrierArriveDropExpectTxOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::MBarrierArriveDropExpectTxOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::MBarrierArriveDropNocompleteOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class MBarrierArriveDropNocompleteOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
MBarrierArriveDropNocompleteOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.mbarrier.arrive_drop.nocomplete", odsAttrs.getContext());
}
MBarrierArriveDropNocompleteOpGenericAdaptorBase(MBarrierArriveDropNocompleteOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class MBarrierArriveDropNocompleteOpGenericAdaptor : public detail::MBarrierArriveDropNocompleteOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::MBarrierArriveDropNocompleteOpGenericAdaptorBase;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_count = 1;
public:
MBarrierArriveDropNocompleteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
MBarrierArriveDropNocompleteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MBarrierArriveDropNocompleteOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
MBarrierArriveDropNocompleteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MBarrierArriveDropNocompleteOpGenericAdaptor(values, attrs, Properties{}, {}) {}
MBarrierArriveDropNocompleteOpGenericAdaptor(RangeT values, const MBarrierArriveDropNocompleteOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = MBarrierArriveDropNocompleteOp, typename = std::enable_if_t<std::is_same_v<LateInst, MBarrierArriveDropNocompleteOp>>>
MBarrierArriveDropNocompleteOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getAddr() {
return (*getODSOperands(0).begin());
}
ValueT getCount() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class MBarrierArriveDropNocompleteOpAdaptor : public MBarrierArriveDropNocompleteOpGenericAdaptor<::mlir::ValueRange> {
public:
using MBarrierArriveDropNocompleteOpGenericAdaptor::MBarrierArriveDropNocompleteOpGenericAdaptor;
MBarrierArriveDropNocompleteOpAdaptor(MBarrierArriveDropNocompleteOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class MBarrierArriveDropNocompleteOp : public ::mlir::Op<MBarrierArriveDropNocompleteOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = MBarrierArriveDropNocompleteOpAdaptor;
template <typename RangeT>
using GenericAdaptor = MBarrierArriveDropNocompleteOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_count = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.mbarrier.arrive_drop.nocomplete");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getAddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getCount() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getAddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getCountMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value addr, ::mlir::Value count);
static MBarrierArriveDropNocompleteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value addr, ::mlir::Value count);
static MBarrierArriveDropNocompleteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value addr, ::mlir::Value count);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, ::mlir::Value count);
static MBarrierArriveDropNocompleteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, ::mlir::Value count);
static MBarrierArriveDropNocompleteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, ::mlir::Value count);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value count);
static MBarrierArriveDropNocompleteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value count);
static MBarrierArriveDropNocompleteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value count);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierArriveDropNocompleteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierArriveDropNocompleteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierArriveDropNocompleteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierArriveDropNocompleteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierArriveDropNocompleteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierArriveDropNocompleteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierArriveDropNocompleteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierArriveDropNocompleteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::MBarrierArriveDropNocompleteOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::MBarrierArriveDropOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class MBarrierArriveDropOpGenericAdaptorBase {
public:
struct Properties {
using relaxedTy = ::mlir::BoolAttr;
relaxedTy relaxed;
auto getRelaxed() const {
auto &propStorage = this->relaxed;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelaxed(const ::mlir::BoolAttr &propValue) {
this->relaxed = propValue;
}
using scopeTy = ::mlir::NVVM::MemScopeKindAttr;
scopeTy scope;
auto getScope() const {
auto &propStorage = this->scope;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MemScopeKindAttr>(propStorage);
}
void setScope(const ::mlir::NVVM::MemScopeKindAttr &propValue) {
this->scope = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.relaxed == this->relaxed &&
rhs.scope == this->scope &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
MBarrierArriveDropOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.mbarrier.arrive_drop", odsAttrs.getContext());
}
MBarrierArriveDropOpGenericAdaptorBase(MBarrierArriveDropOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::MemScopeKindAttr getScopeAttr();
::mlir::NVVM::MemScopeKind getScope();
::mlir::BoolAttr getRelaxedAttr();
bool getRelaxed();
};
} // namespace detail
template <typename RangeT>
class MBarrierArriveDropOpGenericAdaptor : public detail::MBarrierArriveDropOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::MBarrierArriveDropOpGenericAdaptorBase;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_count = 1;
public:
MBarrierArriveDropOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
MBarrierArriveDropOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MBarrierArriveDropOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
MBarrierArriveDropOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MBarrierArriveDropOpGenericAdaptor(values, attrs, Properties{}, {}) {}
MBarrierArriveDropOpGenericAdaptor(RangeT values, const MBarrierArriveDropOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = MBarrierArriveDropOp, typename = std::enable_if_t<std::is_same_v<LateInst, MBarrierArriveDropOp>>>
MBarrierArriveDropOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getAddr() {
return (*getODSOperands(0).begin());
}
ValueT getCount() {
auto operands = getODSOperands(1);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class MBarrierArriveDropOpAdaptor : public MBarrierArriveDropOpGenericAdaptor<::mlir::ValueRange> {
public:
using MBarrierArriveDropOpGenericAdaptor::MBarrierArriveDropOpGenericAdaptor;
MBarrierArriveDropOpAdaptor(MBarrierArriveDropOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class MBarrierArriveDropOp : public ::mlir::Op<MBarrierArriveDropOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::VariadicResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor> {
public:
using Op::Op;
using Op::print;
using Adaptor = MBarrierArriveDropOpAdaptor;
template <typename RangeT>
using GenericAdaptor = MBarrierArriveDropOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_count = 1;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferTypeOpInterface::Trait<MBarrierArriveDropOp>::refineReturnTypes;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("relaxed"), ::llvm::StringRef("scope")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRelaxedAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRelaxedAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getScopeAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getScopeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.mbarrier.arrive_drop");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getAddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getCount() {
auto operands = getODSOperands(1);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getAddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getCountMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index);
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
auto results = getODSResults(0);
return results.empty() ? ::mlir::TypedValue<::mlir::IntegerType>() : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*results.begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::MemScopeKindAttr getScopeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MemScopeKindAttr>(getProperties().scope);
}
::mlir::NVVM::MemScopeKind getScope();
::mlir::BoolAttr getRelaxedAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relaxed);
}
bool getRelaxed();
void setScopeAttr(::mlir::NVVM::MemScopeKindAttr attr) {
getProperties().scope = attr;
}
void setScope(::mlir::NVVM::MemScopeKind attrValue);
void setRelaxedAttr(::mlir::BoolAttr attr) {
getProperties().relaxed = attr;
}
void setRelaxed(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::Type res, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierArriveDropOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::Type res, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierArriveDropOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::Type res, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierArriveDropOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierArriveDropOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierArriveDropOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierArriveDropOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::Type res, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierArriveDropOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::Type res, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierArriveDropOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::Type res, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierArriveDropOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierArriveDropOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierArriveDropOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierArriveDropOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierArriveDropOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierArriveDropOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierArriveDropOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierArriveDropOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierArriveDropOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierArriveDropOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierArriveDropOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierArriveDropOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static ::llvm::LogicalResult
inferReturnTypes(::mlir::MLIRContext *context,
std::optional<::mlir::Location> location,
Adaptor adaptor,
::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::MBarrierArriveDropOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::MBarrierArriveDropOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::MBarrierArriveExpectTxOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class MBarrierArriveExpectTxOpGenericAdaptorBase {
public:
struct Properties {
using relaxedTy = ::mlir::BoolAttr;
relaxedTy relaxed;
auto getRelaxed() const {
auto &propStorage = this->relaxed;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelaxed(const ::mlir::BoolAttr &propValue) {
this->relaxed = propValue;
}
using scopeTy = ::mlir::NVVM::MemScopeKindAttr;
scopeTy scope;
auto getScope() const {
auto &propStorage = this->scope;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MemScopeKindAttr>(propStorage);
}
void setScope(const ::mlir::NVVM::MemScopeKindAttr &propValue) {
this->scope = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.relaxed == this->relaxed &&
rhs.scope == this->scope &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
MBarrierArriveExpectTxOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.mbarrier.arrive.expect_tx", odsAttrs.getContext());
}
MBarrierArriveExpectTxOpGenericAdaptorBase(MBarrierArriveExpectTxOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::MemScopeKindAttr getScopeAttr();
::mlir::NVVM::MemScopeKind getScope();
::mlir::BoolAttr getRelaxedAttr();
bool getRelaxed();
};
} // namespace detail
template <typename RangeT>
class MBarrierArriveExpectTxOpGenericAdaptor : public detail::MBarrierArriveExpectTxOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::MBarrierArriveExpectTxOpGenericAdaptorBase;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_txcount = 1;
static constexpr int odsIndex_predicate = 2;
public:
MBarrierArriveExpectTxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
MBarrierArriveExpectTxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MBarrierArriveExpectTxOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
MBarrierArriveExpectTxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MBarrierArriveExpectTxOpGenericAdaptor(values, attrs, Properties{}, {}) {}
MBarrierArriveExpectTxOpGenericAdaptor(RangeT values, const MBarrierArriveExpectTxOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = MBarrierArriveExpectTxOp, typename = std::enable_if_t<std::is_same_v<LateInst, MBarrierArriveExpectTxOp>>>
MBarrierArriveExpectTxOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getAddr() {
return (*getODSOperands(0).begin());
}
ValueT getTxcount() {
return (*getODSOperands(1).begin());
}
ValueT getPredicate() {
auto operands = getODSOperands(2);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class MBarrierArriveExpectTxOpAdaptor : public MBarrierArriveExpectTxOpGenericAdaptor<::mlir::ValueRange> {
public:
using MBarrierArriveExpectTxOpGenericAdaptor::MBarrierArriveExpectTxOpGenericAdaptor;
MBarrierArriveExpectTxOpAdaptor(MBarrierArriveExpectTxOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class MBarrierArriveExpectTxOp : public ::mlir::Op<MBarrierArriveExpectTxOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::VariadicResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::NVVM::BasicPtxBuilderInterface::Trait, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor> {
public:
using Op::Op;
using Op::print;
using Adaptor = MBarrierArriveExpectTxOpAdaptor;
template <typename RangeT>
using GenericAdaptor = MBarrierArriveExpectTxOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_txcount = 1;
static constexpr int odsIndex_predicate = 2;
using Properties = FoldAdaptor::Properties;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<MBarrierArriveExpectTxOp>::getPredicate;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<MBarrierArriveExpectTxOp>::hasIntrinsic;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<MBarrierArriveExpectTxOp>::hasSideEffect;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<MBarrierArriveExpectTxOp>::makeConstantI32;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<MBarrierArriveExpectTxOp>::getAsmValues;
using ::mlir::InferTypeOpInterface::Trait<MBarrierArriveExpectTxOp>::refineReturnTypes;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("relaxed"), ::llvm::StringRef("scope")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRelaxedAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRelaxedAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getScopeAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getScopeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.mbarrier.arrive.expect_tx");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getAddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getTxcount() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getPredicate() {
auto operands = getODSOperands(2);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getAddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getTxcountMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getPredicateMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index);
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
auto results = getODSResults(0);
return results.empty() ? ::mlir::TypedValue<::mlir::IntegerType>() : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*results.begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::MemScopeKindAttr getScopeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MemScopeKindAttr>(getProperties().scope);
}
::mlir::NVVM::MemScopeKind getScope();
::mlir::BoolAttr getRelaxedAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relaxed);
}
bool getRelaxed();
void setScopeAttr(::mlir::NVVM::MemScopeKindAttr attr) {
getProperties().scope = attr;
}
void setScope(::mlir::NVVM::MemScopeKind attrValue);
void setRelaxedAttr(::mlir::BoolAttr attr) {
getProperties().relaxed = attr;
}
void setRelaxed(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::Type res, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed, /*optional*/::mlir::Value predicate);
static MBarrierArriveExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::Type res, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed, /*optional*/::mlir::Value predicate);
static MBarrierArriveExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::Type res, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed, /*optional*/::mlir::Value predicate);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed, /*optional*/::mlir::Value predicate);
static MBarrierArriveExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed, /*optional*/::mlir::Value predicate);
static MBarrierArriveExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed, /*optional*/::mlir::Value predicate);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed, /*optional*/::mlir::Value predicate);
static MBarrierArriveExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed, /*optional*/::mlir::Value predicate);
static MBarrierArriveExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed, /*optional*/::mlir::Value predicate);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::Type res, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope, bool relaxed, /*optional*/::mlir::Value predicate);
static MBarrierArriveExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::Type res, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope, bool relaxed, /*optional*/::mlir::Value predicate);
static MBarrierArriveExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::Type res, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope, bool relaxed, /*optional*/::mlir::Value predicate);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope, bool relaxed, /*optional*/::mlir::Value predicate);
static MBarrierArriveExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope, bool relaxed, /*optional*/::mlir::Value predicate);
static MBarrierArriveExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope, bool relaxed, /*optional*/::mlir::Value predicate);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope, bool relaxed, /*optional*/::mlir::Value predicate);
static MBarrierArriveExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope, bool relaxed, /*optional*/::mlir::Value predicate);
static MBarrierArriveExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope, bool relaxed, /*optional*/::mlir::Value predicate);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierArriveExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierArriveExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierArriveExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierArriveExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierArriveExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierArriveExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierArriveExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierArriveExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
std::string getPtx();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static ::llvm::LogicalResult
inferReturnTypes(::mlir::MLIRContext *context,
std::optional<::mlir::Location> location,
Adaptor adaptor,
::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
bool hasIntrinsic() { return !getPredicate(); }
bool getAsmValues(RewriterBase &rewriter,
llvm::SmallVectorImpl<std::pair<mlir::Value, mlir::NVVM::PTXRegisterMod>> &asmValues);
static mlir::NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase& builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::MBarrierArriveExpectTxOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::MBarrierArriveExpectTxOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::MBarrierArriveNocompleteOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class MBarrierArriveNocompleteOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
MBarrierArriveNocompleteOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.mbarrier.arrive.nocomplete", odsAttrs.getContext());
}
MBarrierArriveNocompleteOpGenericAdaptorBase(MBarrierArriveNocompleteOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class MBarrierArriveNocompleteOpGenericAdaptor : public detail::MBarrierArriveNocompleteOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::MBarrierArriveNocompleteOpGenericAdaptorBase;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_count = 1;
public:
MBarrierArriveNocompleteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
MBarrierArriveNocompleteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MBarrierArriveNocompleteOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
MBarrierArriveNocompleteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MBarrierArriveNocompleteOpGenericAdaptor(values, attrs, Properties{}, {}) {}
MBarrierArriveNocompleteOpGenericAdaptor(RangeT values, const MBarrierArriveNocompleteOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = MBarrierArriveNocompleteOp, typename = std::enable_if_t<std::is_same_v<LateInst, MBarrierArriveNocompleteOp>>>
MBarrierArriveNocompleteOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getAddr() {
return (*getODSOperands(0).begin());
}
ValueT getCount() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class MBarrierArriveNocompleteOpAdaptor : public MBarrierArriveNocompleteOpGenericAdaptor<::mlir::ValueRange> {
public:
using MBarrierArriveNocompleteOpGenericAdaptor::MBarrierArriveNocompleteOpGenericAdaptor;
MBarrierArriveNocompleteOpAdaptor(MBarrierArriveNocompleteOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class MBarrierArriveNocompleteOp : public ::mlir::Op<MBarrierArriveNocompleteOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = MBarrierArriveNocompleteOpAdaptor;
template <typename RangeT>
using GenericAdaptor = MBarrierArriveNocompleteOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_count = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.mbarrier.arrive.nocomplete");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getAddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getCount() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getAddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getCountMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value addr, ::mlir::Value count);
static MBarrierArriveNocompleteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value addr, ::mlir::Value count);
static MBarrierArriveNocompleteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value addr, ::mlir::Value count);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, ::mlir::Value count);
static MBarrierArriveNocompleteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, ::mlir::Value count);
static MBarrierArriveNocompleteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, ::mlir::Value count);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value count);
static MBarrierArriveNocompleteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value count);
static MBarrierArriveNocompleteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value count);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierArriveNocompleteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierArriveNocompleteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierArriveNocompleteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierArriveNocompleteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierArriveNocompleteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierArriveNocompleteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierArriveNocompleteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierArriveNocompleteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::MBarrierArriveNocompleteOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::MBarrierArriveOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class MBarrierArriveOpGenericAdaptorBase {
public:
struct Properties {
using relaxedTy = ::mlir::BoolAttr;
relaxedTy relaxed;
auto getRelaxed() const {
auto &propStorage = this->relaxed;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelaxed(const ::mlir::BoolAttr &propValue) {
this->relaxed = propValue;
}
using scopeTy = ::mlir::NVVM::MemScopeKindAttr;
scopeTy scope;
auto getScope() const {
auto &propStorage = this->scope;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MemScopeKindAttr>(propStorage);
}
void setScope(const ::mlir::NVVM::MemScopeKindAttr &propValue) {
this->scope = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.relaxed == this->relaxed &&
rhs.scope == this->scope &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
MBarrierArriveOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.mbarrier.arrive", odsAttrs.getContext());
}
MBarrierArriveOpGenericAdaptorBase(MBarrierArriveOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::MemScopeKindAttr getScopeAttr();
::mlir::NVVM::MemScopeKind getScope();
::mlir::BoolAttr getRelaxedAttr();
bool getRelaxed();
};
} // namespace detail
template <typename RangeT>
class MBarrierArriveOpGenericAdaptor : public detail::MBarrierArriveOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::MBarrierArriveOpGenericAdaptorBase;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_count = 1;
public:
MBarrierArriveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
MBarrierArriveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MBarrierArriveOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
MBarrierArriveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MBarrierArriveOpGenericAdaptor(values, attrs, Properties{}, {}) {}
MBarrierArriveOpGenericAdaptor(RangeT values, const MBarrierArriveOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = MBarrierArriveOp, typename = std::enable_if_t<std::is_same_v<LateInst, MBarrierArriveOp>>>
MBarrierArriveOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getAddr() {
return (*getODSOperands(0).begin());
}
ValueT getCount() {
auto operands = getODSOperands(1);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class MBarrierArriveOpAdaptor : public MBarrierArriveOpGenericAdaptor<::mlir::ValueRange> {
public:
using MBarrierArriveOpGenericAdaptor::MBarrierArriveOpGenericAdaptor;
MBarrierArriveOpAdaptor(MBarrierArriveOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class MBarrierArriveOp : public ::mlir::Op<MBarrierArriveOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::VariadicResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor> {
public:
using Op::Op;
using Op::print;
using Adaptor = MBarrierArriveOpAdaptor;
template <typename RangeT>
using GenericAdaptor = MBarrierArriveOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_count = 1;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferTypeOpInterface::Trait<MBarrierArriveOp>::refineReturnTypes;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("relaxed"), ::llvm::StringRef("scope")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRelaxedAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRelaxedAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getScopeAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getScopeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.mbarrier.arrive");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getAddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getCount() {
auto operands = getODSOperands(1);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getAddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getCountMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index);
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
auto results = getODSResults(0);
return results.empty() ? ::mlir::TypedValue<::mlir::IntegerType>() : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*results.begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::MemScopeKindAttr getScopeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MemScopeKindAttr>(getProperties().scope);
}
::mlir::NVVM::MemScopeKind getScope();
::mlir::BoolAttr getRelaxedAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relaxed);
}
bool getRelaxed();
void setScopeAttr(::mlir::NVVM::MemScopeKindAttr attr) {
getProperties().scope = attr;
}
void setScope(::mlir::NVVM::MemScopeKind attrValue);
void setRelaxedAttr(::mlir::BoolAttr attr) {
getProperties().relaxed = attr;
}
void setRelaxed(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::Type res, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::Type res, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierArriveOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::Type res, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierArriveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierArriveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::Type res, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::Type res, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierArriveOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::Type res, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierArriveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierArriveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, /*optional*/::mlir::Value count, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierArriveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierArriveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierArriveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierArriveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierArriveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static ::llvm::LogicalResult
inferReturnTypes(::mlir::MLIRContext *context,
std::optional<::mlir::Location> location,
Adaptor adaptor,
::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::MBarrierArriveOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::MBarrierArriveOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::MBarrierCompleteTxOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class MBarrierCompleteTxOpGenericAdaptorBase {
public:
struct Properties {
using scopeTy = ::mlir::NVVM::MemScopeKindAttr;
scopeTy scope;
auto getScope() const {
auto &propStorage = this->scope;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MemScopeKindAttr>(propStorage);
}
void setScope(const ::mlir::NVVM::MemScopeKindAttr &propValue) {
this->scope = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.scope == this->scope &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
MBarrierCompleteTxOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.mbarrier.complete_tx", odsAttrs.getContext());
}
MBarrierCompleteTxOpGenericAdaptorBase(MBarrierCompleteTxOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::MemScopeKindAttr getScopeAttr();
::mlir::NVVM::MemScopeKind getScope();
};
} // namespace detail
template <typename RangeT>
class MBarrierCompleteTxOpGenericAdaptor : public detail::MBarrierCompleteTxOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::MBarrierCompleteTxOpGenericAdaptorBase;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_txcount = 1;
public:
MBarrierCompleteTxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
MBarrierCompleteTxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MBarrierCompleteTxOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
MBarrierCompleteTxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MBarrierCompleteTxOpGenericAdaptor(values, attrs, Properties{}, {}) {}
MBarrierCompleteTxOpGenericAdaptor(RangeT values, const MBarrierCompleteTxOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = MBarrierCompleteTxOp, typename = std::enable_if_t<std::is_same_v<LateInst, MBarrierCompleteTxOp>>>
MBarrierCompleteTxOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getAddr() {
return (*getODSOperands(0).begin());
}
ValueT getTxcount() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class MBarrierCompleteTxOpAdaptor : public MBarrierCompleteTxOpGenericAdaptor<::mlir::ValueRange> {
public:
using MBarrierCompleteTxOpGenericAdaptor::MBarrierCompleteTxOpGenericAdaptor;
MBarrierCompleteTxOpAdaptor(MBarrierCompleteTxOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class MBarrierCompleteTxOp : public ::mlir::Op<MBarrierCompleteTxOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = MBarrierCompleteTxOpAdaptor;
template <typename RangeT>
using GenericAdaptor = MBarrierCompleteTxOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_txcount = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("scope")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getScopeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getScopeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.mbarrier.complete_tx");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getAddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getTxcount() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getAddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getTxcountMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::MemScopeKindAttr getScopeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MemScopeKindAttr>(getProperties().scope);
}
::mlir::NVVM::MemScopeKind getScope();
void setScopeAttr(::mlir::NVVM::MemScopeKindAttr attr) {
getProperties().scope = attr;
}
void setScope(::mlir::NVVM::MemScopeKind attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope);
static MBarrierCompleteTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope);
static MBarrierCompleteTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope);
static MBarrierCompleteTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope);
static MBarrierCompleteTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA);
static MBarrierCompleteTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA);
static MBarrierCompleteTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA);
static MBarrierCompleteTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA);
static MBarrierCompleteTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierCompleteTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierCompleteTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierCompleteTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierCompleteTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::MBarrierCompleteTxOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::MBarrierCompleteTxOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::MBarrierExpectTxOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class MBarrierExpectTxOpGenericAdaptorBase {
public:
struct Properties {
using scopeTy = ::mlir::NVVM::MemScopeKindAttr;
scopeTy scope;
auto getScope() const {
auto &propStorage = this->scope;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MemScopeKindAttr>(propStorage);
}
void setScope(const ::mlir::NVVM::MemScopeKindAttr &propValue) {
this->scope = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.scope == this->scope &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
MBarrierExpectTxOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.mbarrier.expect_tx", odsAttrs.getContext());
}
MBarrierExpectTxOpGenericAdaptorBase(MBarrierExpectTxOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::MemScopeKindAttr getScopeAttr();
::mlir::NVVM::MemScopeKind getScope();
};
} // namespace detail
template <typename RangeT>
class MBarrierExpectTxOpGenericAdaptor : public detail::MBarrierExpectTxOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::MBarrierExpectTxOpGenericAdaptorBase;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_txcount = 1;
public:
MBarrierExpectTxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
MBarrierExpectTxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MBarrierExpectTxOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
MBarrierExpectTxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MBarrierExpectTxOpGenericAdaptor(values, attrs, Properties{}, {}) {}
MBarrierExpectTxOpGenericAdaptor(RangeT values, const MBarrierExpectTxOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = MBarrierExpectTxOp, typename = std::enable_if_t<std::is_same_v<LateInst, MBarrierExpectTxOp>>>
MBarrierExpectTxOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getAddr() {
return (*getODSOperands(0).begin());
}
ValueT getTxcount() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class MBarrierExpectTxOpAdaptor : public MBarrierExpectTxOpGenericAdaptor<::mlir::ValueRange> {
public:
using MBarrierExpectTxOpGenericAdaptor::MBarrierExpectTxOpGenericAdaptor;
MBarrierExpectTxOpAdaptor(MBarrierExpectTxOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class MBarrierExpectTxOp : public ::mlir::Op<MBarrierExpectTxOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = MBarrierExpectTxOpAdaptor;
template <typename RangeT>
using GenericAdaptor = MBarrierExpectTxOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_txcount = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("scope")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getScopeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getScopeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.mbarrier.expect_tx");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getAddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getTxcount() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getAddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getTxcountMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::MemScopeKindAttr getScopeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MemScopeKindAttr>(getProperties().scope);
}
::mlir::NVVM::MemScopeKind getScope();
void setScopeAttr(::mlir::NVVM::MemScopeKindAttr attr) {
getProperties().scope = attr;
}
void setScope(::mlir::NVVM::MemScopeKind attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope);
static MBarrierExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope);
static MBarrierExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope);
static MBarrierExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope);
static MBarrierExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKindAttr scope);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA);
static MBarrierExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA);
static MBarrierExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA);
static MBarrierExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA);
static MBarrierExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value txcount, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierExpectTxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierExpectTxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::MBarrierExpectTxOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::MBarrierExpectTxOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::MBarrierInitOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class MBarrierInitOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
MBarrierInitOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.mbarrier.init", odsAttrs.getContext());
}
MBarrierInitOpGenericAdaptorBase(MBarrierInitOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class MBarrierInitOpGenericAdaptor : public detail::MBarrierInitOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::MBarrierInitOpGenericAdaptorBase;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_count = 1;
static constexpr int odsIndex_predicate = 2;
public:
MBarrierInitOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
MBarrierInitOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MBarrierInitOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
MBarrierInitOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MBarrierInitOpGenericAdaptor(values, attrs, Properties{}, {}) {}
MBarrierInitOpGenericAdaptor(RangeT values, const MBarrierInitOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = MBarrierInitOp, typename = std::enable_if_t<std::is_same_v<LateInst, MBarrierInitOp>>>
MBarrierInitOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getAddr() {
return (*getODSOperands(0).begin());
}
ValueT getCount() {
return (*getODSOperands(1).begin());
}
ValueT getPredicate() {
auto operands = getODSOperands(2);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class MBarrierInitOpAdaptor : public MBarrierInitOpGenericAdaptor<::mlir::ValueRange> {
public:
using MBarrierInitOpGenericAdaptor::MBarrierInitOpGenericAdaptor;
MBarrierInitOpAdaptor(MBarrierInitOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class MBarrierInitOp : public ::mlir::Op<MBarrierInitOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::NVVM::BasicPtxBuilderInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = MBarrierInitOpAdaptor;
template <typename RangeT>
using GenericAdaptor = MBarrierInitOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_count = 1;
static constexpr int odsIndex_predicate = 2;
using Properties = FoldAdaptor::Properties;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<MBarrierInitOp>::getPredicate;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<MBarrierInitOp>::hasIntrinsic;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<MBarrierInitOp>::hasSideEffect;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<MBarrierInitOp>::makeConstantI32;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<MBarrierInitOp>::getAsmValues;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.mbarrier.init");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getAddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getCount() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getPredicate() {
auto operands = getODSOperands(2);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getAddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getCountMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getPredicateMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, ::mlir::Value count, /*optional*/::mlir::Value predicate);
static MBarrierInitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, ::mlir::Value count, /*optional*/::mlir::Value predicate);
static MBarrierInitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, ::mlir::Value count, /*optional*/::mlir::Value predicate);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value count, /*optional*/::mlir::Value predicate);
static MBarrierInitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value count, /*optional*/::mlir::Value predicate);
static MBarrierInitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value count, /*optional*/::mlir::Value predicate);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierInitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierInitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierInitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierInitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
std::string getPtx();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
public:
bool hasIntrinsic() { if(getPredicate()) return false; return true; }
static mlir::NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase& builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::MBarrierInitOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::MBarrierInvalOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class MBarrierInvalOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
MBarrierInvalOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.mbarrier.inval", odsAttrs.getContext());
}
MBarrierInvalOpGenericAdaptorBase(MBarrierInvalOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class MBarrierInvalOpGenericAdaptor : public detail::MBarrierInvalOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::MBarrierInvalOpGenericAdaptorBase;
static constexpr int odsIndex_addr = 0;
public:
MBarrierInvalOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
MBarrierInvalOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MBarrierInvalOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
MBarrierInvalOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MBarrierInvalOpGenericAdaptor(values, attrs, Properties{}, {}) {}
MBarrierInvalOpGenericAdaptor(RangeT values, const MBarrierInvalOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = MBarrierInvalOp, typename = std::enable_if_t<std::is_same_v<LateInst, MBarrierInvalOp>>>
MBarrierInvalOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getAddr() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class MBarrierInvalOpAdaptor : public MBarrierInvalOpGenericAdaptor<::mlir::ValueRange> {
public:
using MBarrierInvalOpGenericAdaptor::MBarrierInvalOpGenericAdaptor;
MBarrierInvalOpAdaptor(MBarrierInvalOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class MBarrierInvalOp : public ::mlir::Op<MBarrierInvalOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants> {
public:
using Op::Op;
using Op::print;
using Adaptor = MBarrierInvalOpAdaptor;
template <typename RangeT>
using GenericAdaptor = MBarrierInvalOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_addr = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.mbarrier.inval");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getAddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getAddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr);
static MBarrierInvalOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr);
static MBarrierInvalOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr);
static MBarrierInvalOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr);
static MBarrierInvalOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierInvalOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierInvalOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierInvalOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierInvalOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::MBarrierInvalOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::MBarrierTestWaitOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class MBarrierTestWaitOpGenericAdaptorBase {
public:
struct Properties {
using relaxedTy = ::mlir::BoolAttr;
relaxedTy relaxed;
auto getRelaxed() const {
auto &propStorage = this->relaxed;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelaxed(const ::mlir::BoolAttr &propValue) {
this->relaxed = propValue;
}
using scopeTy = ::mlir::NVVM::MemScopeKindAttr;
scopeTy scope;
auto getScope() const {
auto &propStorage = this->scope;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MemScopeKindAttr>(propStorage);
}
void setScope(const ::mlir::NVVM::MemScopeKindAttr &propValue) {
this->scope = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.relaxed == this->relaxed &&
rhs.scope == this->scope &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
MBarrierTestWaitOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.mbarrier.test.wait", odsAttrs.getContext());
}
MBarrierTestWaitOpGenericAdaptorBase(MBarrierTestWaitOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::MemScopeKindAttr getScopeAttr();
::mlir::NVVM::MemScopeKind getScope();
::mlir::BoolAttr getRelaxedAttr();
bool getRelaxed();
};
} // namespace detail
template <typename RangeT>
class MBarrierTestWaitOpGenericAdaptor : public detail::MBarrierTestWaitOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::MBarrierTestWaitOpGenericAdaptorBase;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_stateOrPhase = 1;
public:
MBarrierTestWaitOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
MBarrierTestWaitOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MBarrierTestWaitOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
MBarrierTestWaitOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MBarrierTestWaitOpGenericAdaptor(values, attrs, Properties{}, {}) {}
MBarrierTestWaitOpGenericAdaptor(RangeT values, const MBarrierTestWaitOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = MBarrierTestWaitOp, typename = std::enable_if_t<std::is_same_v<LateInst, MBarrierTestWaitOp>>>
MBarrierTestWaitOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getAddr() {
return (*getODSOperands(0).begin());
}
ValueT getStateOrPhase() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class MBarrierTestWaitOpAdaptor : public MBarrierTestWaitOpGenericAdaptor<::mlir::ValueRange> {
public:
using MBarrierTestWaitOpGenericAdaptor::MBarrierTestWaitOpGenericAdaptor;
MBarrierTestWaitOpAdaptor(MBarrierTestWaitOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class MBarrierTestWaitOp : public ::mlir::Op<MBarrierTestWaitOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = MBarrierTestWaitOpAdaptor;
template <typename RangeT>
using GenericAdaptor = MBarrierTestWaitOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_stateOrPhase = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("relaxed"), ::llvm::StringRef("scope")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRelaxedAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRelaxedAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getScopeAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getScopeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.mbarrier.test.wait");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getAddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::Type> getStateOrPhase() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getAddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getStateOrPhaseMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::MemScopeKindAttr getScopeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MemScopeKindAttr>(getProperties().scope);
}
::mlir::NVVM::MemScopeKind getScope();
::mlir::BoolAttr getRelaxedAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relaxed);
}
bool getRelaxed();
void setScopeAttr(::mlir::NVVM::MemScopeKindAttr attr) {
getProperties().scope = attr;
}
void setScope(::mlir::NVVM::MemScopeKind attrValue);
void setRelaxedAttr(::mlir::BoolAttr attr) {
getProperties().relaxed = attr;
}
void setRelaxed(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value addr, ::mlir::Value stateOrPhase, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierTestWaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value addr, ::mlir::Value stateOrPhase, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierTestWaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value addr, ::mlir::Value stateOrPhase, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, ::mlir::Value stateOrPhase, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierTestWaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, ::mlir::Value stateOrPhase, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierTestWaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, ::mlir::Value stateOrPhase, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value stateOrPhase, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierTestWaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value stateOrPhase, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierTestWaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value stateOrPhase, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value addr, ::mlir::Value stateOrPhase, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierTestWaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value addr, ::mlir::Value stateOrPhase, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierTestWaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value addr, ::mlir::Value stateOrPhase, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, ::mlir::Value stateOrPhase, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierTestWaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, ::mlir::Value stateOrPhase, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierTestWaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, ::mlir::Value stateOrPhase, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value stateOrPhase, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierTestWaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value stateOrPhase, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierTestWaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value stateOrPhase, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierTestWaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierTestWaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierTestWaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierTestWaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierTestWaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierTestWaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierTestWaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierTestWaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::MBarrierTestWaitOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::MBarrierTestWaitOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::MBarrierTryWaitOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class MBarrierTryWaitOpGenericAdaptorBase {
public:
struct Properties {
using relaxedTy = ::mlir::BoolAttr;
relaxedTy relaxed;
auto getRelaxed() const {
auto &propStorage = this->relaxed;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setRelaxed(const ::mlir::BoolAttr &propValue) {
this->relaxed = propValue;
}
using scopeTy = ::mlir::NVVM::MemScopeKindAttr;
scopeTy scope;
auto getScope() const {
auto &propStorage = this->scope;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MemScopeKindAttr>(propStorage);
}
void setScope(const ::mlir::NVVM::MemScopeKindAttr &propValue) {
this->scope = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.relaxed == this->relaxed &&
rhs.scope == this->scope &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
MBarrierTryWaitOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.mbarrier.try_wait", odsAttrs.getContext());
}
MBarrierTryWaitOpGenericAdaptorBase(MBarrierTryWaitOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::MemScopeKindAttr getScopeAttr();
::mlir::NVVM::MemScopeKind getScope();
::mlir::BoolAttr getRelaxedAttr();
bool getRelaxed();
};
} // namespace detail
template <typename RangeT>
class MBarrierTryWaitOpGenericAdaptor : public detail::MBarrierTryWaitOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::MBarrierTryWaitOpGenericAdaptorBase;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_stateOrPhase = 1;
static constexpr int odsIndex_ticks = 2;
public:
MBarrierTryWaitOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
MBarrierTryWaitOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MBarrierTryWaitOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
MBarrierTryWaitOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MBarrierTryWaitOpGenericAdaptor(values, attrs, Properties{}, {}) {}
MBarrierTryWaitOpGenericAdaptor(RangeT values, const MBarrierTryWaitOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = MBarrierTryWaitOp, typename = std::enable_if_t<std::is_same_v<LateInst, MBarrierTryWaitOp>>>
MBarrierTryWaitOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getAddr() {
return (*getODSOperands(0).begin());
}
ValueT getStateOrPhase() {
return (*getODSOperands(1).begin());
}
ValueT getTicks() {
auto operands = getODSOperands(2);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class MBarrierTryWaitOpAdaptor : public MBarrierTryWaitOpGenericAdaptor<::mlir::ValueRange> {
public:
using MBarrierTryWaitOpGenericAdaptor::MBarrierTryWaitOpGenericAdaptor;
MBarrierTryWaitOpAdaptor(MBarrierTryWaitOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class MBarrierTryWaitOp : public ::mlir::Op<MBarrierTryWaitOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = MBarrierTryWaitOpAdaptor;
template <typename RangeT>
using GenericAdaptor = MBarrierTryWaitOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_stateOrPhase = 1;
static constexpr int odsIndex_ticks = 2;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("relaxed"), ::llvm::StringRef("scope")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRelaxedAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRelaxedAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getScopeAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getScopeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.mbarrier.try_wait");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getAddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::Type> getStateOrPhase() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getTicks() {
auto operands = getODSOperands(2);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getAddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getStateOrPhaseMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getTicksMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::MemScopeKindAttr getScopeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MemScopeKindAttr>(getProperties().scope);
}
::mlir::NVVM::MemScopeKind getScope();
::mlir::BoolAttr getRelaxedAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().relaxed);
}
bool getRelaxed();
void setScopeAttr(::mlir::NVVM::MemScopeKindAttr attr) {
getProperties().scope = attr;
}
void setScope(::mlir::NVVM::MemScopeKind attrValue);
void setRelaxedAttr(::mlir::BoolAttr attr) {
getProperties().relaxed = attr;
}
void setRelaxed(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value addr, ::mlir::Value stateOrPhase, /*optional*/::mlir::Value ticks, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierTryWaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value addr, ::mlir::Value stateOrPhase, /*optional*/::mlir::Value ticks, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierTryWaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value addr, ::mlir::Value stateOrPhase, /*optional*/::mlir::Value ticks, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, ::mlir::Value stateOrPhase, /*optional*/::mlir::Value ticks, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierTryWaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, ::mlir::Value stateOrPhase, /*optional*/::mlir::Value ticks, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierTryWaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, ::mlir::Value stateOrPhase, /*optional*/::mlir::Value ticks, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value stateOrPhase, /*optional*/::mlir::Value ticks, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierTryWaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value stateOrPhase, /*optional*/::mlir::Value ticks, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static MBarrierTryWaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value stateOrPhase, /*optional*/::mlir::Value ticks, ::mlir::NVVM::MemScopeKindAttr scope, ::mlir::BoolAttr relaxed = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value addr, ::mlir::Value stateOrPhase, /*optional*/::mlir::Value ticks, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierTryWaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value addr, ::mlir::Value stateOrPhase, /*optional*/::mlir::Value ticks, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierTryWaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value addr, ::mlir::Value stateOrPhase, /*optional*/::mlir::Value ticks, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, ::mlir::Value stateOrPhase, /*optional*/::mlir::Value ticks, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierTryWaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, ::mlir::Value stateOrPhase, /*optional*/::mlir::Value ticks, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierTryWaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, ::mlir::Value stateOrPhase, /*optional*/::mlir::Value ticks, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value stateOrPhase, /*optional*/::mlir::Value ticks, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierTryWaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value stateOrPhase, /*optional*/::mlir::Value ticks, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static MBarrierTryWaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value stateOrPhase, /*optional*/::mlir::Value ticks, ::mlir::NVVM::MemScopeKind scope = MemScopeKind::CTA, bool relaxed = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierTryWaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierTryWaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierTryWaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierTryWaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierTryWaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierTryWaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierTryWaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierTryWaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::MBarrierTryWaitOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::MBarrierTryWaitOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::MBarrierTryWaitParityOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class MBarrierTryWaitParityOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
MBarrierTryWaitParityOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.mbarrier.try_wait.parity", odsAttrs.getContext());
}
MBarrierTryWaitParityOpGenericAdaptorBase(MBarrierTryWaitParityOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class MBarrierTryWaitParityOpGenericAdaptor : public detail::MBarrierTryWaitParityOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::MBarrierTryWaitParityOpGenericAdaptorBase;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_phase = 1;
static constexpr int odsIndex_ticks = 2;
public:
MBarrierTryWaitParityOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
MBarrierTryWaitParityOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MBarrierTryWaitParityOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
MBarrierTryWaitParityOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MBarrierTryWaitParityOpGenericAdaptor(values, attrs, Properties{}, {}) {}
MBarrierTryWaitParityOpGenericAdaptor(RangeT values, const MBarrierTryWaitParityOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = MBarrierTryWaitParityOp, typename = std::enable_if_t<std::is_same_v<LateInst, MBarrierTryWaitParityOp>>>
MBarrierTryWaitParityOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getAddr() {
return (*getODSOperands(0).begin());
}
ValueT getPhase() {
return (*getODSOperands(1).begin());
}
ValueT getTicks() {
return (*getODSOperands(2).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class MBarrierTryWaitParityOpAdaptor : public MBarrierTryWaitParityOpGenericAdaptor<::mlir::ValueRange> {
public:
using MBarrierTryWaitParityOpGenericAdaptor::MBarrierTryWaitParityOpGenericAdaptor;
MBarrierTryWaitParityOpAdaptor(MBarrierTryWaitParityOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class MBarrierTryWaitParityOp : public ::mlir::Op<MBarrierTryWaitParityOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<3>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::NVVM::BasicPtxBuilderInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = MBarrierTryWaitParityOpAdaptor;
template <typename RangeT>
using GenericAdaptor = MBarrierTryWaitParityOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_phase = 1;
static constexpr int odsIndex_ticks = 2;
using Properties = FoldAdaptor::Properties;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<MBarrierTryWaitParityOp>::getPredicate;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<MBarrierTryWaitParityOp>::hasIntrinsic;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<MBarrierTryWaitParityOp>::hasSideEffect;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<MBarrierTryWaitParityOp>::makeConstantI32;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<MBarrierTryWaitParityOp>::getAsmValues;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.mbarrier.try_wait.parity");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getAddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getPhase() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getTicks() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin());
}
::mlir::OpOperand &getAddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getPhaseMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getTicksMutable() {
auto range = getODSOperandIndexAndLength(2);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, ::mlir::Value phase, ::mlir::Value ticks);
static MBarrierTryWaitParityOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, ::mlir::Value phase, ::mlir::Value ticks);
static MBarrierTryWaitParityOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, ::mlir::Value phase, ::mlir::Value ticks);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value phase, ::mlir::Value ticks);
static MBarrierTryWaitParityOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value phase, ::mlir::Value ticks);
static MBarrierTryWaitParityOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value phase, ::mlir::Value ticks);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierTryWaitParityOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MBarrierTryWaitParityOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierTryWaitParityOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MBarrierTryWaitParityOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
std::string getPtx();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::MBarrierTryWaitParityOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::MapaOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class MapaOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
MapaOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.mapa", odsAttrs.getContext());
}
MapaOpGenericAdaptorBase(MapaOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class MapaOpGenericAdaptor : public detail::MapaOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::MapaOpGenericAdaptorBase;
static constexpr int odsIndex_a = 0;
static constexpr int odsIndex_b = 1;
public:
MapaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
MapaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MapaOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
MapaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MapaOpGenericAdaptor(values, attrs, Properties{}, {}) {}
MapaOpGenericAdaptor(RangeT values, const MapaOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = MapaOp, typename = std::enable_if_t<std::is_same_v<LateInst, MapaOp>>>
MapaOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getA() {
return (*getODSOperands(0).begin());
}
ValueT getB() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class MapaOpAdaptor : public MapaOpGenericAdaptor<::mlir::ValueRange> {
public:
using MapaOpGenericAdaptor::MapaOpGenericAdaptor;
MapaOpAdaptor(MapaOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class MapaOp : public ::mlir::Op<MapaOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::OpTrait::NVVMRequiresSM<900>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = MapaOpAdaptor;
template <typename RangeT>
using GenericAdaptor = MapaOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_a = 0;
static constexpr int odsIndex_b = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.mapa");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getA() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getB() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getAMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getBMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b);
static MapaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b);
static MapaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b);
static MapaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b);
static MapaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MapaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MapaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MapaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MapaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::MapaOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::MatchSyncOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class MatchSyncOpGenericAdaptorBase {
public:
struct Properties {
using kindTy = ::mlir::NVVM::MatchSyncKindAttr;
kindTy kind;
auto getKind() const {
auto &propStorage = this->kind;
return ::llvm::cast<::mlir::NVVM::MatchSyncKindAttr>(propStorage);
}
void setKind(const ::mlir::NVVM::MatchSyncKindAttr &propValue) {
this->kind = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.kind == this->kind &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
MatchSyncOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.match.sync", odsAttrs.getContext());
}
MatchSyncOpGenericAdaptorBase(MatchSyncOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::MatchSyncKindAttr getKindAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MatchSyncKindAttr>(getProperties().kind);
return attr;
}
::mlir::NVVM::MatchSyncKind getKind();
};
} // namespace detail
template <typename RangeT>
class MatchSyncOpGenericAdaptor : public detail::MatchSyncOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::MatchSyncOpGenericAdaptorBase;
static constexpr int odsIndex_thread_mask = 0;
static constexpr int odsIndex_val = 1;
public:
MatchSyncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
MatchSyncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MatchSyncOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
MatchSyncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MatchSyncOpGenericAdaptor(values, attrs, Properties{}, {}) {}
MatchSyncOpGenericAdaptor(RangeT values, const MatchSyncOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = MatchSyncOp, typename = std::enable_if_t<std::is_same_v<LateInst, MatchSyncOp>>>
MatchSyncOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getThreadMask() {
return (*getODSOperands(0).begin());
}
ValueT getVal() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class MatchSyncOpAdaptor : public MatchSyncOpGenericAdaptor<::mlir::ValueRange> {
public:
using MatchSyncOpGenericAdaptor::MatchSyncOpGenericAdaptor;
MatchSyncOpAdaptor(MatchSyncOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class MatchSyncOp : public ::mlir::Op<MatchSyncOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor> {
public:
using Op::Op;
using Op::print;
using Adaptor = MatchSyncOpAdaptor;
template <typename RangeT>
using GenericAdaptor = MatchSyncOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_thread_mask = 0;
static constexpr int odsIndex_val = 1;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferTypeOpInterface::Trait<MatchSyncOp>::refineReturnTypes;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("kind")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getKindAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getKindAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.match.sync");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getThreadMask() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::Type> getVal() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getThreadMaskMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getValMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::MatchSyncKindAttr getKindAttr() {
return ::llvm::cast<::mlir::NVVM::MatchSyncKindAttr>(getProperties().kind);
}
::mlir::NVVM::MatchSyncKind getKind();
void setKindAttr(::mlir::NVVM::MatchSyncKindAttr attr) {
getProperties().kind = attr;
}
void setKind(::mlir::NVVM::MatchSyncKind attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::NVVM::MatchSyncKindAttr kind);
static MatchSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::NVVM::MatchSyncKindAttr kind);
static MatchSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::NVVM::MatchSyncKindAttr kind);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::NVVM::MatchSyncKindAttr kind);
static MatchSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::NVVM::MatchSyncKindAttr kind);
static MatchSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::NVVM::MatchSyncKindAttr kind);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::NVVM::MatchSyncKindAttr kind);
static MatchSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::NVVM::MatchSyncKindAttr kind);
static MatchSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::NVVM::MatchSyncKindAttr kind);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::NVVM::MatchSyncKind kind);
static MatchSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::NVVM::MatchSyncKind kind);
static MatchSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::NVVM::MatchSyncKind kind);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::NVVM::MatchSyncKind kind);
static MatchSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::NVVM::MatchSyncKind kind);
static MatchSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::NVVM::MatchSyncKind kind);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::NVVM::MatchSyncKind kind);
static MatchSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::NVVM::MatchSyncKind kind);
static MatchSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::NVVM::MatchSyncKind kind);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MatchSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MatchSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MatchSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MatchSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MatchSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MatchSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MatchSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MatchSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static ::llvm::LogicalResult
inferReturnTypes(::mlir::MLIRContext *context,
std::optional<::mlir::Location> location,
Adaptor adaptor,
::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::MatchSyncOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::MatchSyncOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::MembarOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class MembarOpGenericAdaptorBase {
public:
struct Properties {
using scopeTy = ::mlir::NVVM::MemScopeKindAttr;
scopeTy scope;
auto getScope() const {
auto &propStorage = this->scope;
return ::llvm::cast<::mlir::NVVM::MemScopeKindAttr>(propStorage);
}
void setScope(const ::mlir::NVVM::MemScopeKindAttr &propValue) {
this->scope = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.scope == this->scope &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
MembarOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.memory.barrier", odsAttrs.getContext());
}
MembarOpGenericAdaptorBase(MembarOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::MemScopeKindAttr getScopeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MemScopeKindAttr>(getProperties().scope);
return attr;
}
::mlir::NVVM::MemScopeKind getScope();
};
} // namespace detail
template <typename RangeT>
class MembarOpGenericAdaptor : public detail::MembarOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::MembarOpGenericAdaptorBase;
public:
MembarOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
MembarOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MembarOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
MembarOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MembarOpGenericAdaptor(values, attrs, Properties{}, {}) {}
MembarOpGenericAdaptor(RangeT values, const MembarOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = MembarOp, typename = std::enable_if_t<std::is_same_v<LateInst, MembarOp>>>
MembarOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class MembarOpAdaptor : public MembarOpGenericAdaptor<::mlir::ValueRange> {
public:
using MembarOpGenericAdaptor::MembarOpGenericAdaptor;
MembarOpAdaptor(MembarOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class MembarOp : public ::mlir::Op<MembarOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = MembarOpAdaptor;
template <typename RangeT>
using GenericAdaptor = MembarOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("scope")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getScopeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getScopeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.memory.barrier");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::MemScopeKindAttr getScopeAttr() {
return ::llvm::cast<::mlir::NVVM::MemScopeKindAttr>(getProperties().scope);
}
::mlir::NVVM::MemScopeKind getScope();
void setScopeAttr(::mlir::NVVM::MemScopeKindAttr attr) {
getProperties().scope = attr;
}
void setScope(::mlir::NVVM::MemScopeKind attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::MemScopeKindAttr scope);
static MembarOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::MemScopeKindAttr scope);
static MembarOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::MemScopeKindAttr scope);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemScopeKindAttr scope);
static MembarOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemScopeKindAttr scope);
static MembarOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemScopeKindAttr scope);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::MemScopeKind scope);
static MembarOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::MemScopeKind scope);
static MembarOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::MemScopeKind scope);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemScopeKind scope);
static MembarOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemScopeKind scope);
static MembarOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MemScopeKind scope);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MembarOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MembarOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MembarOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MembarOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::MembarOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::MembarOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::MmaBlockScaleOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class MmaBlockScaleOpGenericAdaptorBase {
public:
struct Properties {
using blockScaleFormatTy = ::mlir::NVVM::BlockScaleFormatAttr;
blockScaleFormatTy blockScaleFormat;
auto getBlockScaleFormat() const {
auto &propStorage = this->blockScaleFormat;
return ::llvm::cast<::mlir::NVVM::BlockScaleFormatAttr>(propStorage);
}
void setBlockScaleFormat(const ::mlir::NVVM::BlockScaleFormatAttr &propValue) {
this->blockScaleFormat = propValue;
}
using kindTy = ::mlir::NVVM::MMABlockScaleKindAttr;
kindTy kind;
auto getKind() const {
auto &propStorage = this->kind;
return ::llvm::cast<::mlir::NVVM::MMABlockScaleKindAttr>(propStorage);
}
void setKind(const ::mlir::NVVM::MMABlockScaleKindAttr &propValue) {
this->kind = propValue;
}
using multiplicandAPtxTypeTy = ::mlir::NVVM::MMATypesAttr;
multiplicandAPtxTypeTy multiplicandAPtxType;
auto getMultiplicandAPtxType() const {
auto &propStorage = this->multiplicandAPtxType;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMATypesAttr>(propStorage);
}
void setMultiplicandAPtxType(const ::mlir::NVVM::MMATypesAttr &propValue) {
this->multiplicandAPtxType = propValue;
}
using multiplicandBPtxTypeTy = ::mlir::NVVM::MMATypesAttr;
multiplicandBPtxTypeTy multiplicandBPtxType;
auto getMultiplicandBPtxType() const {
auto &propStorage = this->multiplicandBPtxType;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMATypesAttr>(propStorage);
}
void setMultiplicandBPtxType(const ::mlir::NVVM::MMATypesAttr &propValue) {
this->multiplicandBPtxType = propValue;
}
using scaleVecSizeTy = ::mlir::NVVM::ScaleVecSizeAttr;
scaleVecSizeTy scaleVecSize;
auto getScaleVecSize() const {
auto &propStorage = this->scaleVecSize;
return ::llvm::cast<::mlir::NVVM::ScaleVecSizeAttr>(propStorage);
}
void setScaleVecSize(const ::mlir::NVVM::ScaleVecSizeAttr &propValue) {
this->scaleVecSize = propValue;
}
using shapeTy = ::mlir::NVVM::MMAShapeAttr;
shapeTy shape;
auto getShape() const {
auto &propStorage = this->shape;
return ::llvm::cast<::mlir::NVVM::MMAShapeAttr>(propStorage);
}
void setShape(const ::mlir::NVVM::MMAShapeAttr &propValue) {
this->shape = propValue;
}
using operandSegmentSizesTy = std::array<int32_t, 9>;
operandSegmentSizesTy operandSegmentSizes;
::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
auto &propStorage = this->operandSegmentSizes;
return propStorage;
}
void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
auto &propStorage = this->operandSegmentSizes;
::llvm::copy(propValue, propStorage.begin());
}
bool operator==(const Properties &rhs) const {
return
rhs.blockScaleFormat == this->blockScaleFormat &&
rhs.kind == this->kind &&
rhs.multiplicandAPtxType == this->multiplicandAPtxType &&
rhs.multiplicandBPtxType == this->multiplicandBPtxType &&
rhs.scaleVecSize == this->scaleVecSize &&
rhs.shape == this->shape &&
rhs.operandSegmentSizes == this->operandSegmentSizes &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
MmaBlockScaleOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.mma.block_scale", odsAttrs.getContext());
}
MmaBlockScaleOpGenericAdaptorBase(MmaBlockScaleOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::MMAShapeAttr getShapeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MMAShapeAttr>(getProperties().shape);
return attr;
}
::mlir::NVVM::MMAShapeAttr getShape();
::mlir::NVVM::MMATypesAttr getMultiplicandAPtxTypeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::NVVM::MMATypesAttr>(getProperties().multiplicandAPtxType);
return attr;
}
::std::optional<::mlir::NVVM::MMATypes> getMultiplicandAPtxType();
::mlir::NVVM::MMATypesAttr getMultiplicandBPtxTypeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::NVVM::MMATypesAttr>(getProperties().multiplicandBPtxType);
return attr;
}
::std::optional<::mlir::NVVM::MMATypes> getMultiplicandBPtxType();
::mlir::NVVM::ScaleVecSizeAttr getScaleVecSizeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::ScaleVecSizeAttr>(getProperties().scaleVecSize);
return attr;
}
::mlir::NVVM::ScaleVecSize getScaleVecSize();
::mlir::NVVM::BlockScaleFormatAttr getBlockScaleFormatAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::BlockScaleFormatAttr>(getProperties().blockScaleFormat);
return attr;
}
::mlir::NVVM::BlockScaleFormat getBlockScaleFormat();
::mlir::NVVM::MMABlockScaleKindAttr getKindAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MMABlockScaleKindAttr>(getProperties().kind);
return attr;
}
::mlir::NVVM::MMABlockScaleKind getKind();
};
} // namespace detail
template <typename RangeT>
class MmaBlockScaleOpGenericAdaptor : public detail::MmaBlockScaleOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::MmaBlockScaleOpGenericAdaptorBase;
static constexpr int odsIndex_operandA = 0;
static constexpr int odsIndex_operandB = 1;
static constexpr int odsIndex_operandC = 2;
static constexpr int odsIndex_scaleAData = 3;
static constexpr int odsIndex_byteIdA = 4;
static constexpr int odsIndex_threadIdA = 5;
static constexpr int odsIndex_scaleBData = 6;
static constexpr int odsIndex_byteIdB = 7;
static constexpr int odsIndex_threadIdB = 8;
public:
MmaBlockScaleOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
MmaBlockScaleOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MmaBlockScaleOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
MmaBlockScaleOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : MmaBlockScaleOpGenericAdaptor(values, attrs, Properties{}, {}) {}
MmaBlockScaleOpGenericAdaptor(RangeT values, const MmaBlockScaleOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = MmaBlockScaleOp, typename = std::enable_if_t<std::is_same_v<LateInst, MmaBlockScaleOp>>>
MmaBlockScaleOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperandA() {
return getODSOperands(0);
}
RangeT getOperandB() {
return getODSOperands(1);
}
RangeT getOperandC() {
return getODSOperands(2);
}
ValueT getScaleAData() {
return (*getODSOperands(3).begin());
}
ValueT getByteIdA() {
return (*getODSOperands(4).begin());
}
ValueT getThreadIdA() {
return (*getODSOperands(5).begin());
}
ValueT getScaleBData() {
return (*getODSOperands(6).begin());
}
ValueT getByteIdB() {
return (*getODSOperands(7).begin());
}
ValueT getThreadIdB() {
return (*getODSOperands(8).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class MmaBlockScaleOpAdaptor : public MmaBlockScaleOpGenericAdaptor<::mlir::ValueRange> {
public:
using MmaBlockScaleOpGenericAdaptor::MmaBlockScaleOpGenericAdaptor;
MmaBlockScaleOpAdaptor(MmaBlockScaleOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class MmaBlockScaleOp : public ::mlir::Op<MmaBlockScaleOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<6>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = MmaBlockScaleOpAdaptor;
template <typename RangeT>
using GenericAdaptor = MmaBlockScaleOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_operandA = 0;
static constexpr int odsIndex_operandB = 1;
static constexpr int odsIndex_operandC = 2;
static constexpr int odsIndex_scaleAData = 3;
static constexpr int odsIndex_byteIdA = 4;
static constexpr int odsIndex_threadIdA = 5;
static constexpr int odsIndex_scaleBData = 6;
static constexpr int odsIndex_byteIdB = 7;
static constexpr int odsIndex_threadIdB = 8;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("blockScaleFormat"), ::llvm::StringRef("kind"), ::llvm::StringRef("multiplicandAPtxType"), ::llvm::StringRef("multiplicandBPtxType"), ::llvm::StringRef("scaleVecSize"), ::llvm::StringRef("shape"), ::llvm::StringRef("operandSegmentSizes")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getBlockScaleFormatAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getBlockScaleFormatAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getKindAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getKindAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getMultiplicandAPtxTypeAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getMultiplicandAPtxTypeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
::mlir::StringAttr getMultiplicandBPtxTypeAttrName() {
return getAttributeNameForIndex(3);
}
static ::mlir::StringAttr getMultiplicandBPtxTypeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 3);
}
::mlir::StringAttr getScaleVecSizeAttrName() {
return getAttributeNameForIndex(4);
}
static ::mlir::StringAttr getScaleVecSizeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 4);
}
::mlir::StringAttr getShapeAttrName() {
return getAttributeNameForIndex(5);
}
static ::mlir::StringAttr getShapeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 5);
}
::mlir::StringAttr getOperandSegmentSizesAttrName() {
return (*this)->getName().getAttributeNames().back();
}
static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
return name.getAttributeNames().back();
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.mma.block_scale");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::Operation::operand_range getOperandA() {
return getODSOperands(0);
}
::mlir::Operation::operand_range getOperandB() {
return getODSOperands(1);
}
::mlir::Operation::operand_range getOperandC() {
return getODSOperands(2);
}
::mlir::TypedValue<::mlir::IntegerType> getScaleAData() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getByteIdA() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(4).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getThreadIdA() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(5).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getScaleBData() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(6).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getByteIdB() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(7).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getThreadIdB() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(8).begin());
}
::mlir::MutableOperandRange getOperandAMutable();
::mlir::MutableOperandRange getOperandBMutable();
::mlir::MutableOperandRange getOperandCMutable();
::mlir::OpOperand &getScaleADataMutable() {
auto range = getODSOperandIndexAndLength(3);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getByteIdAMutable() {
auto range = getODSOperandIndexAndLength(4);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getThreadIdAMutable() {
auto range = getODSOperandIndexAndLength(5);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getScaleBDataMutable() {
auto range = getODSOperandIndexAndLength(6);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getByteIdBMutable() {
auto range = getODSOperandIndexAndLength(7);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getThreadIdBMutable() {
auto range = getODSOperandIndexAndLength(8);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::MMAShapeAttr getShapeAttr() {
return ::llvm::cast<::mlir::NVVM::MMAShapeAttr>(getProperties().shape);
}
::mlir::NVVM::MMAShapeAttr getShape();
::mlir::NVVM::MMATypesAttr getMultiplicandAPtxTypeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMATypesAttr>(getProperties().multiplicandAPtxType);
}
::std::optional<::mlir::NVVM::MMATypes> getMultiplicandAPtxType();
::mlir::NVVM::MMATypesAttr getMultiplicandBPtxTypeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMATypesAttr>(getProperties().multiplicandBPtxType);
}
::std::optional<::mlir::NVVM::MMATypes> getMultiplicandBPtxType();
::mlir::NVVM::ScaleVecSizeAttr getScaleVecSizeAttr() {
return ::llvm::cast<::mlir::NVVM::ScaleVecSizeAttr>(getProperties().scaleVecSize);
}
::mlir::NVVM::ScaleVecSize getScaleVecSize();
::mlir::NVVM::BlockScaleFormatAttr getBlockScaleFormatAttr() {
return ::llvm::cast<::mlir::NVVM::BlockScaleFormatAttr>(getProperties().blockScaleFormat);
}
::mlir::NVVM::BlockScaleFormat getBlockScaleFormat();
::mlir::NVVM::MMABlockScaleKindAttr getKindAttr() {
return ::llvm::cast<::mlir::NVVM::MMABlockScaleKindAttr>(getProperties().kind);
}
::mlir::NVVM::MMABlockScaleKind getKind();
void setShapeAttr(::mlir::NVVM::MMAShapeAttr attr) {
getProperties().shape = attr;
}
void setMultiplicandAPtxTypeAttr(::mlir::NVVM::MMATypesAttr attr) {
getProperties().multiplicandAPtxType = attr;
}
void setMultiplicandAPtxType(::std::optional<::mlir::NVVM::MMATypes> attrValue);
void setMultiplicandBPtxTypeAttr(::mlir::NVVM::MMATypesAttr attr) {
getProperties().multiplicandBPtxType = attr;
}
void setMultiplicandBPtxType(::std::optional<::mlir::NVVM::MMATypes> attrValue);
void setScaleVecSizeAttr(::mlir::NVVM::ScaleVecSizeAttr attr) {
getProperties().scaleVecSize = attr;
}
void setScaleVecSize(::mlir::NVVM::ScaleVecSize attrValue);
void setBlockScaleFormatAttr(::mlir::NVVM::BlockScaleFormatAttr attr) {
getProperties().blockScaleFormat = attr;
}
void setBlockScaleFormat(::mlir::NVVM::BlockScaleFormat attrValue);
void setKindAttr(::mlir::NVVM::MMABlockScaleKindAttr attr) {
getProperties().kind = attr;
}
void setKind(::mlir::NVVM::MMABlockScaleKind attrValue);
::mlir::Attribute removeMultiplicandAPtxTypeAttr() {
auto attr = getProperties().multiplicandAPtxType;
getProperties().multiplicandAPtxType = {};
return attr;
}
::mlir::Attribute removeMultiplicandBPtxTypeAttr() {
auto attr = getProperties().multiplicandBPtxType;
getProperties().multiplicandBPtxType = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType, ValueRange operandA, ValueRange operandB, ValueRange operandC, Value scaleAData, Value byteIdA, Value threadIdA, Value scaleBData, Value byteIdB, Value threadIdB, ArrayRef<int64_t> shape, std::optional<std::array<MMATypes, 2>> multiplicandPtxTypes, ScaleVecSize scaleVecSize, BlockScaleFormat blockScaleFormat, MMABlockScaleKind kind);
static MmaBlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType, ValueRange operandA, ValueRange operandB, ValueRange operandC, Value scaleAData, Value byteIdA, Value threadIdA, Value scaleBData, Value byteIdB, Value threadIdB, ArrayRef<int64_t> shape, std::optional<std::array<MMATypes, 2>> multiplicandPtxTypes, ScaleVecSize scaleVecSize, BlockScaleFormat blockScaleFormat, MMABlockScaleKind kind);
static MmaBlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType, ValueRange operandA, ValueRange operandB, ValueRange operandC, Value scaleAData, Value byteIdA, Value threadIdA, Value scaleBData, Value byteIdB, Value threadIdB, ArrayRef<int64_t> shape, std::optional<std::array<MMATypes, 2>> multiplicandPtxTypes, ScaleVecSize scaleVecSize, BlockScaleFormat blockScaleFormat, MMABlockScaleKind kind);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::NVVM::ScaleVecSizeAttr scaleVecSize, ::mlir::NVVM::BlockScaleFormatAttr blockScaleFormat, ::mlir::NVVM::MMABlockScaleKindAttr kind, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value scaleAData, ::mlir::Value byteIdA, ::mlir::Value threadIdA, ::mlir::Value scaleBData, ::mlir::Value byteIdB, ::mlir::Value threadIdB);
static MmaBlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::NVVM::ScaleVecSizeAttr scaleVecSize, ::mlir::NVVM::BlockScaleFormatAttr blockScaleFormat, ::mlir::NVVM::MMABlockScaleKindAttr kind, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value scaleAData, ::mlir::Value byteIdA, ::mlir::Value threadIdA, ::mlir::Value scaleBData, ::mlir::Value byteIdB, ::mlir::Value threadIdB);
static MmaBlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::NVVM::ScaleVecSizeAttr scaleVecSize, ::mlir::NVVM::BlockScaleFormatAttr blockScaleFormat, ::mlir::NVVM::MMABlockScaleKindAttr kind, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value scaleAData, ::mlir::Value byteIdA, ::mlir::Value threadIdA, ::mlir::Value scaleBData, ::mlir::Value byteIdB, ::mlir::Value threadIdB);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::NVVM::ScaleVecSizeAttr scaleVecSize, ::mlir::NVVM::BlockScaleFormatAttr blockScaleFormat, ::mlir::NVVM::MMABlockScaleKindAttr kind, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value scaleAData, ::mlir::Value byteIdA, ::mlir::Value threadIdA, ::mlir::Value scaleBData, ::mlir::Value byteIdB, ::mlir::Value threadIdB);
static MmaBlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::NVVM::ScaleVecSizeAttr scaleVecSize, ::mlir::NVVM::BlockScaleFormatAttr blockScaleFormat, ::mlir::NVVM::MMABlockScaleKindAttr kind, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value scaleAData, ::mlir::Value byteIdA, ::mlir::Value threadIdA, ::mlir::Value scaleBData, ::mlir::Value byteIdB, ::mlir::Value threadIdB);
static MmaBlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::NVVM::ScaleVecSizeAttr scaleVecSize, ::mlir::NVVM::BlockScaleFormatAttr blockScaleFormat, ::mlir::NVVM::MMABlockScaleKindAttr kind, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value scaleAData, ::mlir::Value byteIdA, ::mlir::Value threadIdA, ::mlir::Value scaleBData, ::mlir::Value byteIdB, ::mlir::Value threadIdB);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::NVVM::ScaleVecSize scaleVecSize, ::mlir::NVVM::BlockScaleFormat blockScaleFormat, ::mlir::NVVM::MMABlockScaleKind kind, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value scaleAData, ::mlir::Value byteIdA, ::mlir::Value threadIdA, ::mlir::Value scaleBData, ::mlir::Value byteIdB, ::mlir::Value threadIdB);
static MmaBlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::NVVM::ScaleVecSize scaleVecSize, ::mlir::NVVM::BlockScaleFormat blockScaleFormat, ::mlir::NVVM::MMABlockScaleKind kind, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value scaleAData, ::mlir::Value byteIdA, ::mlir::Value threadIdA, ::mlir::Value scaleBData, ::mlir::Value byteIdB, ::mlir::Value threadIdB);
static MmaBlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::NVVM::ScaleVecSize scaleVecSize, ::mlir::NVVM::BlockScaleFormat blockScaleFormat, ::mlir::NVVM::MMABlockScaleKind kind, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value scaleAData, ::mlir::Value byteIdA, ::mlir::Value threadIdA, ::mlir::Value scaleBData, ::mlir::Value byteIdB, ::mlir::Value threadIdB);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::NVVM::ScaleVecSize scaleVecSize, ::mlir::NVVM::BlockScaleFormat blockScaleFormat, ::mlir::NVVM::MMABlockScaleKind kind, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value scaleAData, ::mlir::Value byteIdA, ::mlir::Value threadIdA, ::mlir::Value scaleBData, ::mlir::Value byteIdB, ::mlir::Value threadIdB);
static MmaBlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::NVVM::ScaleVecSize scaleVecSize, ::mlir::NVVM::BlockScaleFormat blockScaleFormat, ::mlir::NVVM::MMABlockScaleKind kind, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value scaleAData, ::mlir::Value byteIdA, ::mlir::Value threadIdA, ::mlir::Value scaleBData, ::mlir::Value byteIdB, ::mlir::Value threadIdB);
static MmaBlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::NVVM::ScaleVecSize scaleVecSize, ::mlir::NVVM::BlockScaleFormat blockScaleFormat, ::mlir::NVVM::MMABlockScaleKind kind, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value scaleAData, ::mlir::Value byteIdA, ::mlir::Value threadIdA, ::mlir::Value scaleBData, ::mlir::Value byteIdB, ::mlir::Value threadIdB);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MmaBlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MmaBlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MmaBlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MmaBlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &p);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 6 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static llvm::Intrinsic::ID getIntrinsicID(
int64_t m, int64_t n, uint64_t k,
mlir::NVVM::MMATypes eltypeAEnum, mlir::NVVM::MMATypes eltypeBEnum,
mlir::NVVM::MMATypes eltypeCEnum,
mlir::NVVM::ScaleVecSize scaleVecSize,
mlir::NVVM::BlockScaleFormat blockScaleFormat,
mlir::NVVM::MMABlockScaleKind kind) {
llvm::StringRef eltypeA = stringifyEnum(eltypeAEnum);
llvm::StringRef eltypeB = stringifyEnum(eltypeBEnum);
llvm::StringRef eltypeC = stringifyEnum(eltypeCEnum);
auto getScaleVecSizeStr = [](ScaleVecSize svs) -> std::string {
switch (svs) {
case ScaleVecSize::X1: return ".scale_1x";
case ScaleVecSize::X2: return ".scale_2x";
case ScaleVecSize::X4: return ".scale_4x";
}
return "";
};
if (m == 16 && n == 8 && k == 64 && "e2m1" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k64_row_col_mxf4_f32_e2m1_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e2m1" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_2x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k64_row_col_mxf4_scale_2x_f32_e2m1_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e2m1" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf4nvf4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_2x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k64_row_col_mxf4nvf4_scale_2x_f32_e2m1_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e2m1" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf4nvf4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_4x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k64_row_col_mxf4nvf4_scale_4x_f32_e2m1_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e2m1" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf4nvf4" == stringifyEnum(kind) && "ue4m3" == stringifyEnum(blockScaleFormat) && ".scale_4x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k64_row_col_mxf4nvf4_scale_4x_f32_e2m1_e2m1_f32_ue4m3;
if (m == 16 && n == 8 && k == 32 && "e2m1" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_f32_e2m1_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e2m1" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_scale_1x_f32_e2m1_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e2m1" == eltypeA && "e2m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_f32_e2m1_e2m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e2m1" == eltypeA && "e2m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_scale_1x_f32_e2m1_e2m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e2m1" == eltypeA && "e3m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_f32_e2m1_e3m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e2m1" == eltypeA && "e3m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_scale_1x_f32_e2m1_e3m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e2m1" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_f32_e2m1_e5m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e2m1" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_scale_1x_f32_e2m1_e5m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e2m1" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_f32_e2m1_e4m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e2m1" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_scale_1x_f32_e2m1_e4m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e2m3" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_f32_e2m3_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e2m3" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_scale_1x_f32_e2m3_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e2m3" == eltypeA && "e2m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_f32_e2m3_e2m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e2m3" == eltypeA && "e2m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_scale_1x_f32_e2m3_e2m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e2m3" == eltypeA && "e3m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_f32_e2m3_e3m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e2m3" == eltypeA && "e3m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_scale_1x_f32_e2m3_e3m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e2m3" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_f32_e2m3_e5m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e2m3" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_scale_1x_f32_e2m3_e5m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e2m3" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_f32_e2m3_e4m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e2m3" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_scale_1x_f32_e2m3_e4m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e3m2" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_f32_e3m2_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e3m2" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_scale_1x_f32_e3m2_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e3m2" == eltypeA && "e2m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_f32_e3m2_e2m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e3m2" == eltypeA && "e2m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_scale_1x_f32_e3m2_e2m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e3m2" == eltypeA && "e3m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_f32_e3m2_e3m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e3m2" == eltypeA && "e3m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_scale_1x_f32_e3m2_e3m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e3m2" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_f32_e3m2_e5m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e3m2" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_scale_1x_f32_e3m2_e5m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e3m2" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_f32_e3m2_e4m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e3m2" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_scale_1x_f32_e3m2_e4m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e5m2" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_f32_e5m2_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e5m2" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_scale_1x_f32_e5m2_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e5m2" == eltypeA && "e2m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_f32_e5m2_e2m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e5m2" == eltypeA && "e2m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_scale_1x_f32_e5m2_e2m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e5m2" == eltypeA && "e3m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_f32_e5m2_e3m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e5m2" == eltypeA && "e3m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_scale_1x_f32_e5m2_e3m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e5m2" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_f32_e5m2_e5m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e5m2" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_scale_1x_f32_e5m2_e5m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e5m2" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_f32_e5m2_e4m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e5m2" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_scale_1x_f32_e5m2_e4m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e4m3" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_f32_e4m3_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e4m3" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_scale_1x_f32_e4m3_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e4m3" == eltypeA && "e2m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_f32_e4m3_e2m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e4m3" == eltypeA && "e2m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_scale_1x_f32_e4m3_e2m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e4m3" == eltypeA && "e3m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_f32_e4m3_e3m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e4m3" == eltypeA && "e3m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_scale_1x_f32_e4m3_e3m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e4m3" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_f32_e4m3_e5m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e4m3" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_scale_1x_f32_e4m3_e5m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e4m3" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_f32_e4m3_e4m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 32 && "e4m3" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_block_scale_m16n8k32_row_col_mxf8f6f4_scale_1x_f32_e4m3_e4m3_f32_ue8m0;
return 0;
}
static mlir::NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase& builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::MmaBlockScaleOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::MmaBlockScaleOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::MmaOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class MmaOpGenericAdaptorBase {
public:
struct Properties {
using b1OpTy = ::mlir::NVVM::MMAB1OpAttr;
b1OpTy b1Op;
auto getB1Op() const {
auto &propStorage = this->b1Op;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMAB1OpAttr>(propStorage);
}
void setB1Op(const ::mlir::NVVM::MMAB1OpAttr &propValue) {
this->b1Op = propValue;
}
using intOverflowBehaviorTy = ::mlir::NVVM::MMAIntOverflowAttr;
intOverflowBehaviorTy intOverflowBehavior;
auto getIntOverflowBehavior() const {
auto &propStorage = this->intOverflowBehavior;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMAIntOverflowAttr>(propStorage);
}
void setIntOverflowBehavior(const ::mlir::NVVM::MMAIntOverflowAttr &propValue) {
this->intOverflowBehavior = propValue;
}
using layoutATy = ::mlir::NVVM::MMALayoutAttr;
layoutATy layoutA;
auto getLayoutA() const {
auto &propStorage = this->layoutA;
return ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(propStorage);
}
void setLayoutA(const ::mlir::NVVM::MMALayoutAttr &propValue) {
this->layoutA = propValue;
}
using layoutBTy = ::mlir::NVVM::MMALayoutAttr;
layoutBTy layoutB;
auto getLayoutB() const {
auto &propStorage = this->layoutB;
return ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(propStorage);
}
void setLayoutB(const ::mlir::NVVM::MMALayoutAttr &propValue) {
this->layoutB = propValue;
}
using multiplicandAPtxTypeTy = ::mlir::NVVM::MMATypesAttr;
multiplicandAPtxTypeTy multiplicandAPtxType;
auto getMultiplicandAPtxType() const {
auto &propStorage = this->multiplicandAPtxType;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMATypesAttr>(propStorage);
}
void setMultiplicandAPtxType(const ::mlir::NVVM::MMATypesAttr &propValue) {
this->multiplicandAPtxType = propValue;
}
using multiplicandBPtxTypeTy = ::mlir::NVVM::MMATypesAttr;
multiplicandBPtxTypeTy multiplicandBPtxType;
auto getMultiplicandBPtxType() const {
auto &propStorage = this->multiplicandBPtxType;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMATypesAttr>(propStorage);
}
void setMultiplicandBPtxType(const ::mlir::NVVM::MMATypesAttr &propValue) {
this->multiplicandBPtxType = propValue;
}
using shapeTy = ::mlir::NVVM::MMAShapeAttr;
shapeTy shape;
auto getShape() const {
auto &propStorage = this->shape;
return ::llvm::cast<::mlir::NVVM::MMAShapeAttr>(propStorage);
}
void setShape(const ::mlir::NVVM::MMAShapeAttr &propValue) {
this->shape = propValue;
}
using operandSegmentSizesTy = std::array<int32_t, 3>;
operandSegmentSizesTy operandSegmentSizes;
::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
auto &propStorage = this->operandSegmentSizes;
return propStorage;
}
void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
auto &propStorage = this->operandSegmentSizes;
::llvm::copy(propValue, propStorage.begin());
}
bool operator==(const Properties &rhs) const {
return
rhs.b1Op == this->b1Op &&
rhs.intOverflowBehavior == this->intOverflowBehavior &&
rhs.layoutA == this->layoutA &&
rhs.layoutB == this->layoutB &&
rhs.multiplicandAPtxType == this->multiplicandAPtxType &&
rhs.multiplicandBPtxType == this->multiplicandBPtxType &&
rhs.shape == this->shape &&
rhs.operandSegmentSizes == this->operandSegmentSizes &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
MmaOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.mma.sync", odsAttrs.getContext());
}
MmaOpGenericAdaptorBase(MmaOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::MMAShapeAttr getShapeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MMAShapeAttr>(getProperties().shape);
return attr;
}
::mlir::NVVM::MMAShapeAttr getShape();
::mlir::NVVM::MMAB1OpAttr getB1OpAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::NVVM::MMAB1OpAttr>(getProperties().b1Op);
return attr;
}
::std::optional<::mlir::NVVM::MMAB1Op> getB1Op();
::mlir::NVVM::MMAIntOverflowAttr getIntOverflowBehaviorAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::NVVM::MMAIntOverflowAttr>(getProperties().intOverflowBehavior);
return attr;
}
::std::optional<::mlir::NVVM::MMAIntOverflow> getIntOverflowBehavior();
::mlir::NVVM::MMALayoutAttr getLayoutAAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(getProperties().layoutA);
return attr;
}
::mlir::NVVM::MMALayout getLayoutA();
::mlir::NVVM::MMALayoutAttr getLayoutBAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(getProperties().layoutB);
return attr;
}
::mlir::NVVM::MMALayout getLayoutB();
::mlir::NVVM::MMATypesAttr getMultiplicandAPtxTypeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::NVVM::MMATypesAttr>(getProperties().multiplicandAPtxType);
return attr;
}
::std::optional<::mlir::NVVM::MMATypes> getMultiplicandAPtxType();
::mlir::NVVM::MMATypesAttr getMultiplicandBPtxTypeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::NVVM::MMATypesAttr>(getProperties().multiplicandBPtxType);
return attr;
}
::std::optional<::mlir::NVVM::MMATypes> getMultiplicandBPtxType();
};
} // namespace detail
template <typename RangeT>
class MmaOpGenericAdaptor : public detail::MmaOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::MmaOpGenericAdaptorBase;
static constexpr int odsIndex_operandA = 0;
static constexpr int odsIndex_operandB = 1;
static constexpr int odsIndex_operandC = 2;
public:
MmaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
MmaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MmaOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
MmaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : MmaOpGenericAdaptor(values, attrs, Properties{}, {}) {}
MmaOpGenericAdaptor(RangeT values, const MmaOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = MmaOp, typename = std::enable_if_t<std::is_same_v<LateInst, MmaOp>>>
MmaOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperandA() {
return getODSOperands(0);
}
RangeT getOperandB() {
return getODSOperands(1);
}
RangeT getOperandC() {
return getODSOperands(2);
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class MmaOpAdaptor : public MmaOpGenericAdaptor<::mlir::ValueRange> {
public:
using MmaOpGenericAdaptor::MmaOpGenericAdaptor;
MmaOpAdaptor(MmaOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class MmaOp : public ::mlir::Op<MmaOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::VariadicOperands, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = MmaOpAdaptor;
template <typename RangeT>
using GenericAdaptor = MmaOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_operandA = 0;
static constexpr int odsIndex_operandB = 1;
static constexpr int odsIndex_operandC = 2;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("b1Op"), ::llvm::StringRef("intOverflowBehavior"), ::llvm::StringRef("layoutA"), ::llvm::StringRef("layoutB"), ::llvm::StringRef("multiplicandAPtxType"), ::llvm::StringRef("multiplicandBPtxType"), ::llvm::StringRef("shape"), ::llvm::StringRef("operandSegmentSizes")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getB1OpAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getB1OpAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getIntOverflowBehaviorAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getIntOverflowBehaviorAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getLayoutAAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getLayoutAAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
::mlir::StringAttr getLayoutBAttrName() {
return getAttributeNameForIndex(3);
}
static ::mlir::StringAttr getLayoutBAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 3);
}
::mlir::StringAttr getMultiplicandAPtxTypeAttrName() {
return getAttributeNameForIndex(4);
}
static ::mlir::StringAttr getMultiplicandAPtxTypeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 4);
}
::mlir::StringAttr getMultiplicandBPtxTypeAttrName() {
return getAttributeNameForIndex(5);
}
static ::mlir::StringAttr getMultiplicandBPtxTypeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 5);
}
::mlir::StringAttr getShapeAttrName() {
return getAttributeNameForIndex(6);
}
static ::mlir::StringAttr getShapeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 6);
}
::mlir::StringAttr getOperandSegmentSizesAttrName() {
return (*this)->getName().getAttributeNames().back();
}
static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
return name.getAttributeNames().back();
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.mma.sync");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::Operation::operand_range getOperandA() {
return getODSOperands(0);
}
::mlir::Operation::operand_range getOperandB() {
return getODSOperands(1);
}
::mlir::Operation::operand_range getOperandC() {
return getODSOperands(2);
}
::mlir::MutableOperandRange getOperandAMutable();
::mlir::MutableOperandRange getOperandBMutable();
::mlir::MutableOperandRange getOperandCMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::MMAShapeAttr getShapeAttr() {
return ::llvm::cast<::mlir::NVVM::MMAShapeAttr>(getProperties().shape);
}
::mlir::NVVM::MMAShapeAttr getShape();
::mlir::NVVM::MMAB1OpAttr getB1OpAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMAB1OpAttr>(getProperties().b1Op);
}
::std::optional<::mlir::NVVM::MMAB1Op> getB1Op();
::mlir::NVVM::MMAIntOverflowAttr getIntOverflowBehaviorAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMAIntOverflowAttr>(getProperties().intOverflowBehavior);
}
::std::optional<::mlir::NVVM::MMAIntOverflow> getIntOverflowBehavior();
::mlir::NVVM::MMALayoutAttr getLayoutAAttr() {
return ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(getProperties().layoutA);
}
::mlir::NVVM::MMALayout getLayoutA();
::mlir::NVVM::MMALayoutAttr getLayoutBAttr() {
return ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(getProperties().layoutB);
}
::mlir::NVVM::MMALayout getLayoutB();
::mlir::NVVM::MMATypesAttr getMultiplicandAPtxTypeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMATypesAttr>(getProperties().multiplicandAPtxType);
}
::std::optional<::mlir::NVVM::MMATypes> getMultiplicandAPtxType();
::mlir::NVVM::MMATypesAttr getMultiplicandBPtxTypeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMATypesAttr>(getProperties().multiplicandBPtxType);
}
::std::optional<::mlir::NVVM::MMATypes> getMultiplicandBPtxType();
void setShapeAttr(::mlir::NVVM::MMAShapeAttr attr) {
getProperties().shape = attr;
}
void setB1OpAttr(::mlir::NVVM::MMAB1OpAttr attr) {
getProperties().b1Op = attr;
}
void setB1Op(::std::optional<::mlir::NVVM::MMAB1Op> attrValue);
void setIntOverflowBehaviorAttr(::mlir::NVVM::MMAIntOverflowAttr attr) {
getProperties().intOverflowBehavior = attr;
}
void setIntOverflowBehavior(::std::optional<::mlir::NVVM::MMAIntOverflow> attrValue);
void setLayoutAAttr(::mlir::NVVM::MMALayoutAttr attr) {
getProperties().layoutA = attr;
}
void setLayoutA(::mlir::NVVM::MMALayout attrValue);
void setLayoutBAttr(::mlir::NVVM::MMALayoutAttr attr) {
getProperties().layoutB = attr;
}
void setLayoutB(::mlir::NVVM::MMALayout attrValue);
void setMultiplicandAPtxTypeAttr(::mlir::NVVM::MMATypesAttr attr) {
getProperties().multiplicandAPtxType = attr;
}
void setMultiplicandAPtxType(::std::optional<::mlir::NVVM::MMATypes> attrValue);
void setMultiplicandBPtxTypeAttr(::mlir::NVVM::MMATypesAttr attr) {
getProperties().multiplicandBPtxType = attr;
}
void setMultiplicandBPtxType(::std::optional<::mlir::NVVM::MMATypes> attrValue);
::mlir::Attribute removeB1OpAttr() {
auto attr = getProperties().b1Op;
getProperties().b1Op = {};
return attr;
}
::mlir::Attribute removeIntOverflowBehaviorAttr() {
auto attr = getProperties().intOverflowBehavior;
getProperties().intOverflowBehavior = {};
return attr;
}
::mlir::Attribute removeMultiplicandAPtxTypeAttr() {
auto attr = getProperties().multiplicandAPtxType;
getProperties().multiplicandAPtxType = {};
return attr;
}
::mlir::Attribute removeMultiplicandBPtxTypeAttr() {
auto attr = getProperties().multiplicandBPtxType;
getProperties().multiplicandBPtxType = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType, ValueRange operandA, ValueRange operandB, ValueRange operandC, ArrayRef<int64_t> shape, std::optional<MMAB1Op> b1Op, std::optional<MMAIntOverflow> intOverflow, std::optional<std::array<MMATypes, 2>> multiplicandPtxTypes, std::optional<std::array<MMALayout, 2>> multiplicandLayouts);
static MmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType, ValueRange operandA, ValueRange operandB, ValueRange operandC, ArrayRef<int64_t> shape, std::optional<MMAB1Op> b1Op, std::optional<MMAIntOverflow> intOverflow, std::optional<std::array<MMATypes, 2>> multiplicandPtxTypes, std::optional<std::array<MMALayout, 2>> multiplicandLayouts);
static MmaOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType, ValueRange operandA, ValueRange operandB, ValueRange operandC, ArrayRef<int64_t> shape, std::optional<MMAB1Op> b1Op, std::optional<MMAIntOverflow> intOverflow, std::optional<std::array<MMATypes, 2>> multiplicandPtxTypes, std::optional<std::array<MMALayout, 2>> multiplicandLayouts);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMAB1OpAttr b1Op, /*optional*/::mlir::NVVM::MMAIntOverflowAttr intOverflowBehavior, ::mlir::NVVM::MMALayoutAttr layoutA, ::mlir::NVVM::MMALayoutAttr layoutB, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC);
static MmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMAB1OpAttr b1Op, /*optional*/::mlir::NVVM::MMAIntOverflowAttr intOverflowBehavior, ::mlir::NVVM::MMALayoutAttr layoutA, ::mlir::NVVM::MMALayoutAttr layoutB, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC);
static MmaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMAB1OpAttr b1Op, /*optional*/::mlir::NVVM::MMAIntOverflowAttr intOverflowBehavior, ::mlir::NVVM::MMALayoutAttr layoutA, ::mlir::NVVM::MMALayoutAttr layoutB, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMAB1OpAttr b1Op, /*optional*/::mlir::NVVM::MMAIntOverflowAttr intOverflowBehavior, ::mlir::NVVM::MMALayoutAttr layoutA, ::mlir::NVVM::MMALayoutAttr layoutB, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC);
static MmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMAB1OpAttr b1Op, /*optional*/::mlir::NVVM::MMAIntOverflowAttr intOverflowBehavior, ::mlir::NVVM::MMALayoutAttr layoutA, ::mlir::NVVM::MMALayoutAttr layoutB, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC);
static MmaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMAB1OpAttr b1Op, /*optional*/::mlir::NVVM::MMAIntOverflowAttr intOverflowBehavior, ::mlir::NVVM::MMALayoutAttr layoutA, ::mlir::NVVM::MMALayoutAttr layoutB, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMAB1OpAttr b1Op, /*optional*/::mlir::NVVM::MMAIntOverflowAttr intOverflowBehavior, ::mlir::NVVM::MMALayout layoutA, ::mlir::NVVM::MMALayout layoutB, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC);
static MmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMAB1OpAttr b1Op, /*optional*/::mlir::NVVM::MMAIntOverflowAttr intOverflowBehavior, ::mlir::NVVM::MMALayout layoutA, ::mlir::NVVM::MMALayout layoutB, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC);
static MmaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMAB1OpAttr b1Op, /*optional*/::mlir::NVVM::MMAIntOverflowAttr intOverflowBehavior, ::mlir::NVVM::MMALayout layoutA, ::mlir::NVVM::MMALayout layoutB, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMAB1OpAttr b1Op, /*optional*/::mlir::NVVM::MMAIntOverflowAttr intOverflowBehavior, ::mlir::NVVM::MMALayout layoutA, ::mlir::NVVM::MMALayout layoutB, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC);
static MmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMAB1OpAttr b1Op, /*optional*/::mlir::NVVM::MMAIntOverflowAttr intOverflowBehavior, ::mlir::NVVM::MMALayout layoutA, ::mlir::NVVM::MMALayout layoutB, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC);
static MmaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMAB1OpAttr b1Op, /*optional*/::mlir::NVVM::MMAIntOverflowAttr intOverflowBehavior, ::mlir::NVVM::MMALayout layoutA, ::mlir::NVVM::MMALayout layoutB, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MmaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MmaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &p);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 7 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static llvm::Intrinsic::ID getIntrinsicID(
int64_t m, int64_t n, uint64_t k,
std::optional<MMAB1Op> b1Op,
std::optional<MMAIntOverflow> sat,
mlir::NVVM::MMALayout layoutAEnum, mlir::NVVM::MMALayout layoutBEnum,
mlir::NVVM::MMATypes eltypeAEnum, mlir::NVVM::MMATypes eltypeBEnum,
mlir::NVVM::MMATypes eltypeCEnum, mlir::NVVM::MMATypes eltypeDEnum) {
llvm::StringRef layoutA = stringifyEnum(layoutAEnum);
llvm::StringRef layoutB = stringifyEnum(layoutBEnum);
llvm::StringRef eltypeA = stringifyEnum(eltypeAEnum);
llvm::StringRef eltypeB = stringifyEnum(eltypeBEnum);
llvm::StringRef eltypeC = stringifyEnum(eltypeCEnum);
llvm::StringRef eltypeD = stringifyEnum(eltypeDEnum);
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 4 && "tf32" == eltypeA && "tf32" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k4_row_col_tf32;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 8 && "tf32" == eltypeA && "tf32" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k8_row_col_tf32;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 16 && "bf16" == eltypeA && "bf16" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k16_row_col_bf16;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 8 && "bf16" == eltypeA && "bf16" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k8_row_col_bf16;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 8 && k == 4 && "f64" == eltypeA && "f64" == eltypeB && "f64" == eltypeC && "f64" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k4_row_col_f64;
if (layoutA == "row" && layoutB == "row" && m == 8 && n == 8 && k == 4 && "f16" == eltypeA && "f16" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k4_row_row_f16_f16;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 8 && k == 4 && "f16" == eltypeA && "f16" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k4_row_col_f16_f16;
if (layoutA == "col" && layoutB == "row" && m == 8 && n == 8 && k == 4 && "f16" == eltypeA && "f16" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k4_col_row_f16_f16;
if (layoutA == "col" && layoutB == "col" && m == 8 && n == 8 && k == 4 && "f16" == eltypeA && "f16" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k4_col_col_f16_f16;
if (layoutA == "row" && layoutB == "row" && m == 8 && n == 8 && k == 4 && "f16" == eltypeA && "f16" == eltypeB && "f16" == eltypeC && "f32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k4_row_row_f32_f16;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 8 && k == 4 && "f16" == eltypeA && "f16" == eltypeB && "f16" == eltypeC && "f32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k4_row_col_f32_f16;
if (layoutA == "col" && layoutB == "row" && m == 8 && n == 8 && k == 4 && "f16" == eltypeA && "f16" == eltypeB && "f16" == eltypeC && "f32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k4_col_row_f32_f16;
if (layoutA == "col" && layoutB == "col" && m == 8 && n == 8 && k == 4 && "f16" == eltypeA && "f16" == eltypeB && "f16" == eltypeC && "f32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k4_col_col_f32_f16;
if (layoutA == "row" && layoutB == "row" && m == 8 && n == 8 && k == 4 && "f16" == eltypeA && "f16" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k4_row_row_f32_f32;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 8 && k == 4 && "f16" == eltypeA && "f16" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k4_row_col_f32_f32;
if (layoutA == "col" && layoutB == "row" && m == 8 && n == 8 && k == 4 && "f16" == eltypeA && "f16" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k4_col_row_f32_f32;
if (layoutA == "col" && layoutB == "col" && m == 8 && n == 8 && k == 4 && "f16" == eltypeA && "f16" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k4_col_col_f32_f32;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 8 && "f16" == eltypeA && "f16" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k8_row_col_f16_f16;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 8 && "f16" == eltypeA && "f16" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k8_row_col_f32_f32;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 16 && "f16" == eltypeA && "f16" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k16_row_col_f16_f16;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 16 && "f16" == eltypeA && "f16" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k16_row_col_f32_f32;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 8 && k == 16 && "s8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k16_row_col_s8;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 8 && k == 16 && "s8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 1 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k16_row_col_satfinite_s8;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 8 && k == 16 && "s8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k16_row_col_s8_u8;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 8 && k == 16 && "s8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 1 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k16_row_col_satfinite_s8_u8;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 8 && k == 16 && "u8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k16_row_col_u8_s8;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 8 && k == 16 && "u8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 1 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k16_row_col_satfinite_u8_s8;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 8 && k == 16 && "u8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k16_row_col_u8;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 8 && k == 16 && "u8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 1 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k16_row_col_satfinite_u8;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 16 && "s8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k16_row_col_s8;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 16 && "s8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 1 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k16_row_col_satfinite_s8;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 16 && "s8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k16_row_col_s8_u8;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 16 && "s8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 1 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k16_row_col_satfinite_s8_u8;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 16 && "u8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k16_row_col_u8_s8;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 16 && "u8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 1 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k16_row_col_satfinite_u8_s8;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 16 && "u8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k16_row_col_u8;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 16 && "u8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 1 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k16_row_col_satfinite_u8;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 32 && "s8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k32_row_col_s8;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 32 && "s8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 1 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k32_row_col_satfinite_s8;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 32 && "s8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k32_row_col_s8_u8;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 32 && "s8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 1 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k32_row_col_satfinite_s8_u8;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 32 && "u8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k32_row_col_u8_s8;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 32 && "u8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 1 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k32_row_col_satfinite_u8_s8;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 32 && "u8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k32_row_col_u8;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 32 && "u8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 1 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k32_row_col_satfinite_u8;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 8 && k == 32 && "s4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k32_row_col_s4;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 8 && k == 32 && "s4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 1 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k32_row_col_satfinite_s4;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 8 && k == 32 && "s4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k32_row_col_s4_u4;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 8 && k == 32 && "s4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 1 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k32_row_col_satfinite_s4_u4;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 8 && k == 32 && "u4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k32_row_col_u4_s4;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 8 && k == 32 && "u4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 1 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k32_row_col_satfinite_u4_s4;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 8 && k == 32 && "u4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k32_row_col_u4;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 8 && k == 32 && "u4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 1 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m8n8k32_row_col_satfinite_u4;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 32 && "s4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k32_row_col_s4;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 32 && "s4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 1 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k32_row_col_satfinite_s4;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 32 && "s4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k32_row_col_s4_u4;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 32 && "s4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 1 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k32_row_col_satfinite_s4_u4;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 32 && "u4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k32_row_col_u4_s4;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 32 && "u4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 1 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k32_row_col_satfinite_u4_s4;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 32 && "u4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k32_row_col_u4;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 32 && "u4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 1 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k32_row_col_satfinite_u4;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 64 && "s4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k64_row_col_s4;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 64 && "s4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 1 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k64_row_col_satfinite_s4;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 64 && "s4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k64_row_col_s4_u4;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 64 && "s4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 1 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k64_row_col_satfinite_s4_u4;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 64 && "u4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k64_row_col_u4_s4;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 64 && "u4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 1 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k64_row_col_satfinite_u4_s4;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 64 && "u4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k64_row_col_u4;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 64 && "u4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 1 == static_cast<int>(*sat) : true))
return llvm::Intrinsic::nvvm_mma_m16n8k64_row_col_satfinite_u4;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 8 && k == 128 && "b1" == eltypeA && "b1" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true) && (b1Op.has_value() ? MMAB1Op::xor_popc == *b1Op : true))
return llvm::Intrinsic::nvvm_mma_xor_popc_m8n8k128_row_col_b1;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 8 && k == 128 && "b1" == eltypeA && "b1" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true) && (b1Op.has_value() ? MMAB1Op::and_popc == *b1Op : true))
return llvm::Intrinsic::nvvm_mma_and_popc_m8n8k128_row_col_b1;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 128 && "b1" == eltypeA && "b1" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true) && (b1Op.has_value() ? MMAB1Op::xor_popc == *b1Op : true))
return llvm::Intrinsic::nvvm_mma_xor_popc_m16n8k128_row_col_b1;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 128 && "b1" == eltypeA && "b1" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true) && (b1Op.has_value() ? MMAB1Op::and_popc == *b1Op : true))
return llvm::Intrinsic::nvvm_mma_and_popc_m16n8k128_row_col_b1;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 256 && "b1" == eltypeA && "b1" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true) && (b1Op.has_value() ? MMAB1Op::xor_popc == *b1Op : true))
return llvm::Intrinsic::nvvm_mma_xor_popc_m16n8k256_row_col_b1;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 8 && k == 256 && "b1" == eltypeA && "b1" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (sat.has_value() ? 0 == static_cast<int>(*sat) : true) && (b1Op.has_value() ? MMAB1Op::and_popc == *b1Op : true))
return llvm::Intrinsic::nvvm_mma_and_popc_m16n8k256_row_col_b1;
return 0;
}
static std::optional<mlir::NVVM::MMATypes> inferOperandMMAType(Type operandElType,
bool isAccumulator);
MMATypes accumPtxType();
MMATypes resultPtxType();
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::MmaOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::MmaOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::MmaSpBlockScaleOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class MmaSpBlockScaleOpGenericAdaptorBase {
public:
struct Properties {
using blockScaleFormatTy = ::mlir::NVVM::BlockScaleFormatAttr;
blockScaleFormatTy blockScaleFormat;
auto getBlockScaleFormat() const {
auto &propStorage = this->blockScaleFormat;
return ::llvm::cast<::mlir::NVVM::BlockScaleFormatAttr>(propStorage);
}
void setBlockScaleFormat(const ::mlir::NVVM::BlockScaleFormatAttr &propValue) {
this->blockScaleFormat = propValue;
}
using kindTy = ::mlir::NVVM::MMABlockScaleKindAttr;
kindTy kind;
auto getKind() const {
auto &propStorage = this->kind;
return ::llvm::cast<::mlir::NVVM::MMABlockScaleKindAttr>(propStorage);
}
void setKind(const ::mlir::NVVM::MMABlockScaleKindAttr &propValue) {
this->kind = propValue;
}
using multiplicandAPtxTypeTy = ::mlir::NVVM::MMATypesAttr;
multiplicandAPtxTypeTy multiplicandAPtxType;
auto getMultiplicandAPtxType() const {
auto &propStorage = this->multiplicandAPtxType;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMATypesAttr>(propStorage);
}
void setMultiplicandAPtxType(const ::mlir::NVVM::MMATypesAttr &propValue) {
this->multiplicandAPtxType = propValue;
}
using multiplicandBPtxTypeTy = ::mlir::NVVM::MMATypesAttr;
multiplicandBPtxTypeTy multiplicandBPtxType;
auto getMultiplicandBPtxType() const {
auto &propStorage = this->multiplicandBPtxType;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMATypesAttr>(propStorage);
}
void setMultiplicandBPtxType(const ::mlir::NVVM::MMATypesAttr &propValue) {
this->multiplicandBPtxType = propValue;
}
using orderedMetadataTy = ::mlir::UnitAttr;
orderedMetadataTy orderedMetadata;
auto getOrderedMetadata() const {
auto &propStorage = this->orderedMetadata;
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage);
}
void setOrderedMetadata(const ::mlir::UnitAttr &propValue) {
this->orderedMetadata = propValue;
}
using scaleVecSizeTy = ::mlir::NVVM::ScaleVecSizeAttr;
scaleVecSizeTy scaleVecSize;
auto getScaleVecSize() const {
auto &propStorage = this->scaleVecSize;
return ::llvm::cast<::mlir::NVVM::ScaleVecSizeAttr>(propStorage);
}
void setScaleVecSize(const ::mlir::NVVM::ScaleVecSizeAttr &propValue) {
this->scaleVecSize = propValue;
}
using shapeTy = ::mlir::NVVM::MMAShapeAttr;
shapeTy shape;
auto getShape() const {
auto &propStorage = this->shape;
return ::llvm::cast<::mlir::NVVM::MMAShapeAttr>(propStorage);
}
void setShape(const ::mlir::NVVM::MMAShapeAttr &propValue) {
this->shape = propValue;
}
using operandSegmentSizesTy = std::array<int32_t, 11>;
operandSegmentSizesTy operandSegmentSizes;
::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
auto &propStorage = this->operandSegmentSizes;
return propStorage;
}
void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
auto &propStorage = this->operandSegmentSizes;
::llvm::copy(propValue, propStorage.begin());
}
bool operator==(const Properties &rhs) const {
return
rhs.blockScaleFormat == this->blockScaleFormat &&
rhs.kind == this->kind &&
rhs.multiplicandAPtxType == this->multiplicandAPtxType &&
rhs.multiplicandBPtxType == this->multiplicandBPtxType &&
rhs.orderedMetadata == this->orderedMetadata &&
rhs.scaleVecSize == this->scaleVecSize &&
rhs.shape == this->shape &&
rhs.operandSegmentSizes == this->operandSegmentSizes &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
MmaSpBlockScaleOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.mma.sp.block_scale", odsAttrs.getContext());
}
MmaSpBlockScaleOpGenericAdaptorBase(MmaSpBlockScaleOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::MMAShapeAttr getShapeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MMAShapeAttr>(getProperties().shape);
return attr;
}
::mlir::NVVM::MMAShapeAttr getShape();
::mlir::NVVM::MMATypesAttr getMultiplicandAPtxTypeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::NVVM::MMATypesAttr>(getProperties().multiplicandAPtxType);
return attr;
}
::std::optional<::mlir::NVVM::MMATypes> getMultiplicandAPtxType();
::mlir::NVVM::MMATypesAttr getMultiplicandBPtxTypeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::NVVM::MMATypesAttr>(getProperties().multiplicandBPtxType);
return attr;
}
::std::optional<::mlir::NVVM::MMATypes> getMultiplicandBPtxType();
::mlir::NVVM::ScaleVecSizeAttr getScaleVecSizeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::ScaleVecSizeAttr>(getProperties().scaleVecSize);
return attr;
}
::mlir::NVVM::ScaleVecSize getScaleVecSize();
::mlir::NVVM::BlockScaleFormatAttr getBlockScaleFormatAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::BlockScaleFormatAttr>(getProperties().blockScaleFormat);
return attr;
}
::mlir::NVVM::BlockScaleFormat getBlockScaleFormat();
::mlir::NVVM::MMABlockScaleKindAttr getKindAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MMABlockScaleKindAttr>(getProperties().kind);
return attr;
}
::mlir::NVVM::MMABlockScaleKind getKind();
::mlir::UnitAttr getOrderedMetadataAttr();
bool getOrderedMetadata();
};
} // namespace detail
template <typename RangeT>
class MmaSpBlockScaleOpGenericAdaptor : public detail::MmaSpBlockScaleOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::MmaSpBlockScaleOpGenericAdaptorBase;
static constexpr int odsIndex_operandA = 0;
static constexpr int odsIndex_operandB = 1;
static constexpr int odsIndex_operandC = 2;
static constexpr int odsIndex_sparseMetadata = 3;
static constexpr int odsIndex_sparsitySelector = 4;
static constexpr int odsIndex_scaleAData = 5;
static constexpr int odsIndex_byteIdA = 6;
static constexpr int odsIndex_threadIdA = 7;
static constexpr int odsIndex_scaleBData = 8;
static constexpr int odsIndex_byteIdB = 9;
static constexpr int odsIndex_threadIdB = 10;
public:
MmaSpBlockScaleOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
MmaSpBlockScaleOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MmaSpBlockScaleOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
MmaSpBlockScaleOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : MmaSpBlockScaleOpGenericAdaptor(values, attrs, Properties{}, {}) {}
MmaSpBlockScaleOpGenericAdaptor(RangeT values, const MmaSpBlockScaleOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = MmaSpBlockScaleOp, typename = std::enable_if_t<std::is_same_v<LateInst, MmaSpBlockScaleOp>>>
MmaSpBlockScaleOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperandA() {
return getODSOperands(0);
}
RangeT getOperandB() {
return getODSOperands(1);
}
RangeT getOperandC() {
return getODSOperands(2);
}
ValueT getSparseMetadata() {
return (*getODSOperands(3).begin());
}
ValueT getSparsitySelector() {
return (*getODSOperands(4).begin());
}
ValueT getScaleAData() {
return (*getODSOperands(5).begin());
}
ValueT getByteIdA() {
return (*getODSOperands(6).begin());
}
ValueT getThreadIdA() {
return (*getODSOperands(7).begin());
}
ValueT getScaleBData() {
return (*getODSOperands(8).begin());
}
ValueT getByteIdB() {
return (*getODSOperands(9).begin());
}
ValueT getThreadIdB() {
return (*getODSOperands(10).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class MmaSpBlockScaleOpAdaptor : public MmaSpBlockScaleOpGenericAdaptor<::mlir::ValueRange> {
public:
using MmaSpBlockScaleOpGenericAdaptor::MmaSpBlockScaleOpGenericAdaptor;
MmaSpBlockScaleOpAdaptor(MmaSpBlockScaleOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class MmaSpBlockScaleOp : public ::mlir::Op<MmaSpBlockScaleOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<8>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = MmaSpBlockScaleOpAdaptor;
template <typename RangeT>
using GenericAdaptor = MmaSpBlockScaleOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_operandA = 0;
static constexpr int odsIndex_operandB = 1;
static constexpr int odsIndex_operandC = 2;
static constexpr int odsIndex_sparseMetadata = 3;
static constexpr int odsIndex_sparsitySelector = 4;
static constexpr int odsIndex_scaleAData = 5;
static constexpr int odsIndex_byteIdA = 6;
static constexpr int odsIndex_threadIdA = 7;
static constexpr int odsIndex_scaleBData = 8;
static constexpr int odsIndex_byteIdB = 9;
static constexpr int odsIndex_threadIdB = 10;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("blockScaleFormat"), ::llvm::StringRef("kind"), ::llvm::StringRef("multiplicandAPtxType"), ::llvm::StringRef("multiplicandBPtxType"), ::llvm::StringRef("orderedMetadata"), ::llvm::StringRef("scaleVecSize"), ::llvm::StringRef("shape"), ::llvm::StringRef("operandSegmentSizes")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getBlockScaleFormatAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getBlockScaleFormatAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getKindAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getKindAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getMultiplicandAPtxTypeAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getMultiplicandAPtxTypeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
::mlir::StringAttr getMultiplicandBPtxTypeAttrName() {
return getAttributeNameForIndex(3);
}
static ::mlir::StringAttr getMultiplicandBPtxTypeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 3);
}
::mlir::StringAttr getOrderedMetadataAttrName() {
return getAttributeNameForIndex(4);
}
static ::mlir::StringAttr getOrderedMetadataAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 4);
}
::mlir::StringAttr getScaleVecSizeAttrName() {
return getAttributeNameForIndex(5);
}
static ::mlir::StringAttr getScaleVecSizeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 5);
}
::mlir::StringAttr getShapeAttrName() {
return getAttributeNameForIndex(6);
}
static ::mlir::StringAttr getShapeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 6);
}
::mlir::StringAttr getOperandSegmentSizesAttrName() {
return (*this)->getName().getAttributeNames().back();
}
static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
return name.getAttributeNames().back();
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.mma.sp.block_scale");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::Operation::operand_range getOperandA() {
return getODSOperands(0);
}
::mlir::Operation::operand_range getOperandB() {
return getODSOperands(1);
}
::mlir::Operation::operand_range getOperandC() {
return getODSOperands(2);
}
::mlir::TypedValue<::mlir::IntegerType> getSparseMetadata() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getSparsitySelector() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(4).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getScaleAData() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(5).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getByteIdA() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(6).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getThreadIdA() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(7).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getScaleBData() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(8).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getByteIdB() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(9).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getThreadIdB() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(10).begin());
}
::mlir::MutableOperandRange getOperandAMutable();
::mlir::MutableOperandRange getOperandBMutable();
::mlir::MutableOperandRange getOperandCMutable();
::mlir::OpOperand &getSparseMetadataMutable() {
auto range = getODSOperandIndexAndLength(3);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSparsitySelectorMutable() {
auto range = getODSOperandIndexAndLength(4);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getScaleADataMutable() {
auto range = getODSOperandIndexAndLength(5);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getByteIdAMutable() {
auto range = getODSOperandIndexAndLength(6);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getThreadIdAMutable() {
auto range = getODSOperandIndexAndLength(7);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getScaleBDataMutable() {
auto range = getODSOperandIndexAndLength(8);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getByteIdBMutable() {
auto range = getODSOperandIndexAndLength(9);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getThreadIdBMutable() {
auto range = getODSOperandIndexAndLength(10);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::MMAShapeAttr getShapeAttr() {
return ::llvm::cast<::mlir::NVVM::MMAShapeAttr>(getProperties().shape);
}
::mlir::NVVM::MMAShapeAttr getShape();
::mlir::NVVM::MMATypesAttr getMultiplicandAPtxTypeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMATypesAttr>(getProperties().multiplicandAPtxType);
}
::std::optional<::mlir::NVVM::MMATypes> getMultiplicandAPtxType();
::mlir::NVVM::MMATypesAttr getMultiplicandBPtxTypeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMATypesAttr>(getProperties().multiplicandBPtxType);
}
::std::optional<::mlir::NVVM::MMATypes> getMultiplicandBPtxType();
::mlir::NVVM::ScaleVecSizeAttr getScaleVecSizeAttr() {
return ::llvm::cast<::mlir::NVVM::ScaleVecSizeAttr>(getProperties().scaleVecSize);
}
::mlir::NVVM::ScaleVecSize getScaleVecSize();
::mlir::NVVM::BlockScaleFormatAttr getBlockScaleFormatAttr() {
return ::llvm::cast<::mlir::NVVM::BlockScaleFormatAttr>(getProperties().blockScaleFormat);
}
::mlir::NVVM::BlockScaleFormat getBlockScaleFormat();
::mlir::NVVM::MMABlockScaleKindAttr getKindAttr() {
return ::llvm::cast<::mlir::NVVM::MMABlockScaleKindAttr>(getProperties().kind);
}
::mlir::NVVM::MMABlockScaleKind getKind();
::mlir::UnitAttr getOrderedMetadataAttr() {
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().orderedMetadata);
}
bool getOrderedMetadata();
void setShapeAttr(::mlir::NVVM::MMAShapeAttr attr) {
getProperties().shape = attr;
}
void setMultiplicandAPtxTypeAttr(::mlir::NVVM::MMATypesAttr attr) {
getProperties().multiplicandAPtxType = attr;
}
void setMultiplicandAPtxType(::std::optional<::mlir::NVVM::MMATypes> attrValue);
void setMultiplicandBPtxTypeAttr(::mlir::NVVM::MMATypesAttr attr) {
getProperties().multiplicandBPtxType = attr;
}
void setMultiplicandBPtxType(::std::optional<::mlir::NVVM::MMATypes> attrValue);
void setScaleVecSizeAttr(::mlir::NVVM::ScaleVecSizeAttr attr) {
getProperties().scaleVecSize = attr;
}
void setScaleVecSize(::mlir::NVVM::ScaleVecSize attrValue);
void setBlockScaleFormatAttr(::mlir::NVVM::BlockScaleFormatAttr attr) {
getProperties().blockScaleFormat = attr;
}
void setBlockScaleFormat(::mlir::NVVM::BlockScaleFormat attrValue);
void setKindAttr(::mlir::NVVM::MMABlockScaleKindAttr attr) {
getProperties().kind = attr;
}
void setKind(::mlir::NVVM::MMABlockScaleKind attrValue);
void setOrderedMetadataAttr(::mlir::UnitAttr attr) {
getProperties().orderedMetadata = attr;
}
void setOrderedMetadata(bool attrValue);
::mlir::Attribute removeMultiplicandAPtxTypeAttr() {
auto attr = getProperties().multiplicandAPtxType;
getProperties().multiplicandAPtxType = {};
return attr;
}
::mlir::Attribute removeMultiplicandBPtxTypeAttr() {
auto attr = getProperties().multiplicandBPtxType;
getProperties().multiplicandBPtxType = {};
return attr;
}
::mlir::Attribute removeOrderedMetadataAttr() {
auto attr = getProperties().orderedMetadata;
getProperties().orderedMetadata = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType, ValueRange operandA, ValueRange operandB, ValueRange operandC, Value sparseMetadata, Value sparsitySelector, Value scaleAData, Value byteIdA, Value threadIdA, Value scaleBData, Value byteIdB, Value threadIdB, ArrayRef<int64_t> shape, std::optional<std::array<MMATypes, 2>> multiplicandPtxTypes, ScaleVecSize scaleVecSize, BlockScaleFormat blockScaleFormat, MMABlockScaleKind kind);
static MmaSpBlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType, ValueRange operandA, ValueRange operandB, ValueRange operandC, Value sparseMetadata, Value sparsitySelector, Value scaleAData, Value byteIdA, Value threadIdA, Value scaleBData, Value byteIdB, Value threadIdB, ArrayRef<int64_t> shape, std::optional<std::array<MMATypes, 2>> multiplicandPtxTypes, ScaleVecSize scaleVecSize, BlockScaleFormat blockScaleFormat, MMABlockScaleKind kind);
static MmaSpBlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType, ValueRange operandA, ValueRange operandB, ValueRange operandC, Value sparseMetadata, Value sparsitySelector, Value scaleAData, Value byteIdA, Value threadIdA, Value scaleBData, Value byteIdB, Value threadIdB, ArrayRef<int64_t> shape, std::optional<std::array<MMATypes, 2>> multiplicandPtxTypes, ScaleVecSize scaleVecSize, BlockScaleFormat blockScaleFormat, MMABlockScaleKind kind);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::NVVM::ScaleVecSizeAttr scaleVecSize, ::mlir::NVVM::BlockScaleFormatAttr blockScaleFormat, ::mlir::NVVM::MMABlockScaleKindAttr kind, /*optional*/::mlir::UnitAttr orderedMetadata, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value sparseMetadata, ::mlir::Value sparsitySelector, ::mlir::Value scaleAData, ::mlir::Value byteIdA, ::mlir::Value threadIdA, ::mlir::Value scaleBData, ::mlir::Value byteIdB, ::mlir::Value threadIdB);
static MmaSpBlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::NVVM::ScaleVecSizeAttr scaleVecSize, ::mlir::NVVM::BlockScaleFormatAttr blockScaleFormat, ::mlir::NVVM::MMABlockScaleKindAttr kind, /*optional*/::mlir::UnitAttr orderedMetadata, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value sparseMetadata, ::mlir::Value sparsitySelector, ::mlir::Value scaleAData, ::mlir::Value byteIdA, ::mlir::Value threadIdA, ::mlir::Value scaleBData, ::mlir::Value byteIdB, ::mlir::Value threadIdB);
static MmaSpBlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::NVVM::ScaleVecSizeAttr scaleVecSize, ::mlir::NVVM::BlockScaleFormatAttr blockScaleFormat, ::mlir::NVVM::MMABlockScaleKindAttr kind, /*optional*/::mlir::UnitAttr orderedMetadata, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value sparseMetadata, ::mlir::Value sparsitySelector, ::mlir::Value scaleAData, ::mlir::Value byteIdA, ::mlir::Value threadIdA, ::mlir::Value scaleBData, ::mlir::Value byteIdB, ::mlir::Value threadIdB);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::NVVM::ScaleVecSizeAttr scaleVecSize, ::mlir::NVVM::BlockScaleFormatAttr blockScaleFormat, ::mlir::NVVM::MMABlockScaleKindAttr kind, /*optional*/::mlir::UnitAttr orderedMetadata, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value sparseMetadata, ::mlir::Value sparsitySelector, ::mlir::Value scaleAData, ::mlir::Value byteIdA, ::mlir::Value threadIdA, ::mlir::Value scaleBData, ::mlir::Value byteIdB, ::mlir::Value threadIdB);
static MmaSpBlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::NVVM::ScaleVecSizeAttr scaleVecSize, ::mlir::NVVM::BlockScaleFormatAttr blockScaleFormat, ::mlir::NVVM::MMABlockScaleKindAttr kind, /*optional*/::mlir::UnitAttr orderedMetadata, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value sparseMetadata, ::mlir::Value sparsitySelector, ::mlir::Value scaleAData, ::mlir::Value byteIdA, ::mlir::Value threadIdA, ::mlir::Value scaleBData, ::mlir::Value byteIdB, ::mlir::Value threadIdB);
static MmaSpBlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::NVVM::ScaleVecSizeAttr scaleVecSize, ::mlir::NVVM::BlockScaleFormatAttr blockScaleFormat, ::mlir::NVVM::MMABlockScaleKindAttr kind, /*optional*/::mlir::UnitAttr orderedMetadata, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value sparseMetadata, ::mlir::Value sparsitySelector, ::mlir::Value scaleAData, ::mlir::Value byteIdA, ::mlir::Value threadIdA, ::mlir::Value scaleBData, ::mlir::Value byteIdB, ::mlir::Value threadIdB);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::NVVM::ScaleVecSize scaleVecSize, ::mlir::NVVM::BlockScaleFormat blockScaleFormat, ::mlir::NVVM::MMABlockScaleKind kind, /*optional*/bool orderedMetadata, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value sparseMetadata, ::mlir::Value sparsitySelector, ::mlir::Value scaleAData, ::mlir::Value byteIdA, ::mlir::Value threadIdA, ::mlir::Value scaleBData, ::mlir::Value byteIdB, ::mlir::Value threadIdB);
static MmaSpBlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::NVVM::ScaleVecSize scaleVecSize, ::mlir::NVVM::BlockScaleFormat blockScaleFormat, ::mlir::NVVM::MMABlockScaleKind kind, /*optional*/bool orderedMetadata, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value sparseMetadata, ::mlir::Value sparsitySelector, ::mlir::Value scaleAData, ::mlir::Value byteIdA, ::mlir::Value threadIdA, ::mlir::Value scaleBData, ::mlir::Value byteIdB, ::mlir::Value threadIdB);
static MmaSpBlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::NVVM::ScaleVecSize scaleVecSize, ::mlir::NVVM::BlockScaleFormat blockScaleFormat, ::mlir::NVVM::MMABlockScaleKind kind, /*optional*/bool orderedMetadata, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value sparseMetadata, ::mlir::Value sparsitySelector, ::mlir::Value scaleAData, ::mlir::Value byteIdA, ::mlir::Value threadIdA, ::mlir::Value scaleBData, ::mlir::Value byteIdB, ::mlir::Value threadIdB);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::NVVM::ScaleVecSize scaleVecSize, ::mlir::NVVM::BlockScaleFormat blockScaleFormat, ::mlir::NVVM::MMABlockScaleKind kind, /*optional*/bool orderedMetadata, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value sparseMetadata, ::mlir::Value sparsitySelector, ::mlir::Value scaleAData, ::mlir::Value byteIdA, ::mlir::Value threadIdA, ::mlir::Value scaleBData, ::mlir::Value byteIdB, ::mlir::Value threadIdB);
static MmaSpBlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::NVVM::ScaleVecSize scaleVecSize, ::mlir::NVVM::BlockScaleFormat blockScaleFormat, ::mlir::NVVM::MMABlockScaleKind kind, /*optional*/bool orderedMetadata, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value sparseMetadata, ::mlir::Value sparsitySelector, ::mlir::Value scaleAData, ::mlir::Value byteIdA, ::mlir::Value threadIdA, ::mlir::Value scaleBData, ::mlir::Value byteIdB, ::mlir::Value threadIdB);
static MmaSpBlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, ::mlir::NVVM::ScaleVecSize scaleVecSize, ::mlir::NVVM::BlockScaleFormat blockScaleFormat, ::mlir::NVVM::MMABlockScaleKind kind, /*optional*/bool orderedMetadata, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value sparseMetadata, ::mlir::Value sparsitySelector, ::mlir::Value scaleAData, ::mlir::Value byteIdA, ::mlir::Value threadIdA, ::mlir::Value scaleBData, ::mlir::Value byteIdB, ::mlir::Value threadIdB);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MmaSpBlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MmaSpBlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MmaSpBlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MmaSpBlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &p);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 7 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static llvm::Intrinsic::ID getIntrinsicID(
int64_t m, int64_t n, uint64_t k,
mlir::NVVM::MMATypes eltypeAEnum, mlir::NVVM::MMATypes eltypeBEnum,
mlir::NVVM::MMATypes eltypeCEnum,
mlir::NVVM::ScaleVecSize scaleVecSize,
mlir::NVVM::BlockScaleFormat blockScaleFormat,
mlir::NVVM::MMABlockScaleKind kind) {
llvm::StringRef eltypeA = stringifyEnum(eltypeAEnum);
llvm::StringRef eltypeB = stringifyEnum(eltypeBEnum);
llvm::StringRef eltypeC = stringifyEnum(eltypeCEnum);
auto getScaleVecSizeStr = [](ScaleVecSize svs) -> std::string {
switch (svs) {
case ScaleVecSize::X1: return ".scale_1x";
case ScaleVecSize::X2: return ".scale_2x";
case ScaleVecSize::X4: return ".scale_4x";
}
return "";
};
if (m == 16 && n == 8 && k == 128 && "e2m1" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k128_row_col_mxf4_f32_e2m1_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 128 && "e2m1" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_2x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k128_row_col_mxf4_scale_2x_f32_e2m1_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 128 && "e2m1" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf4nvf4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_2x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k128_row_col_mxf4nvf4_scale_2x_f32_e2m1_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 128 && "e2m1" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf4nvf4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_4x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k128_row_col_mxf4nvf4_scale_4x_f32_e2m1_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 128 && "e2m1" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf4nvf4" == stringifyEnum(kind) && "ue4m3" == stringifyEnum(blockScaleFormat) && ".scale_4x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k128_row_col_mxf4nvf4_scale_4x_f32_e2m1_e2m1_f32_ue4m3;
if (m == 16 && n == 8 && k == 64 && "e4m3" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_f32_e4m3_e4m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e4m3" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_scale_1x_f32_e4m3_e4m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e4m3" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_f32_e4m3_e5m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e4m3" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_scale_1x_f32_e4m3_e5m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e4m3" == eltypeA && "e3m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_f32_e4m3_e3m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e4m3" == eltypeA && "e3m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_scale_1x_f32_e4m3_e3m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e4m3" == eltypeA && "e2m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_f32_e4m3_e2m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e4m3" == eltypeA && "e2m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_scale_1x_f32_e4m3_e2m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e4m3" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_f32_e4m3_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e4m3" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_scale_1x_f32_e4m3_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e5m2" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_f32_e5m2_e4m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e5m2" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_scale_1x_f32_e5m2_e4m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e5m2" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_f32_e5m2_e5m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e5m2" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_scale_1x_f32_e5m2_e5m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e5m2" == eltypeA && "e3m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_f32_e5m2_e3m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e5m2" == eltypeA && "e3m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_scale_1x_f32_e5m2_e3m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e5m2" == eltypeA && "e2m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_f32_e5m2_e2m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e5m2" == eltypeA && "e2m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_scale_1x_f32_e5m2_e2m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e5m2" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_f32_e5m2_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e5m2" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_scale_1x_f32_e5m2_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e3m2" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_f32_e3m2_e4m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e3m2" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_scale_1x_f32_e3m2_e4m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e3m2" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_f32_e3m2_e5m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e3m2" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_scale_1x_f32_e3m2_e5m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e3m2" == eltypeA && "e3m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_f32_e3m2_e3m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e3m2" == eltypeA && "e3m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_scale_1x_f32_e3m2_e3m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e3m2" == eltypeA && "e2m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_f32_e3m2_e2m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e3m2" == eltypeA && "e2m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_scale_1x_f32_e3m2_e2m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e3m2" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_f32_e3m2_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e3m2" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_scale_1x_f32_e3m2_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e2m3" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_f32_e2m3_e4m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e2m3" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_scale_1x_f32_e2m3_e4m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e2m3" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_f32_e2m3_e5m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e2m3" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_scale_1x_f32_e2m3_e5m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e2m3" == eltypeA && "e3m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_f32_e2m3_e3m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e2m3" == eltypeA && "e3m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_scale_1x_f32_e2m3_e3m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e2m3" == eltypeA && "e2m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_f32_e2m3_e2m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e2m3" == eltypeA && "e2m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_scale_1x_f32_e2m3_e2m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e2m3" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_f32_e2m3_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e2m3" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_scale_1x_f32_e2m3_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e2m1" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_f32_e2m1_e4m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e2m1" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_scale_1x_f32_e2m1_e4m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e2m1" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_f32_e2m1_e5m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e2m1" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_scale_1x_f32_e2m1_e5m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e2m1" == eltypeA && "e3m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_f32_e2m1_e3m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e2m1" == eltypeA && "e3m2" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_scale_1x_f32_e2m1_e3m2_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e2m1" == eltypeA && "e2m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_f32_e2m1_e2m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e2m1" == eltypeA && "e2m3" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_scale_1x_f32_e2m1_e2m3_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e2m1" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && "" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_f32_e2m1_e2m1_f32_ue8m0;
if (m == 16 && n == 8 && k == 64 && "e2m1" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "mxf8f6f4" == stringifyEnum(kind) && "ue8m0" == stringifyEnum(blockScaleFormat) && ".scale_1x" == getScaleVecSizeStr(scaleVecSize))
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_block_scale_m16n8k64_row_col_mxf8f6f4_scale_1x_f32_e2m1_e2m1_f32_ue8m0;
return 0;
}
static mlir::NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase& builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::MmaSpBlockScaleOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::MmaSpBlockScaleOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::MmaSpOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class MmaSpOpGenericAdaptorBase {
public:
struct Properties {
using intOverflowBehaviorTy = ::mlir::NVVM::MMAIntOverflowAttr;
intOverflowBehaviorTy intOverflowBehavior;
auto getIntOverflowBehavior() const {
auto &propStorage = this->intOverflowBehavior;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMAIntOverflowAttr>(propStorage);
}
void setIntOverflowBehavior(const ::mlir::NVVM::MMAIntOverflowAttr &propValue) {
this->intOverflowBehavior = propValue;
}
using kindTy = ::mlir::NVVM::MMAKindAttr;
kindTy kind;
auto getKind() const {
auto &propStorage = this->kind;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMAKindAttr>(propStorage);
}
void setKind(const ::mlir::NVVM::MMAKindAttr &propValue) {
this->kind = propValue;
}
using multiplicandAPtxTypeTy = ::mlir::NVVM::MMATypesAttr;
multiplicandAPtxTypeTy multiplicandAPtxType;
auto getMultiplicandAPtxType() const {
auto &propStorage = this->multiplicandAPtxType;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMATypesAttr>(propStorage);
}
void setMultiplicandAPtxType(const ::mlir::NVVM::MMATypesAttr &propValue) {
this->multiplicandAPtxType = propValue;
}
using multiplicandBPtxTypeTy = ::mlir::NVVM::MMATypesAttr;
multiplicandBPtxTypeTy multiplicandBPtxType;
auto getMultiplicandBPtxType() const {
auto &propStorage = this->multiplicandBPtxType;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMATypesAttr>(propStorage);
}
void setMultiplicandBPtxType(const ::mlir::NVVM::MMATypesAttr &propValue) {
this->multiplicandBPtxType = propValue;
}
using orderedMetadataTy = ::mlir::UnitAttr;
orderedMetadataTy orderedMetadata;
auto getOrderedMetadata() const {
auto &propStorage = this->orderedMetadata;
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage);
}
void setOrderedMetadata(const ::mlir::UnitAttr &propValue) {
this->orderedMetadata = propValue;
}
using shapeTy = ::mlir::NVVM::MMAShapeAttr;
shapeTy shape;
auto getShape() const {
auto &propStorage = this->shape;
return ::llvm::cast<::mlir::NVVM::MMAShapeAttr>(propStorage);
}
void setShape(const ::mlir::NVVM::MMAShapeAttr &propValue) {
this->shape = propValue;
}
using operandSegmentSizesTy = std::array<int32_t, 5>;
operandSegmentSizesTy operandSegmentSizes;
::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
auto &propStorage = this->operandSegmentSizes;
return propStorage;
}
void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
auto &propStorage = this->operandSegmentSizes;
::llvm::copy(propValue, propStorage.begin());
}
bool operator==(const Properties &rhs) const {
return
rhs.intOverflowBehavior == this->intOverflowBehavior &&
rhs.kind == this->kind &&
rhs.multiplicandAPtxType == this->multiplicandAPtxType &&
rhs.multiplicandBPtxType == this->multiplicandBPtxType &&
rhs.orderedMetadata == this->orderedMetadata &&
rhs.shape == this->shape &&
rhs.operandSegmentSizes == this->operandSegmentSizes &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
MmaSpOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.mma.sp.sync", odsAttrs.getContext());
}
MmaSpOpGenericAdaptorBase(MmaSpOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::MMAShapeAttr getShapeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MMAShapeAttr>(getProperties().shape);
return attr;
}
::mlir::NVVM::MMAShapeAttr getShape();
::mlir::NVVM::MMAIntOverflowAttr getIntOverflowBehaviorAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::NVVM::MMAIntOverflowAttr>(getProperties().intOverflowBehavior);
return attr;
}
::std::optional<::mlir::NVVM::MMAIntOverflow> getIntOverflowBehavior();
::mlir::NVVM::MMATypesAttr getMultiplicandAPtxTypeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::NVVM::MMATypesAttr>(getProperties().multiplicandAPtxType);
return attr;
}
::std::optional<::mlir::NVVM::MMATypes> getMultiplicandAPtxType();
::mlir::NVVM::MMATypesAttr getMultiplicandBPtxTypeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::NVVM::MMATypesAttr>(getProperties().multiplicandBPtxType);
return attr;
}
::std::optional<::mlir::NVVM::MMATypes> getMultiplicandBPtxType();
::mlir::UnitAttr getOrderedMetadataAttr();
bool getOrderedMetadata();
::mlir::NVVM::MMAKindAttr getKindAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::NVVM::MMAKindAttr>(getProperties().kind);
return attr;
}
::std::optional<::mlir::NVVM::MMAKind> getKind();
};
} // namespace detail
template <typename RangeT>
class MmaSpOpGenericAdaptor : public detail::MmaSpOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::MmaSpOpGenericAdaptorBase;
static constexpr int odsIndex_operandA = 0;
static constexpr int odsIndex_operandB = 1;
static constexpr int odsIndex_operandC = 2;
static constexpr int odsIndex_sparseMetadata = 3;
static constexpr int odsIndex_sparsitySelector = 4;
public:
MmaSpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
MmaSpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MmaSpOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
MmaSpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : MmaSpOpGenericAdaptor(values, attrs, Properties{}, {}) {}
MmaSpOpGenericAdaptor(RangeT values, const MmaSpOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = MmaSpOp, typename = std::enable_if_t<std::is_same_v<LateInst, MmaSpOp>>>
MmaSpOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperandA() {
return getODSOperands(0);
}
RangeT getOperandB() {
return getODSOperands(1);
}
RangeT getOperandC() {
return getODSOperands(2);
}
ValueT getSparseMetadata() {
return (*getODSOperands(3).begin());
}
ValueT getSparsitySelector() {
return (*getODSOperands(4).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class MmaSpOpAdaptor : public MmaSpOpGenericAdaptor<::mlir::ValueRange> {
public:
using MmaSpOpGenericAdaptor::MmaSpOpGenericAdaptor;
MmaSpOpAdaptor(MmaSpOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class MmaSpOp : public ::mlir::Op<MmaSpOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = MmaSpOpAdaptor;
template <typename RangeT>
using GenericAdaptor = MmaSpOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_operandA = 0;
static constexpr int odsIndex_operandB = 1;
static constexpr int odsIndex_operandC = 2;
static constexpr int odsIndex_sparseMetadata = 3;
static constexpr int odsIndex_sparsitySelector = 4;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("intOverflowBehavior"), ::llvm::StringRef("kind"), ::llvm::StringRef("multiplicandAPtxType"), ::llvm::StringRef("multiplicandBPtxType"), ::llvm::StringRef("orderedMetadata"), ::llvm::StringRef("shape"), ::llvm::StringRef("operandSegmentSizes")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getIntOverflowBehaviorAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getIntOverflowBehaviorAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getKindAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getKindAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getMultiplicandAPtxTypeAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getMultiplicandAPtxTypeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
::mlir::StringAttr getMultiplicandBPtxTypeAttrName() {
return getAttributeNameForIndex(3);
}
static ::mlir::StringAttr getMultiplicandBPtxTypeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 3);
}
::mlir::StringAttr getOrderedMetadataAttrName() {
return getAttributeNameForIndex(4);
}
static ::mlir::StringAttr getOrderedMetadataAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 4);
}
::mlir::StringAttr getShapeAttrName() {
return getAttributeNameForIndex(5);
}
static ::mlir::StringAttr getShapeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 5);
}
::mlir::StringAttr getOperandSegmentSizesAttrName() {
return (*this)->getName().getAttributeNames().back();
}
static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
return name.getAttributeNames().back();
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.mma.sp.sync");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::Operation::operand_range getOperandA() {
return getODSOperands(0);
}
::mlir::Operation::operand_range getOperandB() {
return getODSOperands(1);
}
::mlir::Operation::operand_range getOperandC() {
return getODSOperands(2);
}
::mlir::TypedValue<::mlir::IntegerType> getSparseMetadata() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getSparsitySelector() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(4).begin());
}
::mlir::MutableOperandRange getOperandAMutable();
::mlir::MutableOperandRange getOperandBMutable();
::mlir::MutableOperandRange getOperandCMutable();
::mlir::OpOperand &getSparseMetadataMutable() {
auto range = getODSOperandIndexAndLength(3);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSparsitySelectorMutable() {
auto range = getODSOperandIndexAndLength(4);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::MMAShapeAttr getShapeAttr() {
return ::llvm::cast<::mlir::NVVM::MMAShapeAttr>(getProperties().shape);
}
::mlir::NVVM::MMAShapeAttr getShape();
::mlir::NVVM::MMAIntOverflowAttr getIntOverflowBehaviorAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMAIntOverflowAttr>(getProperties().intOverflowBehavior);
}
::std::optional<::mlir::NVVM::MMAIntOverflow> getIntOverflowBehavior();
::mlir::NVVM::MMATypesAttr getMultiplicandAPtxTypeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMATypesAttr>(getProperties().multiplicandAPtxType);
}
::std::optional<::mlir::NVVM::MMATypes> getMultiplicandAPtxType();
::mlir::NVVM::MMATypesAttr getMultiplicandBPtxTypeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMATypesAttr>(getProperties().multiplicandBPtxType);
}
::std::optional<::mlir::NVVM::MMATypes> getMultiplicandBPtxType();
::mlir::UnitAttr getOrderedMetadataAttr() {
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().orderedMetadata);
}
bool getOrderedMetadata();
::mlir::NVVM::MMAKindAttr getKindAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMAKindAttr>(getProperties().kind);
}
::std::optional<::mlir::NVVM::MMAKind> getKind();
void setShapeAttr(::mlir::NVVM::MMAShapeAttr attr) {
getProperties().shape = attr;
}
void setIntOverflowBehaviorAttr(::mlir::NVVM::MMAIntOverflowAttr attr) {
getProperties().intOverflowBehavior = attr;
}
void setIntOverflowBehavior(::std::optional<::mlir::NVVM::MMAIntOverflow> attrValue);
void setMultiplicandAPtxTypeAttr(::mlir::NVVM::MMATypesAttr attr) {
getProperties().multiplicandAPtxType = attr;
}
void setMultiplicandAPtxType(::std::optional<::mlir::NVVM::MMATypes> attrValue);
void setMultiplicandBPtxTypeAttr(::mlir::NVVM::MMATypesAttr attr) {
getProperties().multiplicandBPtxType = attr;
}
void setMultiplicandBPtxType(::std::optional<::mlir::NVVM::MMATypes> attrValue);
void setOrderedMetadataAttr(::mlir::UnitAttr attr) {
getProperties().orderedMetadata = attr;
}
void setOrderedMetadata(bool attrValue);
void setKindAttr(::mlir::NVVM::MMAKindAttr attr) {
getProperties().kind = attr;
}
void setKind(::std::optional<::mlir::NVVM::MMAKind> attrValue);
::mlir::Attribute removeIntOverflowBehaviorAttr() {
auto attr = getProperties().intOverflowBehavior;
getProperties().intOverflowBehavior = {};
return attr;
}
::mlir::Attribute removeMultiplicandAPtxTypeAttr() {
auto attr = getProperties().multiplicandAPtxType;
getProperties().multiplicandAPtxType = {};
return attr;
}
::mlir::Attribute removeMultiplicandBPtxTypeAttr() {
auto attr = getProperties().multiplicandBPtxType;
getProperties().multiplicandBPtxType = {};
return attr;
}
::mlir::Attribute removeOrderedMetadataAttr() {
auto attr = getProperties().orderedMetadata;
getProperties().orderedMetadata = {};
return attr;
}
::mlir::Attribute removeKindAttr() {
auto attr = getProperties().kind;
getProperties().kind = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType, ValueRange operandA, ValueRange operandB, ValueRange operandC, Value sparseMetadata, Value sparsitySelector, ArrayRef<int64_t> shape, std::optional<MMAIntOverflow> intOverflow, std::optional<std::array<MMATypes, 2>> multiplicandPtxTypes);
static MmaSpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType, ValueRange operandA, ValueRange operandB, ValueRange operandC, Value sparseMetadata, Value sparsitySelector, ArrayRef<int64_t> shape, std::optional<MMAIntOverflow> intOverflow, std::optional<std::array<MMATypes, 2>> multiplicandPtxTypes);
static MmaSpOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType, ValueRange operandA, ValueRange operandB, ValueRange operandC, Value sparseMetadata, Value sparsitySelector, ArrayRef<int64_t> shape, std::optional<MMAIntOverflow> intOverflow, std::optional<std::array<MMATypes, 2>> multiplicandPtxTypes);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMAIntOverflowAttr intOverflowBehavior, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, /*optional*/::mlir::UnitAttr orderedMetadata, /*optional*/::mlir::NVVM::MMAKindAttr kind, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value sparseMetadata, ::mlir::Value sparsitySelector);
static MmaSpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMAIntOverflowAttr intOverflowBehavior, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, /*optional*/::mlir::UnitAttr orderedMetadata, /*optional*/::mlir::NVVM::MMAKindAttr kind, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value sparseMetadata, ::mlir::Value sparsitySelector);
static MmaSpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMAIntOverflowAttr intOverflowBehavior, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, /*optional*/::mlir::UnitAttr orderedMetadata, /*optional*/::mlir::NVVM::MMAKindAttr kind, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value sparseMetadata, ::mlir::Value sparsitySelector);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMAIntOverflowAttr intOverflowBehavior, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, /*optional*/::mlir::UnitAttr orderedMetadata, /*optional*/::mlir::NVVM::MMAKindAttr kind, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value sparseMetadata, ::mlir::Value sparsitySelector);
static MmaSpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMAIntOverflowAttr intOverflowBehavior, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, /*optional*/::mlir::UnitAttr orderedMetadata, /*optional*/::mlir::NVVM::MMAKindAttr kind, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value sparseMetadata, ::mlir::Value sparsitySelector);
static MmaSpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMAIntOverflowAttr intOverflowBehavior, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, /*optional*/::mlir::UnitAttr orderedMetadata, /*optional*/::mlir::NVVM::MMAKindAttr kind, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value sparseMetadata, ::mlir::Value sparsitySelector);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMAIntOverflowAttr intOverflowBehavior, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, /*optional*/bool orderedMetadata, /*optional*/::mlir::NVVM::MMAKindAttr kind, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value sparseMetadata, ::mlir::Value sparsitySelector);
static MmaSpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMAIntOverflowAttr intOverflowBehavior, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, /*optional*/bool orderedMetadata, /*optional*/::mlir::NVVM::MMAKindAttr kind, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value sparseMetadata, ::mlir::Value sparsitySelector);
static MmaSpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMAIntOverflowAttr intOverflowBehavior, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, /*optional*/bool orderedMetadata, /*optional*/::mlir::NVVM::MMAKindAttr kind, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value sparseMetadata, ::mlir::Value sparsitySelector);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMAIntOverflowAttr intOverflowBehavior, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, /*optional*/bool orderedMetadata, /*optional*/::mlir::NVVM::MMAKindAttr kind, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value sparseMetadata, ::mlir::Value sparsitySelector);
static MmaSpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMAIntOverflowAttr intOverflowBehavior, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, /*optional*/bool orderedMetadata, /*optional*/::mlir::NVVM::MMAKindAttr kind, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value sparseMetadata, ::mlir::Value sparsitySelector);
static MmaSpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::MMAShapeAttr shape, /*optional*/::mlir::NVVM::MMAIntOverflowAttr intOverflowBehavior, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandAPtxType, /*optional*/::mlir::NVVM::MMATypesAttr multiplicandBPtxType, /*optional*/bool orderedMetadata, /*optional*/::mlir::NVVM::MMAKindAttr kind, ::mlir::ValueRange operandA, ::mlir::ValueRange operandB, ::mlir::ValueRange operandC, ::mlir::Value sparseMetadata, ::mlir::Value sparsitySelector);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MmaSpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MmaSpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MmaSpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MmaSpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &p);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 6 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static llvm::Intrinsic::ID getIntrinsicID(
int64_t m, int64_t n, uint64_t k,
std::optional<MMAIntOverflow> satf,
bool orderedMetadata,
std::optional<MMAKind> kind,
mlir::NVVM::MMATypes eltypeAEnum, mlir::NVVM::MMATypes eltypeBEnum,
mlir::NVVM::MMATypes eltypeCEnum, mlir::NVVM::MMATypes eltypeDEnum) {
llvm::StringRef eltypeA = stringifyEnum(eltypeAEnum);
llvm::StringRef eltypeB = stringifyEnum(eltypeBEnum);
llvm::StringRef eltypeC = stringifyEnum(eltypeCEnum);
llvm::StringRef eltypeD = stringifyEnum(eltypeDEnum);
if (m == 16 && n == 8 && k == 16 && "bf16" == eltypeA && "bf16" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k16_row_col_bf16;
if (m == 16 && n == 8 && k == 16 && "bf16" == eltypeA && "bf16" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k16_row_col_bf16;
if (m == 16 && n == 8 && k == 32 && "bf16" == eltypeA && "bf16" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k32_row_col_bf16;
if (m == 16 && n == 8 && k == 32 && "bf16" == eltypeA && "bf16" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k32_row_col_bf16;
if (m == 16 && n == 8 && k == 8 && "tf32" == eltypeA && "tf32" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k8_row_col_tf32;
if (m == 16 && n == 8 && k == 8 && "tf32" == eltypeA && "tf32" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k8_row_col_tf32;
if (m == 16 && n == 8 && k == 16 && "tf32" == eltypeA && "tf32" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k16_row_col_tf32;
if (m == 16 && n == 8 && k == 16 && "tf32" == eltypeA && "tf32" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k16_row_col_tf32;
if (m == 16 && n == 8 && k == 16 && "f16" == eltypeA && "f16" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k16_row_col_f16_f16;
if (m == 16 && n == 8 && k == 16 && "f16" == eltypeA && "f16" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k16_row_col_f16_f16;
if (m == 16 && n == 8 && k == 16 && "f16" == eltypeA && "f16" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k16_row_col_f32_f32;
if (m == 16 && n == 8 && k == 16 && "f16" == eltypeA && "f16" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k16_row_col_f32_f32;
if (m == 16 && n == 8 && k == 32 && "f16" == eltypeA && "f16" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k32_row_col_f16_f16;
if (m == 16 && n == 8 && k == 32 && "f16" == eltypeA && "f16" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k32_row_col_f16_f16;
if (m == 16 && n == 8 && k == 32 && "f16" == eltypeA && "f16" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k32_row_col_f32_f32;
if (m == 16 && n == 8 && k == 32 && "f16" == eltypeA && "f16" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k32_row_col_f32_f32;
if (m == 16 && n == 8 && k == 64 && "e4m3" == eltypeA && "e4m3" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f16_e4m3_e4m3_f16;
if (m == 16 && n == 8 && k == 64 && "e4m3" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k64_row_col_f32_e4m3_e4m3_f32;
if (m == 16 && n == 8 && k == 64 && "e4m3" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_f32_e4m3_e4m3_f32;
if (m == 16 && n == 8 && k == 64 && "e4m3" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f32_e4m3_e4m3_f32;
if (m == 16 && n == 8 && k == 64 && "e4m3" == eltypeA && "e5m2" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f16_e4m3_e5m2_f16;
if (m == 16 && n == 8 && k == 64 && "e4m3" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k64_row_col_f32_e4m3_e5m2_f32;
if (m == 16 && n == 8 && k == 64 && "e4m3" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_f32_e4m3_e5m2_f32;
if (m == 16 && n == 8 && k == 64 && "e4m3" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f32_e4m3_e5m2_f32;
if (m == 16 && n == 8 && k == 64 && "e4m3" == eltypeA && "e3m2" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f16_e4m3_e3m2_f16;
if (m == 16 && n == 8 && k == 64 && "e4m3" == eltypeA && "e3m2" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f32_e4m3_e3m2_f32;
if (m == 16 && n == 8 && k == 64 && "e4m3" == eltypeA && "e2m3" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f16_e4m3_e2m3_f16;
if (m == 16 && n == 8 && k == 64 && "e4m3" == eltypeA && "e2m3" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f32_e4m3_e2m3_f32;
if (m == 16 && n == 8 && k == 64 && "e4m3" == eltypeA && "e2m1" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f16_e4m3_e2m1_f16;
if (m == 16 && n == 8 && k == 64 && "e4m3" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f32_e4m3_e2m1_f32;
if (m == 16 && n == 8 && k == 64 && "e5m2" == eltypeA && "e4m3" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f16_e5m2_e4m3_f16;
if (m == 16 && n == 8 && k == 64 && "e5m2" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k64_row_col_f32_e5m2_e4m3_f32;
if (m == 16 && n == 8 && k == 64 && "e5m2" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_f32_e5m2_e4m3_f32;
if (m == 16 && n == 8 && k == 64 && "e5m2" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f32_e5m2_e4m3_f32;
if (m == 16 && n == 8 && k == 64 && "e5m2" == eltypeA && "e5m2" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f16_e5m2_e5m2_f16;
if (m == 16 && n == 8 && k == 64 && "e5m2" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k64_row_col_f32_e5m2_e5m2_f32;
if (m == 16 && n == 8 && k == 64 && "e5m2" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_f32_e5m2_e5m2_f32;
if (m == 16 && n == 8 && k == 64 && "e5m2" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f32_e5m2_e5m2_f32;
if (m == 16 && n == 8 && k == 64 && "e5m2" == eltypeA && "e3m2" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f16_e5m2_e3m2_f16;
if (m == 16 && n == 8 && k == 64 && "e5m2" == eltypeA && "e3m2" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f32_e5m2_e3m2_f32;
if (m == 16 && n == 8 && k == 64 && "e5m2" == eltypeA && "e2m3" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f16_e5m2_e2m3_f16;
if (m == 16 && n == 8 && k == 64 && "e5m2" == eltypeA && "e2m3" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f32_e5m2_e2m3_f32;
if (m == 16 && n == 8 && k == 64 && "e5m2" == eltypeA && "e2m1" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f16_e5m2_e2m1_f16;
if (m == 16 && n == 8 && k == 64 && "e5m2" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f32_e5m2_e2m1_f32;
if (m == 16 && n == 8 && k == 64 && "e3m2" == eltypeA && "e4m3" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f16_e3m2_e4m3_f16;
if (m == 16 && n == 8 && k == 64 && "e3m2" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f32_e3m2_e4m3_f32;
if (m == 16 && n == 8 && k == 64 && "e3m2" == eltypeA && "e5m2" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f16_e3m2_e5m2_f16;
if (m == 16 && n == 8 && k == 64 && "e3m2" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f32_e3m2_e5m2_f32;
if (m == 16 && n == 8 && k == 64 && "e3m2" == eltypeA && "e3m2" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f16_e3m2_e3m2_f16;
if (m == 16 && n == 8 && k == 64 && "e3m2" == eltypeA && "e3m2" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f32_e3m2_e3m2_f32;
if (m == 16 && n == 8 && k == 64 && "e3m2" == eltypeA && "e2m3" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f16_e3m2_e2m3_f16;
if (m == 16 && n == 8 && k == 64 && "e3m2" == eltypeA && "e2m3" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f32_e3m2_e2m3_f32;
if (m == 16 && n == 8 && k == 64 && "e3m2" == eltypeA && "e2m1" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f16_e3m2_e2m1_f16;
if (m == 16 && n == 8 && k == 64 && "e3m2" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f32_e3m2_e2m1_f32;
if (m == 16 && n == 8 && k == 64 && "e2m3" == eltypeA && "e4m3" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f16_e2m3_e4m3_f16;
if (m == 16 && n == 8 && k == 64 && "e2m3" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f32_e2m3_e4m3_f32;
if (m == 16 && n == 8 && k == 64 && "e2m3" == eltypeA && "e5m2" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f16_e2m3_e5m2_f16;
if (m == 16 && n == 8 && k == 64 && "e2m3" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f32_e2m3_e5m2_f32;
if (m == 16 && n == 8 && k == 64 && "e2m3" == eltypeA && "e3m2" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f16_e2m3_e3m2_f16;
if (m == 16 && n == 8 && k == 64 && "e2m3" == eltypeA && "e3m2" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f32_e2m3_e3m2_f32;
if (m == 16 && n == 8 && k == 64 && "e2m3" == eltypeA && "e2m3" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f16_e2m3_e2m3_f16;
if (m == 16 && n == 8 && k == 64 && "e2m3" == eltypeA && "e2m3" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f32_e2m3_e2m3_f32;
if (m == 16 && n == 8 && k == 64 && "e2m3" == eltypeA && "e2m1" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f16_e2m3_e2m1_f16;
if (m == 16 && n == 8 && k == 64 && "e2m3" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f32_e2m3_e2m1_f32;
if (m == 16 && n == 8 && k == 64 && "e2m1" == eltypeA && "e4m3" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f16_e2m1_e4m3_f16;
if (m == 16 && n == 8 && k == 64 && "e2m1" == eltypeA && "e4m3" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f32_e2m1_e4m3_f32;
if (m == 16 && n == 8 && k == 64 && "e2m1" == eltypeA && "e5m2" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f16_e2m1_e5m2_f16;
if (m == 16 && n == 8 && k == 64 && "e2m1" == eltypeA && "e5m2" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f32_e2m1_e5m2_f32;
if (m == 16 && n == 8 && k == 64 && "e2m1" == eltypeA && "e3m2" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f16_e2m1_e3m2_f16;
if (m == 16 && n == 8 && k == 64 && "e2m1" == eltypeA && "e3m2" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f32_e2m1_e3m2_f32;
if (m == 16 && n == 8 && k == 64 && "e2m1" == eltypeA && "e2m3" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f16_e2m1_e2m3_f16;
if (m == 16 && n == 8 && k == 64 && "e2m1" == eltypeA && "e2m3" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f32_e2m1_e2m3_f32;
if (m == 16 && n == 8 && k == 64 && "e2m1" == eltypeA && "e2m1" == eltypeB && "f16" == eltypeC && "f16" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f16_e2m1_e2m1_f16;
if (m == 16 && n == 8 && k == 64 && "e2m1" == eltypeA && "e2m1" == eltypeB && "f32" == eltypeC && "f32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_kind_f8f6f4_f32_e2m1_e2m1_f32;
if (m == 16 && n == 8 && k == 64 && "s4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k64_row_col_s4;
if (m == 16 && n == 8 && k == 64 && "s4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k64_row_col_satfinite_s4;
if (m == 16 && n == 8 && k == 64 && "s4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_s4;
if (m == 16 && n == 8 && k == 64 && "s4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_satfinite_s4;
if (m == 16 && n == 8 && k == 64 && "s4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k64_row_col_s4_u4;
if (m == 16 && n == 8 && k == 64 && "s4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k64_row_col_satfinite_s4_u4;
if (m == 16 && n == 8 && k == 64 && "s4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_s4_u4;
if (m == 16 && n == 8 && k == 64 && "s4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_satfinite_s4_u4;
if (m == 16 && n == 8 && k == 64 && "u4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k64_row_col_u4_s4;
if (m == 16 && n == 8 && k == 64 && "u4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k64_row_col_satfinite_u4_s4;
if (m == 16 && n == 8 && k == 64 && "u4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_u4_s4;
if (m == 16 && n == 8 && k == 64 && "u4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_satfinite_u4_s4;
if (m == 16 && n == 8 && k == 64 && "u4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k64_row_col_u4;
if (m == 16 && n == 8 && k == 64 && "u4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k64_row_col_satfinite_u4;
if (m == 16 && n == 8 && k == 64 && "u4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_u4;
if (m == 16 && n == 8 && k == 64 && "u4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_satfinite_u4;
if (m == 16 && n == 8 && k == 128 && "s4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k128_row_col_s4;
if (m == 16 && n == 8 && k == 128 && "s4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k128_row_col_satfinite_s4;
if (m == 16 && n == 8 && k == 128 && "s4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k128_row_col_s4;
if (m == 16 && n == 8 && k == 128 && "s4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k128_row_col_satfinite_s4;
if (m == 16 && n == 8 && k == 128 && "s4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k128_row_col_s4_u4;
if (m == 16 && n == 8 && k == 128 && "s4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k128_row_col_satfinite_s4_u4;
if (m == 16 && n == 8 && k == 128 && "s4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k128_row_col_s4_u4;
if (m == 16 && n == 8 && k == 128 && "s4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k128_row_col_satfinite_s4_u4;
if (m == 16 && n == 8 && k == 128 && "u4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k128_row_col_u4_s4;
if (m == 16 && n == 8 && k == 128 && "u4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k128_row_col_satfinite_u4_s4;
if (m == 16 && n == 8 && k == 128 && "u4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k128_row_col_u4_s4;
if (m == 16 && n == 8 && k == 128 && "u4" == eltypeA && "s4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k128_row_col_satfinite_u4_s4;
if (m == 16 && n == 8 && k == 128 && "u4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k128_row_col_u4;
if (m == 16 && n == 8 && k == 128 && "u4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k128_row_col_satfinite_u4;
if (m == 16 && n == 8 && k == 128 && "u4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k128_row_col_u4;
if (m == 16 && n == 8 && k == 128 && "u4" == eltypeA && "u4" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k128_row_col_satfinite_u4;
if (m == 16 && n == 8 && k == 32 && "s8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k32_row_col_s8;
if (m == 16 && n == 8 && k == 32 && "s8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k32_row_col_satfinite_s8;
if (m == 16 && n == 8 && k == 32 && "s8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k32_row_col_s8;
if (m == 16 && n == 8 && k == 32 && "s8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k32_row_col_satfinite_s8;
if (m == 16 && n == 8 && k == 32 && "s8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k32_row_col_s8_u8;
if (m == 16 && n == 8 && k == 32 && "s8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k32_row_col_satfinite_s8_u8;
if (m == 16 && n == 8 && k == 32 && "s8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k32_row_col_s8_u8;
if (m == 16 && n == 8 && k == 32 && "s8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k32_row_col_satfinite_s8_u8;
if (m == 16 && n == 8 && k == 32 && "u8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k32_row_col_u8_s8;
if (m == 16 && n == 8 && k == 32 && "u8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k32_row_col_satfinite_u8_s8;
if (m == 16 && n == 8 && k == 32 && "u8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k32_row_col_u8_s8;
if (m == 16 && n == 8 && k == 32 && "u8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k32_row_col_satfinite_u8_s8;
if (m == 16 && n == 8 && k == 32 && "u8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k32_row_col_u8;
if (m == 16 && n == 8 && k == 32 && "u8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k32_row_col_satfinite_u8;
if (m == 16 && n == 8 && k == 32 && "u8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k32_row_col_u8;
if (m == 16 && n == 8 && k == 32 && "u8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k32_row_col_satfinite_u8;
if (m == 16 && n == 8 && k == 64 && "s8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k64_row_col_s8;
if (m == 16 && n == 8 && k == 64 && "s8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k64_row_col_satfinite_s8;
if (m == 16 && n == 8 && k == 64 && "s8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_s8;
if (m == 16 && n == 8 && k == 64 && "s8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_satfinite_s8;
if (m == 16 && n == 8 && k == 64 && "s8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k64_row_col_s8_u8;
if (m == 16 && n == 8 && k == 64 && "s8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k64_row_col_satfinite_s8_u8;
if (m == 16 && n == 8 && k == 64 && "s8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_s8_u8;
if (m == 16 && n == 8 && k == 64 && "s8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_satfinite_s8_u8;
if (m == 16 && n == 8 && k == 64 && "u8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k64_row_col_u8_s8;
if (m == 16 && n == 8 && k == 64 && "u8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k64_row_col_satfinite_u8_s8;
if (m == 16 && n == 8 && k == 64 && "u8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_u8_s8;
if (m == 16 && n == 8 && k == 64 && "u8" == eltypeA && "s8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_satfinite_u8_s8;
if (m == 16 && n == 8 && k == 64 && "u8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k64_row_col_u8;
if (m == 16 && n == 8 && k == 64 && "u8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && !orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_m16n8k64_row_col_satfinite_u8;
if (m == 16 && n == 8 && k == 64 && "u8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 0 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_u8;
if (m == 16 && n == 8 && k == 64 && "u8" == eltypeA && "u8" == eltypeB && "s32" == eltypeC && "s32" == eltypeD && (satf.has_value() ? 1 == static_cast<int>(*satf) : true) && orderedMetadata)
return llvm::Intrinsic::nvvm_mma_sp_ordered_metadata_m16n8k64_row_col_satfinite_u8;
return 0;
}
static std::optional<mlir::NVVM::MMATypes> inferOperandMMAType(Type operandElType,
bool isAccumulator);
MMATypes accumPtxType();
MMATypes resultPtxType();
static mlir::NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase& builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::MmaSpOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::MmaSpOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::MovMatrixOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class MovMatrixOpGenericAdaptorBase {
public:
struct Properties {
using eltTypeTy = ::mlir::NVVM::LdStMatrixEltTypeAttr;
eltTypeTy eltType;
auto getEltType() const {
auto &propStorage = this->eltType;
return ::llvm::cast<::mlir::NVVM::LdStMatrixEltTypeAttr>(propStorage);
}
void setEltType(const ::mlir::NVVM::LdStMatrixEltTypeAttr &propValue) {
this->eltType = propValue;
}
using layoutTy = ::mlir::NVVM::MMALayoutAttr;
layoutTy layout;
auto getLayout() const {
auto &propStorage = this->layout;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMALayoutAttr>(propStorage);
}
void setLayout(const ::mlir::NVVM::MMALayoutAttr &propValue) {
this->layout = propValue;
}
using shapeTy = ::mlir::NVVM::LdStMatrixShapeAttr;
shapeTy shape;
auto getShape() const {
auto &propStorage = this->shape;
return ::llvm::cast<::mlir::NVVM::LdStMatrixShapeAttr>(propStorage);
}
void setShape(const ::mlir::NVVM::LdStMatrixShapeAttr &propValue) {
this->shape = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.eltType == this->eltType &&
rhs.layout == this->layout &&
rhs.shape == this->shape &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
MovMatrixOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.movmatrix", odsAttrs.getContext());
}
MovMatrixOpGenericAdaptorBase(MovMatrixOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::LdStMatrixShapeAttr getShapeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::LdStMatrixShapeAttr>(getProperties().shape);
return attr;
}
::mlir::NVVM::LdStMatrixShapeAttr getShape();
::mlir::NVVM::MMALayoutAttr getLayoutAttr();
::mlir::NVVM::MMALayout getLayout();
::mlir::NVVM::LdStMatrixEltTypeAttr getEltTypeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::LdStMatrixEltTypeAttr>(getProperties().eltType);
return attr;
}
::mlir::NVVM::LdStMatrixEltType getEltType();
};
} // namespace detail
template <typename RangeT>
class MovMatrixOpGenericAdaptor : public detail::MovMatrixOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::MovMatrixOpGenericAdaptorBase;
static constexpr int odsIndex_src = 0;
public:
MovMatrixOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
MovMatrixOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MovMatrixOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
MovMatrixOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MovMatrixOpGenericAdaptor(values, attrs, Properties{}, {}) {}
MovMatrixOpGenericAdaptor(RangeT values, const MovMatrixOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = MovMatrixOp, typename = std::enable_if_t<std::is_same_v<LateInst, MovMatrixOp>>>
MovMatrixOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrc() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class MovMatrixOpAdaptor : public MovMatrixOpGenericAdaptor<::mlir::ValueRange> {
public:
using MovMatrixOpGenericAdaptor::MovMatrixOpGenericAdaptor;
MovMatrixOpAdaptor(MovMatrixOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class MovMatrixOp : public ::mlir::Op<MovMatrixOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<750>::Impl, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = MovMatrixOpAdaptor;
template <typename RangeT>
using GenericAdaptor = MovMatrixOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("eltType"), ::llvm::StringRef("layout"), ::llvm::StringRef("shape")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getEltTypeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getEltTypeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getLayoutAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getLayoutAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getShapeAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getShapeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.movmatrix");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getDst() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::LdStMatrixShapeAttr getShapeAttr() {
return ::llvm::cast<::mlir::NVVM::LdStMatrixShapeAttr>(getProperties().shape);
}
::mlir::NVVM::LdStMatrixShapeAttr getShape();
::mlir::NVVM::MMALayoutAttr getLayoutAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMALayoutAttr>(getProperties().layout);
}
::mlir::NVVM::MMALayout getLayout();
::mlir::NVVM::LdStMatrixEltTypeAttr getEltTypeAttr() {
return ::llvm::cast<::mlir::NVVM::LdStMatrixEltTypeAttr>(getProperties().eltType);
}
::mlir::NVVM::LdStMatrixEltType getEltType();
void setShapeAttr(::mlir::NVVM::LdStMatrixShapeAttr attr) {
getProperties().shape = attr;
}
void setLayoutAttr(::mlir::NVVM::MMALayoutAttr attr) {
getProperties().layout = attr;
}
void setLayout(::mlir::NVVM::MMALayout attrValue);
void setEltTypeAttr(::mlir::NVVM::LdStMatrixEltTypeAttr attr) {
getProperties().eltType = attr;
}
void setEltType(::mlir::NVVM::LdStMatrixEltType attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::LdStMatrixEltTypeAttr eltType);
static MovMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::LdStMatrixEltTypeAttr eltType);
static MovMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::LdStMatrixEltTypeAttr eltType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value src, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::LdStMatrixEltTypeAttr eltType);
static MovMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value src, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::LdStMatrixEltTypeAttr eltType);
static MovMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value src, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::LdStMatrixEltTypeAttr eltType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::LdStMatrixEltTypeAttr eltType);
static MovMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::LdStMatrixEltTypeAttr eltType);
static MovMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::LdStMatrixEltTypeAttr eltType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type dst, ::mlir::Value src, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::LdStMatrixEltType eltType);
static MovMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type dst, ::mlir::Value src, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::LdStMatrixEltType eltType);
static MovMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type dst, ::mlir::Value src, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::LdStMatrixEltType eltType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value src, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::LdStMatrixEltType eltType);
static MovMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value src, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::LdStMatrixEltType eltType);
static MovMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value src, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::LdStMatrixEltType eltType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::LdStMatrixEltType eltType);
static MovMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::LdStMatrixEltType eltType);
static MovMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::LdStMatrixEltType eltType);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MovMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MovMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MovMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static MovMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MovMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MovMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MovMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static MovMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 3 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::MovMatrixOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::MovMatrixOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::NanosleepOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class NanosleepOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
NanosleepOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.nanosleep", odsAttrs.getContext());
}
NanosleepOpGenericAdaptorBase(NanosleepOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class NanosleepOpGenericAdaptor : public detail::NanosleepOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::NanosleepOpGenericAdaptorBase;
static constexpr int odsIndex_duration = 0;
public:
NanosleepOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
NanosleepOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : NanosleepOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
NanosleepOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : NanosleepOpGenericAdaptor(values, attrs, Properties{}, {}) {}
NanosleepOpGenericAdaptor(RangeT values, const NanosleepOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = NanosleepOp, typename = std::enable_if_t<std::is_same_v<LateInst, NanosleepOp>>>
NanosleepOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getDuration() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class NanosleepOpAdaptor : public NanosleepOpGenericAdaptor<::mlir::ValueRange> {
public:
using NanosleepOpGenericAdaptor::NanosleepOpGenericAdaptor;
NanosleepOpAdaptor(NanosleepOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class NanosleepOp : public ::mlir::Op<NanosleepOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants> {
public:
using Op::Op;
using Op::print;
using Adaptor = NanosleepOpAdaptor;
template <typename RangeT>
using GenericAdaptor = NanosleepOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_duration = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.nanosleep");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getDuration() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getDurationMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value duration);
static NanosleepOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value duration);
static NanosleepOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value duration);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value duration);
static NanosleepOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value duration);
static NanosleepOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value duration);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static NanosleepOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static NanosleepOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static NanosleepOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static NanosleepOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::NanosleepOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::PMEventOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class PMEventOpGenericAdaptorBase {
public:
struct Properties {
using eventIdTy = ::mlir::IntegerAttr;
eventIdTy eventId;
auto getEventId() const {
auto &propStorage = this->eventId;
return ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(propStorage);
}
void setEventId(const ::mlir::IntegerAttr &propValue) {
this->eventId = propValue;
}
using maskedEventIdTy = ::mlir::IntegerAttr;
maskedEventIdTy maskedEventId;
auto getMaskedEventId() const {
auto &propStorage = this->maskedEventId;
return ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(propStorage);
}
void setMaskedEventId(const ::mlir::IntegerAttr &propValue) {
this->maskedEventId = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.eventId == this->eventId &&
rhs.maskedEventId == this->maskedEventId &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
PMEventOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.pmevent", odsAttrs.getContext());
}
PMEventOpGenericAdaptorBase(PMEventOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::IntegerAttr getMaskedEventIdAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().maskedEventId);
return attr;
}
::std::optional<uint16_t> getMaskedEventId();
::mlir::IntegerAttr getEventIdAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().eventId);
return attr;
}
::std::optional<uint32_t> getEventId();
};
} // namespace detail
template <typename RangeT>
class PMEventOpGenericAdaptor : public detail::PMEventOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::PMEventOpGenericAdaptorBase;
public:
PMEventOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
PMEventOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : PMEventOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
PMEventOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : PMEventOpGenericAdaptor(values, attrs, Properties{}, {}) {}
PMEventOpGenericAdaptor(RangeT values, const PMEventOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = PMEventOp, typename = std::enable_if_t<std::is_same_v<LateInst, PMEventOp>>>
PMEventOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class PMEventOpAdaptor : public PMEventOpGenericAdaptor<::mlir::ValueRange> {
public:
using PMEventOpGenericAdaptor::PMEventOpGenericAdaptor;
PMEventOpAdaptor(PMEventOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class PMEventOp : public ::mlir::Op<PMEventOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = PMEventOpAdaptor;
template <typename RangeT>
using GenericAdaptor = PMEventOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("eventId"), ::llvm::StringRef("maskedEventId")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getEventIdAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getEventIdAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getMaskedEventIdAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getMaskedEventIdAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.pmevent");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::IntegerAttr getMaskedEventIdAttr() {
return ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().maskedEventId);
}
::std::optional<uint16_t> getMaskedEventId();
::mlir::IntegerAttr getEventIdAttr() {
return ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().eventId);
}
::std::optional<uint32_t> getEventId();
void setMaskedEventIdAttr(::mlir::IntegerAttr attr) {
getProperties().maskedEventId = attr;
}
void setMaskedEventId(::std::optional<uint16_t> attrValue);
void setEventIdAttr(::mlir::IntegerAttr attr) {
getProperties().eventId = attr;
}
void setEventId(::std::optional<uint32_t> attrValue);
::mlir::Attribute removeMaskedEventIdAttr() {
auto attr = getProperties().maskedEventId;
getProperties().maskedEventId = {};
return attr;
}
::mlir::Attribute removeEventIdAttr() {
auto attr = getProperties().eventId;
getProperties().eventId = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::IntegerAttr maskedEventId, /*optional*/::mlir::IntegerAttr eventId);
static PMEventOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::IntegerAttr maskedEventId, /*optional*/::mlir::IntegerAttr eventId);
static PMEventOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::IntegerAttr maskedEventId, /*optional*/::mlir::IntegerAttr eventId);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::IntegerAttr maskedEventId, /*optional*/::mlir::IntegerAttr eventId);
static PMEventOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::IntegerAttr maskedEventId, /*optional*/::mlir::IntegerAttr eventId);
static PMEventOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::IntegerAttr maskedEventId, /*optional*/::mlir::IntegerAttr eventId);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static PMEventOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static PMEventOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static PMEventOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static PMEventOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::PMEventOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::PMEventOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::PermuteOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class PermuteOpGenericAdaptorBase {
public:
struct Properties {
using modeTy = ::mlir::NVVM::PermuteModeAttr;
modeTy mode;
auto getMode() const {
auto &propStorage = this->mode;
return ::llvm::cast<::mlir::NVVM::PermuteModeAttr>(propStorage);
}
void setMode(const ::mlir::NVVM::PermuteModeAttr &propValue) {
this->mode = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.mode == this->mode &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
PermuteOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.prmt", odsAttrs.getContext());
}
PermuteOpGenericAdaptorBase(PermuteOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::PermuteModeAttr getModeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::PermuteModeAttr>(getProperties().mode);
return attr;
}
::mlir::NVVM::PermuteMode getMode();
};
} // namespace detail
template <typename RangeT>
class PermuteOpGenericAdaptor : public detail::PermuteOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::PermuteOpGenericAdaptorBase;
static constexpr int odsIndex_lo = 0;
static constexpr int odsIndex_hi = 1;
static constexpr int odsIndex_selector = 2;
public:
PermuteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
PermuteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : PermuteOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
PermuteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : PermuteOpGenericAdaptor(values, attrs, Properties{}, {}) {}
PermuteOpGenericAdaptor(RangeT values, const PermuteOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = PermuteOp, typename = std::enable_if_t<std::is_same_v<LateInst, PermuteOp>>>
PermuteOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getLo() {
return (*getODSOperands(0).begin());
}
ValueT getHi() {
auto operands = getODSOperands(1);
return operands.empty() ? ValueT{} : (*operands.begin());
}
ValueT getSelector() {
return (*getODSOperands(2).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class PermuteOpAdaptor : public PermuteOpGenericAdaptor<::mlir::ValueRange> {
public:
using PermuteOpGenericAdaptor::PermuteOpGenericAdaptor;
PermuteOpAdaptor(PermuteOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class PermuteOp : public ::mlir::Op<PermuteOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = PermuteOpAdaptor;
template <typename RangeT>
using GenericAdaptor = PermuteOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_lo = 0;
static constexpr int odsIndex_hi = 1;
static constexpr int odsIndex_selector = 2;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("mode")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getModeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getModeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.prmt");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getLo() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getHi() {
auto operands = getODSOperands(1);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::TypedValue<::mlir::IntegerType> getSelector() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin());
}
::mlir::OpOperand &getLoMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getHiMutable();
::mlir::OpOperand &getSelectorMutable() {
auto range = getODSOperandIndexAndLength(2);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::PermuteModeAttr getModeAttr() {
return ::llvm::cast<::mlir::NVVM::PermuteModeAttr>(getProperties().mode);
}
::mlir::NVVM::PermuteMode getMode();
void setModeAttr(::mlir::NVVM::PermuteModeAttr attr) {
getProperties().mode = attr;
}
void setMode(::mlir::NVVM::PermuteMode attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value lo, /*optional*/::mlir::Value hi, ::mlir::Value selector, ::mlir::NVVM::PermuteModeAttr mode);
static PermuteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lo, /*optional*/::mlir::Value hi, ::mlir::Value selector, ::mlir::NVVM::PermuteModeAttr mode);
static PermuteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lo, /*optional*/::mlir::Value hi, ::mlir::Value selector, ::mlir::NVVM::PermuteModeAttr mode);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lo, /*optional*/::mlir::Value hi, ::mlir::Value selector, ::mlir::NVVM::PermuteModeAttr mode);
static PermuteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lo, /*optional*/::mlir::Value hi, ::mlir::Value selector, ::mlir::NVVM::PermuteModeAttr mode);
static PermuteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lo, /*optional*/::mlir::Value hi, ::mlir::Value selector, ::mlir::NVVM::PermuteModeAttr mode);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lo, /*optional*/::mlir::Value hi, ::mlir::Value selector, ::mlir::NVVM::PermuteModeAttr mode);
static PermuteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lo, /*optional*/::mlir::Value hi, ::mlir::Value selector, ::mlir::NVVM::PermuteModeAttr mode);
static PermuteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lo, /*optional*/::mlir::Value hi, ::mlir::Value selector, ::mlir::NVVM::PermuteModeAttr mode);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value lo, /*optional*/::mlir::Value hi, ::mlir::Value selector, ::mlir::NVVM::PermuteMode mode);
static PermuteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lo, /*optional*/::mlir::Value hi, ::mlir::Value selector, ::mlir::NVVM::PermuteMode mode);
static PermuteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lo, /*optional*/::mlir::Value hi, ::mlir::Value selector, ::mlir::NVVM::PermuteMode mode);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lo, /*optional*/::mlir::Value hi, ::mlir::Value selector, ::mlir::NVVM::PermuteMode mode);
static PermuteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lo, /*optional*/::mlir::Value hi, ::mlir::Value selector, ::mlir::NVVM::PermuteMode mode);
static PermuteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lo, /*optional*/::mlir::Value hi, ::mlir::Value selector, ::mlir::NVVM::PermuteMode mode);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lo, /*optional*/::mlir::Value hi, ::mlir::Value selector, ::mlir::NVVM::PermuteMode mode);
static PermuteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lo, /*optional*/::mlir::Value hi, ::mlir::Value selector, ::mlir::NVVM::PermuteMode mode);
static PermuteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lo, /*optional*/::mlir::Value hi, ::mlir::Value selector, ::mlir::NVVM::PermuteMode mode);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static PermuteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static PermuteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static PermuteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static PermuteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static PermuteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static PermuteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static PermuteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static PermuteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::PermuteOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::PermuteOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::PrefetchOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class PrefetchOpGenericAdaptorBase {
public:
struct Properties {
using cacheLevelTy = ::mlir::NVVM::PrefetchCacheLevelAttr;
cacheLevelTy cacheLevel;
auto getCacheLevel() const {
auto &propStorage = this->cacheLevel;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::PrefetchCacheLevelAttr>(propStorage);
}
void setCacheLevel(const ::mlir::NVVM::PrefetchCacheLevelAttr &propValue) {
this->cacheLevel = propValue;
}
using evictPriorityTy = ::mlir::NVVM::CacheEvictionPriorityAttr;
evictPriorityTy evictPriority;
auto getEvictPriority() const {
auto &propStorage = this->evictPriority;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::CacheEvictionPriorityAttr>(propStorage);
}
void setEvictPriority(const ::mlir::NVVM::CacheEvictionPriorityAttr &propValue) {
this->evictPriority = propValue;
}
using in_param_spaceTy = ::mlir::UnitAttr;
in_param_spaceTy in_param_space;
auto getInParamSpace() const {
auto &propStorage = this->in_param_space;
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage);
}
void setInParamSpace(const ::mlir::UnitAttr &propValue) {
this->in_param_space = propValue;
}
using tensormapTy = ::mlir::UnitAttr;
tensormapTy tensormap;
auto getTensormap() const {
auto &propStorage = this->tensormap;
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage);
}
void setTensormap(const ::mlir::UnitAttr &propValue) {
this->tensormap = propValue;
}
using uniformTy = ::mlir::UnitAttr;
uniformTy uniform;
auto getUniform() const {
auto &propStorage = this->uniform;
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage);
}
void setUniform(const ::mlir::UnitAttr &propValue) {
this->uniform = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.cacheLevel == this->cacheLevel &&
rhs.evictPriority == this->evictPriority &&
rhs.in_param_space == this->in_param_space &&
rhs.tensormap == this->tensormap &&
rhs.uniform == this->uniform &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
PrefetchOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.prefetch", odsAttrs.getContext());
}
PrefetchOpGenericAdaptorBase(PrefetchOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::PrefetchCacheLevelAttr getCacheLevelAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::NVVM::PrefetchCacheLevelAttr>(getProperties().cacheLevel);
return attr;
}
::std::optional<::mlir::NVVM::PrefetchCacheLevel> getCacheLevel();
::mlir::NVVM::CacheEvictionPriorityAttr getEvictPriorityAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::NVVM::CacheEvictionPriorityAttr>(getProperties().evictPriority);
return attr;
}
::std::optional<::mlir::NVVM::CacheEvictionPriority> getEvictPriority();
::mlir::UnitAttr getTensormapAttr();
bool getTensormap();
::mlir::UnitAttr getUniformAttr();
bool getUniform();
::mlir::UnitAttr getInParamSpaceAttr();
bool getInParamSpace();
};
} // namespace detail
template <typename RangeT>
class PrefetchOpGenericAdaptor : public detail::PrefetchOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::PrefetchOpGenericAdaptorBase;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_predicate = 1;
public:
PrefetchOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
PrefetchOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : PrefetchOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
PrefetchOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : PrefetchOpGenericAdaptor(values, attrs, Properties{}, {}) {}
PrefetchOpGenericAdaptor(RangeT values, const PrefetchOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = PrefetchOp, typename = std::enable_if_t<std::is_same_v<LateInst, PrefetchOp>>>
PrefetchOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getAddr() {
return (*getODSOperands(0).begin());
}
ValueT getPredicate() {
auto operands = getODSOperands(1);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class PrefetchOpAdaptor : public PrefetchOpGenericAdaptor<::mlir::ValueRange> {
public:
using PrefetchOpGenericAdaptor::PrefetchOpGenericAdaptor;
PrefetchOpAdaptor(PrefetchOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class PrefetchOp : public ::mlir::Op<PrefetchOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::NVVM::BasicPtxBuilderInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = PrefetchOpAdaptor;
template <typename RangeT>
using GenericAdaptor = PrefetchOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_predicate = 1;
using Properties = FoldAdaptor::Properties;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<PrefetchOp>::getPredicate;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<PrefetchOp>::hasIntrinsic;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<PrefetchOp>::hasSideEffect;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<PrefetchOp>::makeConstantI32;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<PrefetchOp>::getAsmValues;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("cacheLevel"), ::llvm::StringRef("evictPriority"), ::llvm::StringRef("in_param_space"), ::llvm::StringRef("tensormap"), ::llvm::StringRef("uniform")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getCacheLevelAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getCacheLevelAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getEvictPriorityAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getEvictPriorityAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getInParamSpaceAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getInParamSpaceAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
::mlir::StringAttr getTensormapAttrName() {
return getAttributeNameForIndex(3);
}
static ::mlir::StringAttr getTensormapAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 3);
}
::mlir::StringAttr getUniformAttrName() {
return getAttributeNameForIndex(4);
}
static ::mlir::StringAttr getUniformAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 4);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.prefetch");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getAddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getPredicate() {
auto operands = getODSOperands(1);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getAddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getPredicateMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::PrefetchCacheLevelAttr getCacheLevelAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::PrefetchCacheLevelAttr>(getProperties().cacheLevel);
}
::std::optional<::mlir::NVVM::PrefetchCacheLevel> getCacheLevel();
::mlir::NVVM::CacheEvictionPriorityAttr getEvictPriorityAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::CacheEvictionPriorityAttr>(getProperties().evictPriority);
}
::std::optional<::mlir::NVVM::CacheEvictionPriority> getEvictPriority();
::mlir::UnitAttr getTensormapAttr() {
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().tensormap);
}
bool getTensormap();
::mlir::UnitAttr getUniformAttr() {
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().uniform);
}
bool getUniform();
::mlir::UnitAttr getInParamSpaceAttr() {
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().in_param_space);
}
bool getInParamSpace();
void setCacheLevelAttr(::mlir::NVVM::PrefetchCacheLevelAttr attr) {
getProperties().cacheLevel = attr;
}
void setCacheLevel(::std::optional<::mlir::NVVM::PrefetchCacheLevel> attrValue);
void setEvictPriorityAttr(::mlir::NVVM::CacheEvictionPriorityAttr attr) {
getProperties().evictPriority = attr;
}
void setEvictPriority(::std::optional<::mlir::NVVM::CacheEvictionPriority> attrValue);
void setTensormapAttr(::mlir::UnitAttr attr) {
getProperties().tensormap = attr;
}
void setTensormap(bool attrValue);
void setUniformAttr(::mlir::UnitAttr attr) {
getProperties().uniform = attr;
}
void setUniform(bool attrValue);
void setInParamSpaceAttr(::mlir::UnitAttr attr) {
getProperties().in_param_space = attr;
}
void setInParamSpace(bool attrValue);
::mlir::Attribute removeCacheLevelAttr() {
auto attr = getProperties().cacheLevel;
getProperties().cacheLevel = {};
return attr;
}
::mlir::Attribute removeEvictPriorityAttr() {
auto attr = getProperties().evictPriority;
getProperties().evictPriority = {};
return attr;
}
::mlir::Attribute removeTensormapAttr() {
auto attr = getProperties().tensormap;
getProperties().tensormap = {};
return attr;
}
::mlir::Attribute removeUniformAttr() {
auto attr = getProperties().uniform;
getProperties().uniform = {};
return attr;
}
::mlir::Attribute removeInParamSpaceAttr() {
auto attr = getProperties().in_param_space;
getProperties().in_param_space = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::NVVM::PrefetchCacheLevelAttr cacheLevel, /*optional*/::mlir::NVVM::CacheEvictionPriorityAttr evictPriority, ::mlir::Value addr, /*optional*/::mlir::Value predicate, /*optional*/::mlir::UnitAttr tensormap, /*optional*/::mlir::UnitAttr uniform = nullptr, /*optional*/::mlir::UnitAttr in_param_space = nullptr);
static PrefetchOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::NVVM::PrefetchCacheLevelAttr cacheLevel, /*optional*/::mlir::NVVM::CacheEvictionPriorityAttr evictPriority, ::mlir::Value addr, /*optional*/::mlir::Value predicate, /*optional*/::mlir::UnitAttr tensormap, /*optional*/::mlir::UnitAttr uniform = nullptr, /*optional*/::mlir::UnitAttr in_param_space = nullptr);
static PrefetchOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::NVVM::PrefetchCacheLevelAttr cacheLevel, /*optional*/::mlir::NVVM::CacheEvictionPriorityAttr evictPriority, ::mlir::Value addr, /*optional*/::mlir::Value predicate, /*optional*/::mlir::UnitAttr tensormap, /*optional*/::mlir::UnitAttr uniform = nullptr, /*optional*/::mlir::UnitAttr in_param_space = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::NVVM::PrefetchCacheLevelAttr cacheLevel, /*optional*/::mlir::NVVM::CacheEvictionPriorityAttr evictPriority, ::mlir::Value addr, /*optional*/::mlir::Value predicate, /*optional*/::mlir::UnitAttr tensormap, /*optional*/::mlir::UnitAttr uniform = nullptr, /*optional*/::mlir::UnitAttr in_param_space = nullptr);
static PrefetchOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::NVVM::PrefetchCacheLevelAttr cacheLevel, /*optional*/::mlir::NVVM::CacheEvictionPriorityAttr evictPriority, ::mlir::Value addr, /*optional*/::mlir::Value predicate, /*optional*/::mlir::UnitAttr tensormap, /*optional*/::mlir::UnitAttr uniform = nullptr, /*optional*/::mlir::UnitAttr in_param_space = nullptr);
static PrefetchOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::NVVM::PrefetchCacheLevelAttr cacheLevel, /*optional*/::mlir::NVVM::CacheEvictionPriorityAttr evictPriority, ::mlir::Value addr, /*optional*/::mlir::Value predicate, /*optional*/::mlir::UnitAttr tensormap, /*optional*/::mlir::UnitAttr uniform = nullptr, /*optional*/::mlir::UnitAttr in_param_space = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::NVVM::PrefetchCacheLevelAttr cacheLevel, /*optional*/::mlir::NVVM::CacheEvictionPriorityAttr evictPriority, ::mlir::Value addr, /*optional*/::mlir::Value predicate, /*optional*/bool tensormap = false, /*optional*/bool uniform = false, /*optional*/bool in_param_space = false);
static PrefetchOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::NVVM::PrefetchCacheLevelAttr cacheLevel, /*optional*/::mlir::NVVM::CacheEvictionPriorityAttr evictPriority, ::mlir::Value addr, /*optional*/::mlir::Value predicate, /*optional*/bool tensormap = false, /*optional*/bool uniform = false, /*optional*/bool in_param_space = false);
static PrefetchOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::NVVM::PrefetchCacheLevelAttr cacheLevel, /*optional*/::mlir::NVVM::CacheEvictionPriorityAttr evictPriority, ::mlir::Value addr, /*optional*/::mlir::Value predicate, /*optional*/bool tensormap = false, /*optional*/bool uniform = false, /*optional*/bool in_param_space = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::NVVM::PrefetchCacheLevelAttr cacheLevel, /*optional*/::mlir::NVVM::CacheEvictionPriorityAttr evictPriority, ::mlir::Value addr, /*optional*/::mlir::Value predicate, /*optional*/bool tensormap = false, /*optional*/bool uniform = false, /*optional*/bool in_param_space = false);
static PrefetchOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::NVVM::PrefetchCacheLevelAttr cacheLevel, /*optional*/::mlir::NVVM::CacheEvictionPriorityAttr evictPriority, ::mlir::Value addr, /*optional*/::mlir::Value predicate, /*optional*/bool tensormap = false, /*optional*/bool uniform = false, /*optional*/bool in_param_space = false);
static PrefetchOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::NVVM::PrefetchCacheLevelAttr cacheLevel, /*optional*/::mlir::NVVM::CacheEvictionPriorityAttr evictPriority, ::mlir::Value addr, /*optional*/::mlir::Value predicate, /*optional*/bool tensormap = false, /*optional*/bool uniform = false, /*optional*/bool in_param_space = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static PrefetchOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static PrefetchOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static PrefetchOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static PrefetchOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
std::string getPtx();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 5 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(NVVM::PrefetchOp &op,LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
bool hasIntrinsic() { return !getPredicate() || !getTensormap(); }
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::PrefetchOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::PrefetchOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::RcpApproxFtzF32Op declarations
//===----------------------------------------------------------------------===//
namespace detail {
class RcpApproxFtzF32OpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
RcpApproxFtzF32OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.rcp.approx.ftz.f", odsAttrs.getContext());
}
RcpApproxFtzF32OpGenericAdaptorBase(RcpApproxFtzF32Op op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class RcpApproxFtzF32OpGenericAdaptor : public detail::RcpApproxFtzF32OpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::RcpApproxFtzF32OpGenericAdaptorBase;
static constexpr int odsIndex_arg = 0;
public:
RcpApproxFtzF32OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
RcpApproxFtzF32OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : RcpApproxFtzF32OpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
RcpApproxFtzF32OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : RcpApproxFtzF32OpGenericAdaptor(values, attrs, Properties{}, {}) {}
RcpApproxFtzF32OpGenericAdaptor(RangeT values, const RcpApproxFtzF32OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = RcpApproxFtzF32Op, typename = std::enable_if_t<std::is_same_v<LateInst, RcpApproxFtzF32Op>>>
RcpApproxFtzF32OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getArg() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class RcpApproxFtzF32OpAdaptor : public RcpApproxFtzF32OpGenericAdaptor<::mlir::ValueRange> {
public:
using RcpApproxFtzF32OpGenericAdaptor::RcpApproxFtzF32OpGenericAdaptor;
RcpApproxFtzF32OpAdaptor(RcpApproxFtzF32Op op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class RcpApproxFtzF32Op : public ::mlir::Op<RcpApproxFtzF32Op, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::FloatType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = RcpApproxFtzF32OpAdaptor;
template <typename RangeT>
using GenericAdaptor = RcpApproxFtzF32OpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_arg = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.rcp.approx.ftz.f");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::FloatType> getArg() {
return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getArgMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::FloatType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value arg);
static RcpApproxFtzF32Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value arg);
static RcpApproxFtzF32Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value arg);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arg);
static RcpApproxFtzF32Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arg);
static RcpApproxFtzF32Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value arg);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg);
static RcpApproxFtzF32Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg);
static RcpApproxFtzF32Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static RcpApproxFtzF32Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static RcpApproxFtzF32Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static RcpApproxFtzF32Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static RcpApproxFtzF32Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static RcpApproxFtzF32Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static RcpApproxFtzF32Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static RcpApproxFtzF32Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static RcpApproxFtzF32Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::RcpApproxFtzF32Op)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ReduxOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ReduxOpGenericAdaptorBase {
public:
struct Properties {
using absTy = ::mlir::BoolAttr;
absTy abs;
auto getAbs() const {
auto &propStorage = this->abs;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setAbs(const ::mlir::BoolAttr &propValue) {
this->abs = propValue;
}
using kindTy = ::mlir::NVVM::ReductionKindAttr;
kindTy kind;
auto getKind() const {
auto &propStorage = this->kind;
return ::llvm::cast<::mlir::NVVM::ReductionKindAttr>(propStorage);
}
void setKind(const ::mlir::NVVM::ReductionKindAttr &propValue) {
this->kind = propValue;
}
using nanTy = ::mlir::BoolAttr;
nanTy nan;
auto getNan() const {
auto &propStorage = this->nan;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setNan(const ::mlir::BoolAttr &propValue) {
this->nan = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.abs == this->abs &&
rhs.kind == this->kind &&
rhs.nan == this->nan &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ReduxOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.redux.sync", odsAttrs.getContext());
}
ReduxOpGenericAdaptorBase(ReduxOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::ReductionKindAttr getKindAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::ReductionKindAttr>(getProperties().kind);
return attr;
}
::mlir::NVVM::ReductionKind getKind();
::mlir::BoolAttr getAbsAttr();
bool getAbs();
::mlir::BoolAttr getNanAttr();
bool getNan();
};
} // namespace detail
template <typename RangeT>
class ReduxOpGenericAdaptor : public detail::ReduxOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ReduxOpGenericAdaptorBase;
static constexpr int odsIndex_val = 0;
static constexpr int odsIndex_mask_and_clamp = 1;
public:
ReduxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ReduxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ReduxOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ReduxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ReduxOpGenericAdaptor(values, attrs, Properties{}, {}) {}
ReduxOpGenericAdaptor(RangeT values, const ReduxOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ReduxOp, typename = std::enable_if_t<std::is_same_v<LateInst, ReduxOp>>>
ReduxOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getVal() {
return (*getODSOperands(0).begin());
}
ValueT getMaskAndClamp() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ReduxOpAdaptor : public ReduxOpGenericAdaptor<::mlir::ValueRange> {
public:
using ReduxOpGenericAdaptor::ReduxOpGenericAdaptor;
ReduxOpAdaptor(ReduxOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ReduxOp : public ::mlir::Op<ReduxOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<800>::Impl, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ReduxOpAdaptor;
template <typename RangeT>
using GenericAdaptor = ReduxOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_val = 0;
static constexpr int odsIndex_mask_and_clamp = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("abs"), ::llvm::StringRef("kind"), ::llvm::StringRef("nan")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getAbsAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getAbsAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getKindAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getKindAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getNanAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getNanAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.redux.sync");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getVal() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getMaskAndClamp() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getValMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getMaskAndClampMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::ReductionKindAttr getKindAttr() {
return ::llvm::cast<::mlir::NVVM::ReductionKindAttr>(getProperties().kind);
}
::mlir::NVVM::ReductionKind getKind();
::mlir::BoolAttr getAbsAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().abs);
}
bool getAbs();
::mlir::BoolAttr getNanAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().nan);
}
bool getNan();
void setKindAttr(::mlir::NVVM::ReductionKindAttr attr) {
getProperties().kind = attr;
}
void setKind(::mlir::NVVM::ReductionKind attrValue);
void setAbsAttr(::mlir::BoolAttr attr) {
getProperties().abs = attr;
}
void setAbs(bool attrValue);
void setNanAttr(::mlir::BoolAttr attr) {
getProperties().nan = attr;
}
void setNan(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value val, ::mlir::NVVM::ReductionKindAttr kind, ::mlir::Value mask_and_clamp, ::mlir::BoolAttr abs = nullptr, ::mlir::BoolAttr nan = nullptr);
static ReduxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value val, ::mlir::NVVM::ReductionKindAttr kind, ::mlir::Value mask_and_clamp, ::mlir::BoolAttr abs = nullptr, ::mlir::BoolAttr nan = nullptr);
static ReduxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value val, ::mlir::NVVM::ReductionKindAttr kind, ::mlir::Value mask_and_clamp, ::mlir::BoolAttr abs = nullptr, ::mlir::BoolAttr nan = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value val, ::mlir::NVVM::ReductionKindAttr kind, ::mlir::Value mask_and_clamp, ::mlir::BoolAttr abs = nullptr, ::mlir::BoolAttr nan = nullptr);
static ReduxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value val, ::mlir::NVVM::ReductionKindAttr kind, ::mlir::Value mask_and_clamp, ::mlir::BoolAttr abs = nullptr, ::mlir::BoolAttr nan = nullptr);
static ReduxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value val, ::mlir::NVVM::ReductionKindAttr kind, ::mlir::Value mask_and_clamp, ::mlir::BoolAttr abs = nullptr, ::mlir::BoolAttr nan = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::NVVM::ReductionKindAttr kind, ::mlir::Value mask_and_clamp, ::mlir::BoolAttr abs = nullptr, ::mlir::BoolAttr nan = nullptr);
static ReduxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::NVVM::ReductionKindAttr kind, ::mlir::Value mask_and_clamp, ::mlir::BoolAttr abs = nullptr, ::mlir::BoolAttr nan = nullptr);
static ReduxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::NVVM::ReductionKindAttr kind, ::mlir::Value mask_and_clamp, ::mlir::BoolAttr abs = nullptr, ::mlir::BoolAttr nan = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value val, ::mlir::NVVM::ReductionKind kind, ::mlir::Value mask_and_clamp, bool abs = false, bool nan = false);
static ReduxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value val, ::mlir::NVVM::ReductionKind kind, ::mlir::Value mask_and_clamp, bool abs = false, bool nan = false);
static ReduxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value val, ::mlir::NVVM::ReductionKind kind, ::mlir::Value mask_and_clamp, bool abs = false, bool nan = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value val, ::mlir::NVVM::ReductionKind kind, ::mlir::Value mask_and_clamp, bool abs = false, bool nan = false);
static ReduxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value val, ::mlir::NVVM::ReductionKind kind, ::mlir::Value mask_and_clamp, bool abs = false, bool nan = false);
static ReduxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value val, ::mlir::NVVM::ReductionKind kind, ::mlir::Value mask_and_clamp, bool abs = false, bool nan = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::NVVM::ReductionKind kind, ::mlir::Value mask_and_clamp, bool abs = false, bool nan = false);
static ReduxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::NVVM::ReductionKind kind, ::mlir::Value mask_and_clamp, bool abs = false, bool nan = false);
static ReduxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::NVVM::ReductionKind kind, ::mlir::Value mask_and_clamp, bool abs = false, bool nan = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ReduxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ReduxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ReduxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ReduxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ReduxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ReduxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ReduxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ReduxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 3 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ReduxOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ReduxOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::RsqrtOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class RsqrtOpGenericAdaptorBase {
public:
struct Properties {
using ftzTy = ::mlir::BoolAttr;
ftzTy ftz;
auto getFtz() const {
auto &propStorage = this->ftz;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setFtz(const ::mlir::BoolAttr &propValue) {
this->ftz = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.ftz == this->ftz &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
RsqrtOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.rsqrt", odsAttrs.getContext());
}
RsqrtOpGenericAdaptorBase(RsqrtOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::BoolAttr getFtzAttr();
bool getFtz();
};
} // namespace detail
template <typename RangeT>
class RsqrtOpGenericAdaptor : public detail::RsqrtOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::RsqrtOpGenericAdaptorBase;
static constexpr int odsIndex_src = 0;
public:
RsqrtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
RsqrtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : RsqrtOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
RsqrtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : RsqrtOpGenericAdaptor(values, attrs, Properties{}, {}) {}
RsqrtOpGenericAdaptor(RangeT values, const RsqrtOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = RsqrtOp, typename = std::enable_if_t<std::is_same_v<LateInst, RsqrtOp>>>
RsqrtOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrc() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class RsqrtOpAdaptor : public RsqrtOpGenericAdaptor<::mlir::ValueRange> {
public:
using RsqrtOpGenericAdaptor::RsqrtOpGenericAdaptor;
RsqrtOpAdaptor(RsqrtOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class RsqrtOp : public ::mlir::Op<RsqrtOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = RsqrtOpAdaptor;
template <typename RangeT>
using GenericAdaptor = RsqrtOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("ftz")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getFtzAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getFtzAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.rsqrt");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::BoolAttr getFtzAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().ftz);
}
bool getFtz();
void setFtzAttr(::mlir::BoolAttr attr) {
getProperties().ftz = attr;
}
void setFtz(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::BoolAttr ftz);
static RsqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::BoolAttr ftz);
static RsqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::BoolAttr ftz);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value src, ::mlir::BoolAttr ftz);
static RsqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value src, ::mlir::BoolAttr ftz);
static RsqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value src, ::mlir::BoolAttr ftz);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr ftz);
static RsqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr ftz);
static RsqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr ftz);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, bool ftz = false);
static RsqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, bool ftz = false);
static RsqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, bool ftz = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value src, bool ftz = false);
static RsqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value src, bool ftz = false);
static RsqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value src, bool ftz = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool ftz = false);
static RsqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool ftz = false);
static RsqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool ftz = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static RsqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static RsqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static RsqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static RsqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static RsqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static RsqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static RsqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static RsqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::RsqrtOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::RsqrtOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::SetMaxRegisterOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class SetMaxRegisterOpGenericAdaptorBase {
public:
struct Properties {
using actionTy = ::mlir::NVVM::SetMaxRegisterActionAttr;
actionTy action;
auto getAction() const {
auto &propStorage = this->action;
return ::llvm::cast<::mlir::NVVM::SetMaxRegisterActionAttr>(propStorage);
}
void setAction(const ::mlir::NVVM::SetMaxRegisterActionAttr &propValue) {
this->action = propValue;
}
using regCountTy = ::mlir::IntegerAttr;
regCountTy regCount;
auto getRegCount() const {
auto &propStorage = this->regCount;
return ::llvm::cast<::mlir::IntegerAttr>(propStorage);
}
void setRegCount(const ::mlir::IntegerAttr &propValue) {
this->regCount = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.action == this->action &&
rhs.regCount == this->regCount &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
SetMaxRegisterOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.setmaxregister", odsAttrs.getContext());
}
SetMaxRegisterOpGenericAdaptorBase(SetMaxRegisterOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::IntegerAttr getRegCountAttr() {
auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().regCount);
return attr;
}
uint32_t getRegCount();
::mlir::NVVM::SetMaxRegisterActionAttr getActionAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::SetMaxRegisterActionAttr>(getProperties().action);
return attr;
}
::mlir::NVVM::SetMaxRegisterAction getAction();
};
} // namespace detail
template <typename RangeT>
class SetMaxRegisterOpGenericAdaptor : public detail::SetMaxRegisterOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::SetMaxRegisterOpGenericAdaptorBase;
public:
SetMaxRegisterOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
SetMaxRegisterOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SetMaxRegisterOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
SetMaxRegisterOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SetMaxRegisterOpGenericAdaptor(values, attrs, Properties{}, {}) {}
SetMaxRegisterOpGenericAdaptor(RangeT values, const SetMaxRegisterOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = SetMaxRegisterOp, typename = std::enable_if_t<std::is_same_v<LateInst, SetMaxRegisterOp>>>
SetMaxRegisterOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class SetMaxRegisterOpAdaptor : public SetMaxRegisterOpGenericAdaptor<::mlir::ValueRange> {
public:
using SetMaxRegisterOpGenericAdaptor::SetMaxRegisterOpGenericAdaptor;
SetMaxRegisterOpAdaptor(SetMaxRegisterOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class SetMaxRegisterOp : public ::mlir::Op<SetMaxRegisterOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = SetMaxRegisterOpAdaptor;
template <typename RangeT>
using GenericAdaptor = SetMaxRegisterOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("action"), ::llvm::StringRef("regCount")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getActionAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getActionAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getRegCountAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getRegCountAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.setmaxregister");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::IntegerAttr getRegCountAttr() {
return ::llvm::cast<::mlir::IntegerAttr>(getProperties().regCount);
}
uint32_t getRegCount();
::mlir::NVVM::SetMaxRegisterActionAttr getActionAttr() {
return ::llvm::cast<::mlir::NVVM::SetMaxRegisterActionAttr>(getProperties().action);
}
::mlir::NVVM::SetMaxRegisterAction getAction();
void setRegCountAttr(::mlir::IntegerAttr attr) {
getProperties().regCount = attr;
}
void setRegCount(uint32_t attrValue);
void setActionAttr(::mlir::NVVM::SetMaxRegisterActionAttr attr) {
getProperties().action = attr;
}
void setAction(::mlir::NVVM::SetMaxRegisterAction attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr regCount, ::mlir::NVVM::SetMaxRegisterActionAttr action);
static SetMaxRegisterOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr regCount, ::mlir::NVVM::SetMaxRegisterActionAttr action);
static SetMaxRegisterOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr regCount, ::mlir::NVVM::SetMaxRegisterActionAttr action);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr regCount, ::mlir::NVVM::SetMaxRegisterActionAttr action);
static SetMaxRegisterOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr regCount, ::mlir::NVVM::SetMaxRegisterActionAttr action);
static SetMaxRegisterOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr regCount, ::mlir::NVVM::SetMaxRegisterActionAttr action);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t regCount, ::mlir::NVVM::SetMaxRegisterAction action);
static SetMaxRegisterOp create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t regCount, ::mlir::NVVM::SetMaxRegisterAction action);
static SetMaxRegisterOp create(::mlir::ImplicitLocOpBuilder &builder, uint32_t regCount, ::mlir::NVVM::SetMaxRegisterAction action);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t regCount, ::mlir::NVVM::SetMaxRegisterAction action);
static SetMaxRegisterOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t regCount, ::mlir::NVVM::SetMaxRegisterAction action);
static SetMaxRegisterOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t regCount, ::mlir::NVVM::SetMaxRegisterAction action);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SetMaxRegisterOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SetMaxRegisterOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SetMaxRegisterOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SetMaxRegisterOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::SetMaxRegisterOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::SetMaxRegisterOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ShflOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ShflOpGenericAdaptorBase {
public:
struct Properties {
using kindTy = ::mlir::NVVM::ShflKindAttr;
kindTy kind;
auto getKind() const {
auto &propStorage = this->kind;
return ::llvm::cast<::mlir::NVVM::ShflKindAttr>(propStorage);
}
void setKind(const ::mlir::NVVM::ShflKindAttr &propValue) {
this->kind = propValue;
}
using return_value_and_is_validTy = ::mlir::UnitAttr;
return_value_and_is_validTy return_value_and_is_valid;
auto getReturnValueAndIsValid() const {
auto &propStorage = this->return_value_and_is_valid;
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage);
}
void setReturnValueAndIsValid(const ::mlir::UnitAttr &propValue) {
this->return_value_and_is_valid = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.kind == this->kind &&
rhs.return_value_and_is_valid == this->return_value_and_is_valid &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ShflOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.shfl.sync", odsAttrs.getContext());
}
ShflOpGenericAdaptorBase(ShflOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::ShflKindAttr getKindAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::ShflKindAttr>(getProperties().kind);
return attr;
}
::mlir::NVVM::ShflKind getKind();
::mlir::UnitAttr getReturnValueAndIsValidAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().return_value_and_is_valid);
return attr;
}
::std::optional<bool> getReturnValueAndIsValid();
};
} // namespace detail
template <typename RangeT>
class ShflOpGenericAdaptor : public detail::ShflOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ShflOpGenericAdaptorBase;
static constexpr int odsIndex_thread_mask = 0;
static constexpr int odsIndex_val = 1;
static constexpr int odsIndex_offset = 2;
static constexpr int odsIndex_mask_and_clamp = 3;
public:
ShflOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ShflOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ShflOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ShflOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ShflOpGenericAdaptor(values, attrs, Properties{}, {}) {}
ShflOpGenericAdaptor(RangeT values, const ShflOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ShflOp, typename = std::enable_if_t<std::is_same_v<LateInst, ShflOp>>>
ShflOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getThreadMask() {
return (*getODSOperands(0).begin());
}
ValueT getVal() {
return (*getODSOperands(1).begin());
}
ValueT getOffset() {
return (*getODSOperands(2).begin());
}
ValueT getMaskAndClamp() {
return (*getODSOperands(3).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ShflOpAdaptor : public ShflOpGenericAdaptor<::mlir::ValueRange> {
public:
using ShflOpGenericAdaptor::ShflOpGenericAdaptor;
ShflOpAdaptor(ShflOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ShflOp : public ::mlir::Op<ShflOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<300>::Impl, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor> {
public:
using Op::Op;
using Op::print;
using Adaptor = ShflOpAdaptor;
template <typename RangeT>
using GenericAdaptor = ShflOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_thread_mask = 0;
static constexpr int odsIndex_val = 1;
static constexpr int odsIndex_offset = 2;
static constexpr int odsIndex_mask_and_clamp = 3;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferTypeOpInterface::Trait<ShflOp>::refineReturnTypes;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("kind"), ::llvm::StringRef("return_value_and_is_valid")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getKindAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getKindAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getReturnValueAndIsValidAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getReturnValueAndIsValidAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.shfl.sync");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getThreadMask() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::Type> getVal() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getOffset() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getMaskAndClamp() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin());
}
::mlir::OpOperand &getThreadMaskMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getValMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getOffsetMutable() {
auto range = getODSOperandIndexAndLength(2);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getMaskAndClampMutable() {
auto range = getODSOperandIndexAndLength(3);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::ShflKindAttr getKindAttr() {
return ::llvm::cast<::mlir::NVVM::ShflKindAttr>(getProperties().kind);
}
::mlir::NVVM::ShflKind getKind();
::mlir::UnitAttr getReturnValueAndIsValidAttr() {
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().return_value_and_is_valid);
}
::std::optional<bool> getReturnValueAndIsValid();
void setKindAttr(::mlir::NVVM::ShflKindAttr attr) {
getProperties().kind = attr;
}
void setKind(::mlir::NVVM::ShflKind attrValue);
void setReturnValueAndIsValidAttr(::mlir::UnitAttr attr) {
getProperties().return_value_and_is_valid = attr;
}
void setReturnValueAndIsValid(bool attrValue);
::mlir::Attribute removeReturnValueAndIsValidAttr() {
auto attr = getProperties().return_value_and_is_valid;
getProperties().return_value_and_is_valid = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::Value offset, ::mlir::Value mask_and_clamp, ::mlir::NVVM::ShflKindAttr kind, /*optional*/::mlir::UnitAttr return_value_and_is_valid);
static ShflOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::Value offset, ::mlir::Value mask_and_clamp, ::mlir::NVVM::ShflKindAttr kind, /*optional*/::mlir::UnitAttr return_value_and_is_valid);
static ShflOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::Value offset, ::mlir::Value mask_and_clamp, ::mlir::NVVM::ShflKindAttr kind, /*optional*/::mlir::UnitAttr return_value_and_is_valid);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::Value offset, ::mlir::Value mask_and_clamp, ::mlir::NVVM::ShflKindAttr kind, /*optional*/::mlir::UnitAttr return_value_and_is_valid);
static ShflOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::Value offset, ::mlir::Value mask_and_clamp, ::mlir::NVVM::ShflKindAttr kind, /*optional*/::mlir::UnitAttr return_value_and_is_valid);
static ShflOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::Value offset, ::mlir::Value mask_and_clamp, ::mlir::NVVM::ShflKindAttr kind, /*optional*/::mlir::UnitAttr return_value_and_is_valid);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::Value offset, ::mlir::Value mask_and_clamp, ::mlir::NVVM::ShflKindAttr kind, /*optional*/::mlir::UnitAttr return_value_and_is_valid);
static ShflOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::Value offset, ::mlir::Value mask_and_clamp, ::mlir::NVVM::ShflKindAttr kind, /*optional*/::mlir::UnitAttr return_value_and_is_valid);
static ShflOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::Value offset, ::mlir::Value mask_and_clamp, ::mlir::NVVM::ShflKindAttr kind, /*optional*/::mlir::UnitAttr return_value_and_is_valid);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::Value offset, ::mlir::Value mask_and_clamp, ::mlir::NVVM::ShflKind kind, /*optional*/::mlir::UnitAttr return_value_and_is_valid);
static ShflOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::Value offset, ::mlir::Value mask_and_clamp, ::mlir::NVVM::ShflKind kind, /*optional*/::mlir::UnitAttr return_value_and_is_valid);
static ShflOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::Value offset, ::mlir::Value mask_and_clamp, ::mlir::NVVM::ShflKind kind, /*optional*/::mlir::UnitAttr return_value_and_is_valid);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::Value offset, ::mlir::Value mask_and_clamp, ::mlir::NVVM::ShflKind kind, /*optional*/::mlir::UnitAttr return_value_and_is_valid);
static ShflOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::Value offset, ::mlir::Value mask_and_clamp, ::mlir::NVVM::ShflKind kind, /*optional*/::mlir::UnitAttr return_value_and_is_valid);
static ShflOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::Value offset, ::mlir::Value mask_and_clamp, ::mlir::NVVM::ShflKind kind, /*optional*/::mlir::UnitAttr return_value_and_is_valid);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::Value offset, ::mlir::Value mask_and_clamp, ::mlir::NVVM::ShflKind kind, /*optional*/::mlir::UnitAttr return_value_and_is_valid);
static ShflOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::Value offset, ::mlir::Value mask_and_clamp, ::mlir::NVVM::ShflKind kind, /*optional*/::mlir::UnitAttr return_value_and_is_valid);
static ShflOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value thread_mask, ::mlir::Value val, ::mlir::Value offset, ::mlir::Value mask_and_clamp, ::mlir::NVVM::ShflKind kind, /*optional*/::mlir::UnitAttr return_value_and_is_valid);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ShflOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ShflOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ShflOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ShflOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ShflOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ShflOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ShflOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ShflOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static ::llvm::LogicalResult
inferReturnTypes(::mlir::MLIRContext *context,
std::optional<::mlir::Location> location,
Adaptor adaptor,
::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ShflOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ShflOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::SinOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class SinOpGenericAdaptorBase {
public:
struct Properties {
using ftzTy = ::mlir::BoolAttr;
ftzTy ftz;
auto getFtz() const {
auto &propStorage = this->ftz;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setFtz(const ::mlir::BoolAttr &propValue) {
this->ftz = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.ftz == this->ftz &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
SinOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.sin", odsAttrs.getContext());
}
SinOpGenericAdaptorBase(SinOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::BoolAttr getFtzAttr();
bool getFtz();
};
} // namespace detail
template <typename RangeT>
class SinOpGenericAdaptor : public detail::SinOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::SinOpGenericAdaptorBase;
static constexpr int odsIndex_src = 0;
public:
SinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
SinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SinOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
SinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SinOpGenericAdaptor(values, attrs, Properties{}, {}) {}
SinOpGenericAdaptor(RangeT values, const SinOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = SinOp, typename = std::enable_if_t<std::is_same_v<LateInst, SinOp>>>
SinOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrc() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class SinOpAdaptor : public SinOpGenericAdaptor<::mlir::ValueRange> {
public:
using SinOpGenericAdaptor::SinOpGenericAdaptor;
SinOpAdaptor(SinOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class SinOp : public ::mlir::Op<SinOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::FloatType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = SinOpAdaptor;
template <typename RangeT>
using GenericAdaptor = SinOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("ftz")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getFtzAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getFtzAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.sin");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::FloatType> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::FloatType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::BoolAttr getFtzAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().ftz);
}
bool getFtz();
void setFtzAttr(::mlir::BoolAttr attr) {
getProperties().ftz = attr;
}
void setFtz(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::BoolAttr ftz);
static SinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::BoolAttr ftz);
static SinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::BoolAttr ftz);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value src, ::mlir::BoolAttr ftz);
static SinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value src, ::mlir::BoolAttr ftz);
static SinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value src, ::mlir::BoolAttr ftz);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr ftz);
static SinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr ftz);
static SinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr ftz);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, bool ftz = false);
static SinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, bool ftz = false);
static SinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, bool ftz = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value src, bool ftz = false);
static SinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value src, bool ftz = false);
static SinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value src, bool ftz = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool ftz = false);
static SinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool ftz = false);
static SinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool ftz = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::SinOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::SinOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::SmDimOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class SmDimOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
SmDimOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.nsmid", odsAttrs.getContext());
}
SmDimOpGenericAdaptorBase(SmDimOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class SmDimOpGenericAdaptor : public detail::SmDimOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::SmDimOpGenericAdaptorBase;
public:
SmDimOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
SmDimOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SmDimOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
SmDimOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SmDimOpGenericAdaptor(values, attrs, Properties{}, {}) {}
SmDimOpGenericAdaptor(RangeT values, const SmDimOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = SmDimOp, typename = std::enable_if_t<std::is_same_v<LateInst, SmDimOp>>>
SmDimOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class SmDimOpAdaptor : public SmDimOpGenericAdaptor<::mlir::ValueRange> {
public:
using SmDimOpGenericAdaptor::SmDimOpGenericAdaptor;
SmDimOpAdaptor(SmDimOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class SmDimOp : public ::mlir::Op<SmDimOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = SmDimOpAdaptor;
template <typename RangeT>
using GenericAdaptor = SmDimOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<SmDimOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.nsmid");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static SmDimOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static SmDimOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static SmDimOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static SmDimOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static SmDimOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static SmDimOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static SmDimOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static SmDimOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SmDimOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SmDimOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SmDimOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SmDimOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SmDimOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SmDimOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SmDimOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SmDimOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::SmDimOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::SmDimOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::SmIdOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class SmIdOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
SmIdOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.smid", odsAttrs.getContext());
}
SmIdOpGenericAdaptorBase(SmIdOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class SmIdOpGenericAdaptor : public detail::SmIdOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::SmIdOpGenericAdaptorBase;
public:
SmIdOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
SmIdOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SmIdOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
SmIdOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SmIdOpGenericAdaptor(values, attrs, Properties{}, {}) {}
SmIdOpGenericAdaptor(RangeT values, const SmIdOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = SmIdOp, typename = std::enable_if_t<std::is_same_v<LateInst, SmIdOp>>>
SmIdOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class SmIdOpAdaptor : public SmIdOpGenericAdaptor<::mlir::ValueRange> {
public:
using SmIdOpGenericAdaptor::SmIdOpGenericAdaptor;
SmIdOpAdaptor(SmIdOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class SmIdOp : public ::mlir::Op<SmIdOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = SmIdOpAdaptor;
template <typename RangeT>
using GenericAdaptor = SmIdOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<SmIdOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.smid");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static SmIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static SmIdOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static SmIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static SmIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static SmIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static SmIdOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static SmIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static SmIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SmIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SmIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SmIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SmIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SmIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SmIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SmIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SmIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::SmIdOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::SmIdOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::SqrtApproxOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class SqrtApproxOpGenericAdaptorBase {
public:
struct Properties {
using ftzTy = ::mlir::BoolAttr;
ftzTy ftz;
auto getFtz() const {
auto &propStorage = this->ftz;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setFtz(const ::mlir::BoolAttr &propValue) {
this->ftz = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.ftz == this->ftz &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
SqrtApproxOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.sqrt.approx", odsAttrs.getContext());
}
SqrtApproxOpGenericAdaptorBase(SqrtApproxOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::BoolAttr getFtzAttr();
bool getFtz();
};
} // namespace detail
template <typename RangeT>
class SqrtApproxOpGenericAdaptor : public detail::SqrtApproxOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::SqrtApproxOpGenericAdaptorBase;
static constexpr int odsIndex_src = 0;
public:
SqrtApproxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
SqrtApproxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SqrtApproxOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
SqrtApproxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SqrtApproxOpGenericAdaptor(values, attrs, Properties{}, {}) {}
SqrtApproxOpGenericAdaptor(RangeT values, const SqrtApproxOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = SqrtApproxOp, typename = std::enable_if_t<std::is_same_v<LateInst, SqrtApproxOp>>>
SqrtApproxOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrc() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class SqrtApproxOpAdaptor : public SqrtApproxOpGenericAdaptor<::mlir::ValueRange> {
public:
using SqrtApproxOpGenericAdaptor::SqrtApproxOpGenericAdaptor;
SqrtApproxOpAdaptor(SqrtApproxOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class SqrtApproxOp : public ::mlir::Op<SqrtApproxOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::FloatType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = SqrtApproxOpAdaptor;
template <typename RangeT>
using GenericAdaptor = SqrtApproxOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("ftz")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getFtzAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getFtzAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.sqrt.approx");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::FloatType> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::FloatType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::BoolAttr getFtzAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().ftz);
}
bool getFtz();
void setFtzAttr(::mlir::BoolAttr attr) {
getProperties().ftz = attr;
}
void setFtz(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::BoolAttr ftz);
static SqrtApproxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::BoolAttr ftz);
static SqrtApproxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::BoolAttr ftz);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value src, ::mlir::BoolAttr ftz);
static SqrtApproxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value src, ::mlir::BoolAttr ftz);
static SqrtApproxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value src, ::mlir::BoolAttr ftz);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr ftz);
static SqrtApproxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr ftz);
static SqrtApproxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::BoolAttr ftz);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, bool ftz = false);
static SqrtApproxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, bool ftz = false);
static SqrtApproxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, bool ftz = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value src, bool ftz = false);
static SqrtApproxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value src, bool ftz = false);
static SqrtApproxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value src, bool ftz = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool ftz = false);
static SqrtApproxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool ftz = false);
static SqrtApproxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool ftz = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SqrtApproxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SqrtApproxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SqrtApproxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SqrtApproxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SqrtApproxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SqrtApproxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SqrtApproxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SqrtApproxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::SqrtApproxOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::SqrtApproxOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::SqrtOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class SqrtOpGenericAdaptorBase {
public:
struct Properties {
using ftzTy = ::mlir::BoolAttr;
ftzTy ftz;
auto getFtz() const {
auto &propStorage = this->ftz;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setFtz(const ::mlir::BoolAttr &propValue) {
this->ftz = propValue;
}
using rndTy = ::mlir::NVVM::FPRoundingModeAttr;
rndTy rnd;
auto getRnd() const {
auto &propStorage = this->rnd;
return ::llvm::cast<::mlir::NVVM::FPRoundingModeAttr>(propStorage);
}
void setRnd(const ::mlir::NVVM::FPRoundingModeAttr &propValue) {
this->rnd = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.ftz == this->ftz &&
rhs.rnd == this->rnd &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
SqrtOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.sqrt", odsAttrs.getContext());
}
SqrtOpGenericAdaptorBase(SqrtOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::FPRoundingModeAttr getRndAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::FPRoundingModeAttr>(getProperties().rnd);
return attr;
}
::mlir::NVVM::FPRoundingMode getRnd();
::mlir::BoolAttr getFtzAttr();
bool getFtz();
};
} // namespace detail
template <typename RangeT>
class SqrtOpGenericAdaptor : public detail::SqrtOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::SqrtOpGenericAdaptorBase;
static constexpr int odsIndex_src = 0;
public:
SqrtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
SqrtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SqrtOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
SqrtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SqrtOpGenericAdaptor(values, attrs, Properties{}, {}) {}
SqrtOpGenericAdaptor(RangeT values, const SqrtOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = SqrtOp, typename = std::enable_if_t<std::is_same_v<LateInst, SqrtOp>>>
SqrtOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getSrc() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class SqrtOpAdaptor : public SqrtOpGenericAdaptor<::mlir::ValueRange> {
public:
using SqrtOpGenericAdaptor::SqrtOpGenericAdaptor;
SqrtOpAdaptor(SqrtOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class SqrtOp : public ::mlir::Op<SqrtOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = SqrtOpAdaptor;
template <typename RangeT>
using GenericAdaptor = SqrtOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_src = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("ftz"), ::llvm::StringRef("rnd")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getFtzAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getFtzAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getRndAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getRndAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.sqrt");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getSrc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getSrcMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::FPRoundingModeAttr getRndAttr() {
return ::llvm::cast<::mlir::NVVM::FPRoundingModeAttr>(getProperties().rnd);
}
::mlir::NVVM::FPRoundingMode getRnd();
::mlir::BoolAttr getFtzAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().ftz);
}
bool getFtz();
void setRndAttr(::mlir::NVVM::FPRoundingModeAttr attr) {
getProperties().rnd = attr;
}
void setRnd(::mlir::NVVM::FPRoundingMode attrValue);
void setFtzAttr(::mlir::BoolAttr attr) {
getProperties().ftz = attr;
}
void setFtz(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::BoolAttr ftz = nullptr);
static SqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::BoolAttr ftz = nullptr);
static SqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::BoolAttr ftz = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value src, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::BoolAttr ftz = nullptr);
static SqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value src, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::BoolAttr ftz = nullptr);
static SqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value src, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::BoolAttr ftz = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::BoolAttr ftz = nullptr);
static SqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::BoolAttr ftz = nullptr);
static SqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::BoolAttr ftz = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::NVVM::FPRoundingMode rnd, bool ftz = false);
static SqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::NVVM::FPRoundingMode rnd, bool ftz = false);
static SqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::NVVM::FPRoundingMode rnd, bool ftz = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value src, ::mlir::NVVM::FPRoundingMode rnd, bool ftz = false);
static SqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value src, ::mlir::NVVM::FPRoundingMode rnd, bool ftz = false);
static SqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value src, ::mlir::NVVM::FPRoundingMode rnd, bool ftz = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::NVVM::FPRoundingMode rnd, bool ftz = false);
static SqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::NVVM::FPRoundingMode rnd, bool ftz = false);
static SqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::NVVM::FPRoundingMode rnd, bool ftz = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::SqrtOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::SqrtOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::StMatrixOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class StMatrixOpGenericAdaptorBase {
public:
struct Properties {
using eltTypeTy = ::mlir::NVVM::LdStMatrixEltTypeAttr;
eltTypeTy eltType;
auto getEltType() const {
auto &propStorage = this->eltType;
return ::llvm::cast<::mlir::NVVM::LdStMatrixEltTypeAttr>(propStorage);
}
void setEltType(const ::mlir::NVVM::LdStMatrixEltTypeAttr &propValue) {
this->eltType = propValue;
}
using layoutTy = ::mlir::NVVM::MMALayoutAttr;
layoutTy layout;
auto getLayout() const {
auto &propStorage = this->layout;
return ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(propStorage);
}
void setLayout(const ::mlir::NVVM::MMALayoutAttr &propValue) {
this->layout = propValue;
}
using shapeTy = ::mlir::NVVM::LdStMatrixShapeAttr;
shapeTy shape;
auto getShape() const {
auto &propStorage = this->shape;
return ::llvm::cast<::mlir::NVVM::LdStMatrixShapeAttr>(propStorage);
}
void setShape(const ::mlir::NVVM::LdStMatrixShapeAttr &propValue) {
this->shape = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.eltType == this->eltType &&
rhs.layout == this->layout &&
rhs.shape == this->shape &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
StMatrixOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.stmatrix", odsAttrs.getContext());
}
StMatrixOpGenericAdaptorBase(StMatrixOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::MMALayoutAttr getLayoutAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(getProperties().layout);
return attr;
}
::mlir::NVVM::MMALayout getLayout();
::mlir::NVVM::LdStMatrixShapeAttr getShapeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::LdStMatrixShapeAttr>(getProperties().shape);
return attr;
}
::mlir::NVVM::LdStMatrixShapeAttr getShape();
::mlir::NVVM::LdStMatrixEltTypeAttr getEltTypeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::LdStMatrixEltTypeAttr>(getProperties().eltType);
return attr;
}
::mlir::NVVM::LdStMatrixEltType getEltType();
};
} // namespace detail
template <typename RangeT>
class StMatrixOpGenericAdaptor : public detail::StMatrixOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::StMatrixOpGenericAdaptorBase;
static constexpr int odsIndex_ptr = 0;
static constexpr int odsIndex_sources = 1;
public:
StMatrixOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
StMatrixOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : StMatrixOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
StMatrixOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : StMatrixOpGenericAdaptor(values, attrs, Properties{}, {}) {}
StMatrixOpGenericAdaptor(RangeT values, const StMatrixOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = StMatrixOp, typename = std::enable_if_t<std::is_same_v<LateInst, StMatrixOp>>>
StMatrixOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getPtr() {
return (*getODSOperands(0).begin());
}
RangeT getSources() {
return getODSOperands(1);
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class StMatrixOpAdaptor : public StMatrixOpGenericAdaptor<::mlir::ValueRange> {
public:
using StMatrixOpGenericAdaptor::StMatrixOpGenericAdaptor;
StMatrixOpAdaptor(StMatrixOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class StMatrixOp : public ::mlir::Op<StMatrixOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = StMatrixOpAdaptor;
template <typename RangeT>
using GenericAdaptor = StMatrixOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_ptr = 0;
static constexpr int odsIndex_sources = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("eltType"), ::llvm::StringRef("layout"), ::llvm::StringRef("shape")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getEltTypeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getEltTypeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getLayoutAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getLayoutAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getShapeAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getShapeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.stmatrix");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getPtr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin());
}
::mlir::Operation::operand_range getSources() {
return getODSOperands(1);
}
::mlir::OpOperand &getPtrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getSourcesMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::MMALayoutAttr getLayoutAttr() {
return ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(getProperties().layout);
}
::mlir::NVVM::MMALayout getLayout();
::mlir::NVVM::LdStMatrixShapeAttr getShapeAttr() {
return ::llvm::cast<::mlir::NVVM::LdStMatrixShapeAttr>(getProperties().shape);
}
::mlir::NVVM::LdStMatrixShapeAttr getShape();
::mlir::NVVM::LdStMatrixEltTypeAttr getEltTypeAttr() {
return ::llvm::cast<::mlir::NVVM::LdStMatrixEltTypeAttr>(getProperties().eltType);
}
::mlir::NVVM::LdStMatrixEltType getEltType();
void setLayoutAttr(::mlir::NVVM::MMALayoutAttr attr) {
getProperties().layout = attr;
}
void setLayout(::mlir::NVVM::MMALayout attrValue);
void setShapeAttr(::mlir::NVVM::LdStMatrixShapeAttr attr) {
getProperties().shape = attr;
}
void setEltTypeAttr(::mlir::NVVM::LdStMatrixEltTypeAttr attr) {
getProperties().eltType = attr;
}
void setEltType(::mlir::NVVM::LdStMatrixEltType attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value ptr, ::mlir::ValueRange sources, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltTypeAttr eltType);
static StMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value ptr, ::mlir::ValueRange sources, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltTypeAttr eltType);
static StMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value ptr, ::mlir::ValueRange sources, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltTypeAttr eltType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::ValueRange sources, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltTypeAttr eltType);
static StMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::ValueRange sources, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltTypeAttr eltType);
static StMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::ValueRange sources, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltTypeAttr eltType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value ptr, ::mlir::ValueRange sources, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltType eltType);
static StMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value ptr, ::mlir::ValueRange sources, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltType eltType);
static StMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value ptr, ::mlir::ValueRange sources, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltType eltType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::ValueRange sources, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltType eltType);
static StMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::ValueRange sources, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltType eltType);
static StMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::ValueRange sources, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::LdStMatrixShapeAttr shape, ::mlir::NVVM::LdStMatrixEltType eltType);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static StMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static StMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static StMatrixOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static StMatrixOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 3 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::StMatrixOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::StMatrixOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::SubFOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class SubFOpGenericAdaptorBase {
public:
struct Properties {
using ftzTy = ::mlir::BoolAttr;
ftzTy ftz;
auto getFtz() const {
auto &propStorage = this->ftz;
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(propStorage);
}
void setFtz(const ::mlir::BoolAttr &propValue) {
this->ftz = propValue;
}
using rndTy = ::mlir::NVVM::FPRoundingModeAttr;
rndTy rnd;
auto getRnd() const {
auto &propStorage = this->rnd;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::FPRoundingModeAttr>(propStorage);
}
void setRnd(const ::mlir::NVVM::FPRoundingModeAttr &propValue) {
this->rnd = propValue;
}
using satTy = ::mlir::NVVM::SaturationModeAttr;
satTy sat;
auto getSat() const {
auto &propStorage = this->sat;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SaturationModeAttr>(propStorage);
}
void setSat(const ::mlir::NVVM::SaturationModeAttr &propValue) {
this->sat = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.ftz == this->ftz &&
rhs.rnd == this->rnd &&
rhs.sat == this->sat &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
SubFOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.subf", odsAttrs.getContext());
}
SubFOpGenericAdaptorBase(SubFOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::FPRoundingModeAttr getRndAttr();
::mlir::NVVM::FPRoundingMode getRnd();
::mlir::NVVM::SaturationModeAttr getSatAttr();
::mlir::NVVM::SaturationMode getSat();
::mlir::BoolAttr getFtzAttr();
bool getFtz();
};
} // namespace detail
template <typename RangeT>
class SubFOpGenericAdaptor : public detail::SubFOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::SubFOpGenericAdaptorBase;
static constexpr int odsIndex_lhs = 0;
static constexpr int odsIndex_rhs = 1;
public:
SubFOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
SubFOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SubFOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
SubFOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SubFOpGenericAdaptor(values, attrs, Properties{}, {}) {}
SubFOpGenericAdaptor(RangeT values, const SubFOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = SubFOp, typename = std::enable_if_t<std::is_same_v<LateInst, SubFOp>>>
SubFOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getLhs() {
return (*getODSOperands(0).begin());
}
ValueT getRhs() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class SubFOpAdaptor : public SubFOpGenericAdaptor<::mlir::ValueRange> {
public:
using SubFOpGenericAdaptor::SubFOpGenericAdaptor;
SubFOpAdaptor(SubFOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class SubFOp : public ::mlir::Op<SubFOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = SubFOpAdaptor;
template <typename RangeT>
using GenericAdaptor = SubFOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_lhs = 0;
static constexpr int odsIndex_rhs = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("ftz"), ::llvm::StringRef("rnd"), ::llvm::StringRef("sat")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getFtzAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getFtzAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getRndAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getRndAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getSatAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getSatAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.subf");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getLhs() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::Type> getRhs() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getLhsMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getRhsMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::FPRoundingModeAttr getRndAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::FPRoundingModeAttr>(getProperties().rnd);
}
::mlir::NVVM::FPRoundingMode getRnd();
::mlir::NVVM::SaturationModeAttr getSatAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::SaturationModeAttr>(getProperties().sat);
}
::mlir::NVVM::SaturationMode getSat();
::mlir::BoolAttr getFtzAttr() {
return ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().ftz);
}
bool getFtz();
void setRndAttr(::mlir::NVVM::FPRoundingModeAttr attr) {
getProperties().rnd = attr;
}
void setRnd(::mlir::NVVM::FPRoundingMode attrValue);
void setSatAttr(::mlir::NVVM::SaturationModeAttr attr) {
getProperties().sat = attr;
}
void setSat(::mlir::NVVM::SaturationMode attrValue);
void setFtzAttr(::mlir::BoolAttr attr) {
getProperties().ftz = attr;
}
void setFtz(bool attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr);
static SubFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr);
static SubFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr);
static SubFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr);
static SubFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr);
static SubFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr);
static SubFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingModeAttr rnd, ::mlir::NVVM::SaturationModeAttr sat = nullptr, ::mlir::BoolAttr ftz = nullptr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false);
static SubFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false);
static SubFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false);
static SubFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false);
static SubFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false);
static SubFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false);
static SubFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::NVVM::FPRoundingMode rnd = FPRoundingMode::NONE, ::mlir::NVVM::SaturationMode sat = SaturationMode::NONE, bool ftz = false);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SubFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SubFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SubFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SubFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SubFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SubFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SubFOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SubFOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static void getCanonicalizationPatterns(::mlir::RewritePatternSet &results, ::mlir::MLIRContext *context);
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 3 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::SubFOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::SubFOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::SyncWarpOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class SyncWarpOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
SyncWarpOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.bar.warp.sync", odsAttrs.getContext());
}
SyncWarpOpGenericAdaptorBase(SyncWarpOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class SyncWarpOpGenericAdaptor : public detail::SyncWarpOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::SyncWarpOpGenericAdaptorBase;
static constexpr int odsIndex_mask = 0;
public:
SyncWarpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
SyncWarpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SyncWarpOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
SyncWarpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SyncWarpOpGenericAdaptor(values, attrs, Properties{}, {}) {}
SyncWarpOpGenericAdaptor(RangeT values, const SyncWarpOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = SyncWarpOp, typename = std::enable_if_t<std::is_same_v<LateInst, SyncWarpOp>>>
SyncWarpOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getMask() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class SyncWarpOpAdaptor : public SyncWarpOpGenericAdaptor<::mlir::ValueRange> {
public:
using SyncWarpOpGenericAdaptor::SyncWarpOpGenericAdaptor;
SyncWarpOpAdaptor(SyncWarpOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class SyncWarpOp : public ::mlir::Op<SyncWarpOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants> {
public:
using Op::Op;
using Op::print;
using Adaptor = SyncWarpOpAdaptor;
template <typename RangeT>
using GenericAdaptor = SyncWarpOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_mask = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.bar.warp.sync");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getMask() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getMaskMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value mask);
static SyncWarpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value mask);
static SyncWarpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value mask);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value mask);
static SyncWarpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value mask);
static SyncWarpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value mask);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SyncWarpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SyncWarpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SyncWarpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SyncWarpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::SyncWarpOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::Tcgen05AllocOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class Tcgen05AllocOpGenericAdaptorBase {
public:
struct Properties {
using groupTy = ::mlir::NVVM::CTAGroupKindAttr;
groupTy group;
auto getGroup() const {
auto &propStorage = this->group;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::CTAGroupKindAttr>(propStorage);
}
void setGroup(const ::mlir::NVVM::CTAGroupKindAttr &propValue) {
this->group = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.group == this->group &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
Tcgen05AllocOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.tcgen05.alloc", odsAttrs.getContext());
}
Tcgen05AllocOpGenericAdaptorBase(Tcgen05AllocOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::CTAGroupKindAttr getGroupAttr();
::mlir::NVVM::CTAGroupKind getGroup();
};
} // namespace detail
template <typename RangeT>
class Tcgen05AllocOpGenericAdaptor : public detail::Tcgen05AllocOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::Tcgen05AllocOpGenericAdaptorBase;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_nCols = 1;
public:
Tcgen05AllocOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
Tcgen05AllocOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Tcgen05AllocOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
Tcgen05AllocOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : Tcgen05AllocOpGenericAdaptor(values, attrs, Properties{}, {}) {}
Tcgen05AllocOpGenericAdaptor(RangeT values, const Tcgen05AllocOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = Tcgen05AllocOp, typename = std::enable_if_t<std::is_same_v<LateInst, Tcgen05AllocOp>>>
Tcgen05AllocOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getAddr() {
return (*getODSOperands(0).begin());
}
ValueT getNCols() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class Tcgen05AllocOpAdaptor : public Tcgen05AllocOpGenericAdaptor<::mlir::ValueRange> {
public:
using Tcgen05AllocOpGenericAdaptor::Tcgen05AllocOpGenericAdaptor;
Tcgen05AllocOpAdaptor(Tcgen05AllocOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class Tcgen05AllocOp : public ::mlir::Op<Tcgen05AllocOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<1002,1012,1102>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = Tcgen05AllocOpAdaptor;
template <typename RangeT>
using GenericAdaptor = Tcgen05AllocOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_nCols = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("group")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getGroupAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getGroupAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.tcgen05.alloc");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getAddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getNCols() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getAddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getNColsMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::CTAGroupKindAttr getGroupAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::CTAGroupKindAttr>(getProperties().group);
}
::mlir::NVVM::CTAGroupKind getGroup();
void setGroupAttr(::mlir::NVVM::CTAGroupKindAttr attr) {
getProperties().group = attr;
}
void setGroup(::mlir::NVVM::CTAGroupKind attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, ::mlir::Value nCols, ::mlir::NVVM::CTAGroupKindAttr group);
static Tcgen05AllocOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, ::mlir::Value nCols, ::mlir::NVVM::CTAGroupKindAttr group);
static Tcgen05AllocOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, ::mlir::Value nCols, ::mlir::NVVM::CTAGroupKindAttr group);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value nCols, ::mlir::NVVM::CTAGroupKindAttr group);
static Tcgen05AllocOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value nCols, ::mlir::NVVM::CTAGroupKindAttr group);
static Tcgen05AllocOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value nCols, ::mlir::NVVM::CTAGroupKindAttr group);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, ::mlir::Value nCols, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static Tcgen05AllocOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, ::mlir::Value nCols, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static Tcgen05AllocOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, ::mlir::Value nCols, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value nCols, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static Tcgen05AllocOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value nCols, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static Tcgen05AllocOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value nCols, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05AllocOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05AllocOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05AllocOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05AllocOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static llvm::Intrinsic::ID
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::SmallVector<llvm::Value *> &args);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05AllocOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::Tcgen05AllocOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::Tcgen05CommitOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class Tcgen05CommitOpGenericAdaptorBase {
public:
struct Properties {
using groupTy = ::mlir::NVVM::CTAGroupKindAttr;
groupTy group;
auto getGroup() const {
auto &propStorage = this->group;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::CTAGroupKindAttr>(propStorage);
}
void setGroup(const ::mlir::NVVM::CTAGroupKindAttr &propValue) {
this->group = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.group == this->group &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
Tcgen05CommitOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.tcgen05.commit", odsAttrs.getContext());
}
Tcgen05CommitOpGenericAdaptorBase(Tcgen05CommitOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::CTAGroupKindAttr getGroupAttr();
::mlir::NVVM::CTAGroupKind getGroup();
};
} // namespace detail
template <typename RangeT>
class Tcgen05CommitOpGenericAdaptor : public detail::Tcgen05CommitOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::Tcgen05CommitOpGenericAdaptorBase;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_multicastMask = 1;
public:
Tcgen05CommitOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
Tcgen05CommitOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Tcgen05CommitOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
Tcgen05CommitOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : Tcgen05CommitOpGenericAdaptor(values, attrs, Properties{}, {}) {}
Tcgen05CommitOpGenericAdaptor(RangeT values, const Tcgen05CommitOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = Tcgen05CommitOp, typename = std::enable_if_t<std::is_same_v<LateInst, Tcgen05CommitOp>>>
Tcgen05CommitOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getAddr() {
return (*getODSOperands(0).begin());
}
ValueT getMulticastMask() {
auto operands = getODSOperands(1);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class Tcgen05CommitOpAdaptor : public Tcgen05CommitOpGenericAdaptor<::mlir::ValueRange> {
public:
using Tcgen05CommitOpGenericAdaptor::Tcgen05CommitOpGenericAdaptor;
Tcgen05CommitOpAdaptor(Tcgen05CommitOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class Tcgen05CommitOp : public ::mlir::Op<Tcgen05CommitOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<1002,1012,1102>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = Tcgen05CommitOpAdaptor;
template <typename RangeT>
using GenericAdaptor = Tcgen05CommitOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_multicastMask = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("group")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getGroupAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getGroupAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.tcgen05.commit");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getAddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getMulticastMask() {
auto operands = getODSOperands(1);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getAddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getMulticastMaskMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::CTAGroupKindAttr getGroupAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::CTAGroupKindAttr>(getProperties().group);
}
::mlir::NVVM::CTAGroupKind getGroup();
void setGroupAttr(::mlir::NVVM::CTAGroupKindAttr attr) {
getProperties().group = attr;
}
void setGroup(::mlir::NVVM::CTAGroupKind attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, /*optional*/::mlir::Value multicastMask, ::mlir::NVVM::CTAGroupKindAttr group);
static Tcgen05CommitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, /*optional*/::mlir::Value multicastMask, ::mlir::NVVM::CTAGroupKindAttr group);
static Tcgen05CommitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, /*optional*/::mlir::Value multicastMask, ::mlir::NVVM::CTAGroupKindAttr group);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, /*optional*/::mlir::Value multicastMask, ::mlir::NVVM::CTAGroupKindAttr group);
static Tcgen05CommitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, /*optional*/::mlir::Value multicastMask, ::mlir::NVVM::CTAGroupKindAttr group);
static Tcgen05CommitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, /*optional*/::mlir::Value multicastMask, ::mlir::NVVM::CTAGroupKindAttr group);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, /*optional*/::mlir::Value multicastMask, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static Tcgen05CommitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, /*optional*/::mlir::Value multicastMask, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static Tcgen05CommitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, /*optional*/::mlir::Value multicastMask, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, /*optional*/::mlir::Value multicastMask, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static Tcgen05CommitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, /*optional*/::mlir::Value multicastMask, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static Tcgen05CommitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, /*optional*/::mlir::Value multicastMask, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05CommitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05CommitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05CommitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05CommitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static llvm::Intrinsic::ID
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::SmallVector<llvm::Value *> &args);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05CommitOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::Tcgen05CommitOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::Tcgen05CpOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class Tcgen05CpOpGenericAdaptorBase {
public:
struct Properties {
using groupTy = ::mlir::NVVM::CTAGroupKindAttr;
groupTy group;
auto getGroup() const {
auto &propStorage = this->group;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::CTAGroupKindAttr>(propStorage);
}
void setGroup(const ::mlir::NVVM::CTAGroupKindAttr &propValue) {
this->group = propValue;
}
using multicastTy = ::mlir::NVVM::Tcgen05CpMulticastAttr;
multicastTy multicast;
auto getMulticast() const {
auto &propStorage = this->multicast;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::Tcgen05CpMulticastAttr>(propStorage);
}
void setMulticast(const ::mlir::NVVM::Tcgen05CpMulticastAttr &propValue) {
this->multicast = propValue;
}
using shapeTy = ::mlir::NVVM::Tcgen05CpShapeAttr;
shapeTy shape;
auto getShape() const {
auto &propStorage = this->shape;
return ::llvm::cast<::mlir::NVVM::Tcgen05CpShapeAttr>(propStorage);
}
void setShape(const ::mlir::NVVM::Tcgen05CpShapeAttr &propValue) {
this->shape = propValue;
}
using srcFormatTy = ::mlir::NVVM::Tcgen05CpSrcFormatAttr;
srcFormatTy srcFormat;
auto getSrcFormat() const {
auto &propStorage = this->srcFormat;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::Tcgen05CpSrcFormatAttr>(propStorage);
}
void setSrcFormat(const ::mlir::NVVM::Tcgen05CpSrcFormatAttr &propValue) {
this->srcFormat = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.group == this->group &&
rhs.multicast == this->multicast &&
rhs.shape == this->shape &&
rhs.srcFormat == this->srcFormat &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
Tcgen05CpOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.tcgen05.cp", odsAttrs.getContext());
}
Tcgen05CpOpGenericAdaptorBase(Tcgen05CpOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::Tcgen05CpShapeAttr getShapeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::Tcgen05CpShapeAttr>(getProperties().shape);
return attr;
}
::mlir::NVVM::Tcgen05CpShape getShape();
::mlir::NVVM::CTAGroupKindAttr getGroupAttr();
::mlir::NVVM::CTAGroupKind getGroup();
::mlir::NVVM::Tcgen05CpMulticastAttr getMulticastAttr();
::mlir::NVVM::Tcgen05CpMulticast getMulticast();
::mlir::NVVM::Tcgen05CpSrcFormatAttr getSrcFormatAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::NVVM::Tcgen05CpSrcFormatAttr>(getProperties().srcFormat);
return attr;
}
::std::optional<::mlir::NVVM::Tcgen05CpSrcFormat> getSrcFormat();
};
} // namespace detail
template <typename RangeT>
class Tcgen05CpOpGenericAdaptor : public detail::Tcgen05CpOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::Tcgen05CpOpGenericAdaptorBase;
static constexpr int odsIndex_taddr = 0;
static constexpr int odsIndex_smem_desc = 1;
public:
Tcgen05CpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
Tcgen05CpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Tcgen05CpOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
Tcgen05CpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : Tcgen05CpOpGenericAdaptor(values, attrs, Properties{}, {}) {}
Tcgen05CpOpGenericAdaptor(RangeT values, const Tcgen05CpOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = Tcgen05CpOp, typename = std::enable_if_t<std::is_same_v<LateInst, Tcgen05CpOp>>>
Tcgen05CpOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getTaddr() {
return (*getODSOperands(0).begin());
}
ValueT getSmemDesc() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class Tcgen05CpOpAdaptor : public Tcgen05CpOpGenericAdaptor<::mlir::ValueRange> {
public:
using Tcgen05CpOpGenericAdaptor::Tcgen05CpOpGenericAdaptor;
Tcgen05CpOpAdaptor(Tcgen05CpOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class Tcgen05CpOp : public ::mlir::Op<Tcgen05CpOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<1002,1012,1102>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = Tcgen05CpOpAdaptor;
template <typename RangeT>
using GenericAdaptor = Tcgen05CpOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_taddr = 0;
static constexpr int odsIndex_smem_desc = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("group"), ::llvm::StringRef("multicast"), ::llvm::StringRef("shape"), ::llvm::StringRef("srcFormat")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getGroupAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getGroupAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getMulticastAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getMulticastAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getShapeAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getShapeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
::mlir::StringAttr getSrcFormatAttrName() {
return getAttributeNameForIndex(3);
}
static ::mlir::StringAttr getSrcFormatAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 3);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.tcgen05.cp");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getTaddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getSmemDesc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getTaddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSmemDescMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::Tcgen05CpShapeAttr getShapeAttr() {
return ::llvm::cast<::mlir::NVVM::Tcgen05CpShapeAttr>(getProperties().shape);
}
::mlir::NVVM::Tcgen05CpShape getShape();
::mlir::NVVM::CTAGroupKindAttr getGroupAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::CTAGroupKindAttr>(getProperties().group);
}
::mlir::NVVM::CTAGroupKind getGroup();
::mlir::NVVM::Tcgen05CpMulticastAttr getMulticastAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::Tcgen05CpMulticastAttr>(getProperties().multicast);
}
::mlir::NVVM::Tcgen05CpMulticast getMulticast();
::mlir::NVVM::Tcgen05CpSrcFormatAttr getSrcFormatAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::Tcgen05CpSrcFormatAttr>(getProperties().srcFormat);
}
::std::optional<::mlir::NVVM::Tcgen05CpSrcFormat> getSrcFormat();
void setShapeAttr(::mlir::NVVM::Tcgen05CpShapeAttr attr) {
getProperties().shape = attr;
}
void setShape(::mlir::NVVM::Tcgen05CpShape attrValue);
void setGroupAttr(::mlir::NVVM::CTAGroupKindAttr attr) {
getProperties().group = attr;
}
void setGroup(::mlir::NVVM::CTAGroupKind attrValue);
void setMulticastAttr(::mlir::NVVM::Tcgen05CpMulticastAttr attr) {
getProperties().multicast = attr;
}
void setMulticast(::mlir::NVVM::Tcgen05CpMulticast attrValue);
void setSrcFormatAttr(::mlir::NVVM::Tcgen05CpSrcFormatAttr attr) {
getProperties().srcFormat = attr;
}
void setSrcFormat(::std::optional<::mlir::NVVM::Tcgen05CpSrcFormat> attrValue);
::mlir::Attribute removeSrcFormatAttr() {
auto attr = getProperties().srcFormat;
getProperties().srcFormat = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::Tcgen05CpShapeAttr shape, ::mlir::NVVM::CTAGroupKindAttr group, ::mlir::NVVM::Tcgen05CpMulticastAttr multicast, /*optional*/::mlir::NVVM::Tcgen05CpSrcFormatAttr srcFormat, ::mlir::Value taddr, ::mlir::Value smem_desc);
static Tcgen05CpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::Tcgen05CpShapeAttr shape, ::mlir::NVVM::CTAGroupKindAttr group, ::mlir::NVVM::Tcgen05CpMulticastAttr multicast, /*optional*/::mlir::NVVM::Tcgen05CpSrcFormatAttr srcFormat, ::mlir::Value taddr, ::mlir::Value smem_desc);
static Tcgen05CpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::Tcgen05CpShapeAttr shape, ::mlir::NVVM::CTAGroupKindAttr group, ::mlir::NVVM::Tcgen05CpMulticastAttr multicast, /*optional*/::mlir::NVVM::Tcgen05CpSrcFormatAttr srcFormat, ::mlir::Value taddr, ::mlir::Value smem_desc);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05CpShapeAttr shape, ::mlir::NVVM::CTAGroupKindAttr group, ::mlir::NVVM::Tcgen05CpMulticastAttr multicast, /*optional*/::mlir::NVVM::Tcgen05CpSrcFormatAttr srcFormat, ::mlir::Value taddr, ::mlir::Value smem_desc);
static Tcgen05CpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05CpShapeAttr shape, ::mlir::NVVM::CTAGroupKindAttr group, ::mlir::NVVM::Tcgen05CpMulticastAttr multicast, /*optional*/::mlir::NVVM::Tcgen05CpSrcFormatAttr srcFormat, ::mlir::Value taddr, ::mlir::Value smem_desc);
static Tcgen05CpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05CpShapeAttr shape, ::mlir::NVVM::CTAGroupKindAttr group, ::mlir::NVVM::Tcgen05CpMulticastAttr multicast, /*optional*/::mlir::NVVM::Tcgen05CpSrcFormatAttr srcFormat, ::mlir::Value taddr, ::mlir::Value smem_desc);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::Tcgen05CpShape shape, ::mlir::NVVM::CTAGroupKind group, ::mlir::NVVM::Tcgen05CpMulticast multicast, /*optional*/::mlir::NVVM::Tcgen05CpSrcFormatAttr srcFormat, ::mlir::Value taddr, ::mlir::Value smem_desc);
static Tcgen05CpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::Tcgen05CpShape shape, ::mlir::NVVM::CTAGroupKind group, ::mlir::NVVM::Tcgen05CpMulticast multicast, /*optional*/::mlir::NVVM::Tcgen05CpSrcFormatAttr srcFormat, ::mlir::Value taddr, ::mlir::Value smem_desc);
static Tcgen05CpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::Tcgen05CpShape shape, ::mlir::NVVM::CTAGroupKind group, ::mlir::NVVM::Tcgen05CpMulticast multicast, /*optional*/::mlir::NVVM::Tcgen05CpSrcFormatAttr srcFormat, ::mlir::Value taddr, ::mlir::Value smem_desc);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05CpShape shape, ::mlir::NVVM::CTAGroupKind group, ::mlir::NVVM::Tcgen05CpMulticast multicast, /*optional*/::mlir::NVVM::Tcgen05CpSrcFormatAttr srcFormat, ::mlir::Value taddr, ::mlir::Value smem_desc);
static Tcgen05CpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05CpShape shape, ::mlir::NVVM::CTAGroupKind group, ::mlir::NVVM::Tcgen05CpMulticast multicast, /*optional*/::mlir::NVVM::Tcgen05CpSrcFormatAttr srcFormat, ::mlir::Value taddr, ::mlir::Value smem_desc);
static Tcgen05CpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05CpShape shape, ::mlir::NVVM::CTAGroupKind group, ::mlir::NVVM::Tcgen05CpMulticast multicast, /*optional*/::mlir::NVVM::Tcgen05CpSrcFormatAttr srcFormat, ::mlir::Value taddr, ::mlir::Value smem_desc);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05CpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05CpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05CpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05CpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 4 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static llvm::Intrinsic::ID getIntrinsicID(Operation &op);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05CpOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::Tcgen05CpOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::Tcgen05DeallocOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class Tcgen05DeallocOpGenericAdaptorBase {
public:
struct Properties {
using groupTy = ::mlir::NVVM::CTAGroupKindAttr;
groupTy group;
auto getGroup() const {
auto &propStorage = this->group;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::CTAGroupKindAttr>(propStorage);
}
void setGroup(const ::mlir::NVVM::CTAGroupKindAttr &propValue) {
this->group = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.group == this->group &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
Tcgen05DeallocOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.tcgen05.dealloc", odsAttrs.getContext());
}
Tcgen05DeallocOpGenericAdaptorBase(Tcgen05DeallocOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::CTAGroupKindAttr getGroupAttr();
::mlir::NVVM::CTAGroupKind getGroup();
};
} // namespace detail
template <typename RangeT>
class Tcgen05DeallocOpGenericAdaptor : public detail::Tcgen05DeallocOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::Tcgen05DeallocOpGenericAdaptorBase;
static constexpr int odsIndex_taddr = 0;
static constexpr int odsIndex_nCols = 1;
public:
Tcgen05DeallocOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
Tcgen05DeallocOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Tcgen05DeallocOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
Tcgen05DeallocOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : Tcgen05DeallocOpGenericAdaptor(values, attrs, Properties{}, {}) {}
Tcgen05DeallocOpGenericAdaptor(RangeT values, const Tcgen05DeallocOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = Tcgen05DeallocOp, typename = std::enable_if_t<std::is_same_v<LateInst, Tcgen05DeallocOp>>>
Tcgen05DeallocOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getTaddr() {
return (*getODSOperands(0).begin());
}
ValueT getNCols() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class Tcgen05DeallocOpAdaptor : public Tcgen05DeallocOpGenericAdaptor<::mlir::ValueRange> {
public:
using Tcgen05DeallocOpGenericAdaptor::Tcgen05DeallocOpGenericAdaptor;
Tcgen05DeallocOpAdaptor(Tcgen05DeallocOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class Tcgen05DeallocOp : public ::mlir::Op<Tcgen05DeallocOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<1002,1012,1102>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = Tcgen05DeallocOpAdaptor;
template <typename RangeT>
using GenericAdaptor = Tcgen05DeallocOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_taddr = 0;
static constexpr int odsIndex_nCols = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("group")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getGroupAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getGroupAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.tcgen05.dealloc");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getTaddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getNCols() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getTaddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getNColsMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::CTAGroupKindAttr getGroupAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::CTAGroupKindAttr>(getProperties().group);
}
::mlir::NVVM::CTAGroupKind getGroup();
void setGroupAttr(::mlir::NVVM::CTAGroupKindAttr attr) {
getProperties().group = attr;
}
void setGroup(::mlir::NVVM::CTAGroupKind attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value taddr, ::mlir::Value nCols, ::mlir::NVVM::CTAGroupKindAttr group);
static Tcgen05DeallocOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value taddr, ::mlir::Value nCols, ::mlir::NVVM::CTAGroupKindAttr group);
static Tcgen05DeallocOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value taddr, ::mlir::Value nCols, ::mlir::NVVM::CTAGroupKindAttr group);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value taddr, ::mlir::Value nCols, ::mlir::NVVM::CTAGroupKindAttr group);
static Tcgen05DeallocOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value taddr, ::mlir::Value nCols, ::mlir::NVVM::CTAGroupKindAttr group);
static Tcgen05DeallocOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value taddr, ::mlir::Value nCols, ::mlir::NVVM::CTAGroupKindAttr group);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value taddr, ::mlir::Value nCols, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static Tcgen05DeallocOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value taddr, ::mlir::Value nCols, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static Tcgen05DeallocOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value taddr, ::mlir::Value nCols, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value taddr, ::mlir::Value nCols, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static Tcgen05DeallocOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value taddr, ::mlir::Value nCols, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static Tcgen05DeallocOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value taddr, ::mlir::Value nCols, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05DeallocOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05DeallocOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05DeallocOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05DeallocOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static llvm::Intrinsic::ID
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::SmallVector<llvm::Value *> &args);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05DeallocOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::Tcgen05DeallocOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::Tcgen05FenceOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class Tcgen05FenceOpGenericAdaptorBase {
public:
struct Properties {
using kindTy = ::mlir::NVVM::Tcgen05FenceKindAttr;
kindTy kind;
auto getKind() const {
auto &propStorage = this->kind;
return ::llvm::cast<::mlir::NVVM::Tcgen05FenceKindAttr>(propStorage);
}
void setKind(const ::mlir::NVVM::Tcgen05FenceKindAttr &propValue) {
this->kind = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.kind == this->kind &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
Tcgen05FenceOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.tcgen05.fence", odsAttrs.getContext());
}
Tcgen05FenceOpGenericAdaptorBase(Tcgen05FenceOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::Tcgen05FenceKindAttr getKindAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::Tcgen05FenceKindAttr>(getProperties().kind);
return attr;
}
::mlir::NVVM::Tcgen05FenceKind getKind();
};
} // namespace detail
template <typename RangeT>
class Tcgen05FenceOpGenericAdaptor : public detail::Tcgen05FenceOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::Tcgen05FenceOpGenericAdaptorBase;
public:
Tcgen05FenceOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
Tcgen05FenceOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Tcgen05FenceOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
Tcgen05FenceOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : Tcgen05FenceOpGenericAdaptor(values, attrs, Properties{}, {}) {}
Tcgen05FenceOpGenericAdaptor(RangeT values, const Tcgen05FenceOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = Tcgen05FenceOp, typename = std::enable_if_t<std::is_same_v<LateInst, Tcgen05FenceOp>>>
Tcgen05FenceOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class Tcgen05FenceOpAdaptor : public Tcgen05FenceOpGenericAdaptor<::mlir::ValueRange> {
public:
using Tcgen05FenceOpGenericAdaptor::Tcgen05FenceOpGenericAdaptor;
Tcgen05FenceOpAdaptor(Tcgen05FenceOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class Tcgen05FenceOp : public ::mlir::Op<Tcgen05FenceOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<1002,1012,1102>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = Tcgen05FenceOpAdaptor;
template <typename RangeT>
using GenericAdaptor = Tcgen05FenceOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("kind")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getKindAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getKindAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.tcgen05.fence");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::Tcgen05FenceKindAttr getKindAttr() {
return ::llvm::cast<::mlir::NVVM::Tcgen05FenceKindAttr>(getProperties().kind);
}
::mlir::NVVM::Tcgen05FenceKind getKind();
void setKindAttr(::mlir::NVVM::Tcgen05FenceKindAttr attr) {
getProperties().kind = attr;
}
void setKind(::mlir::NVVM::Tcgen05FenceKind attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::Tcgen05FenceKindAttr kind);
static Tcgen05FenceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::Tcgen05FenceKindAttr kind);
static Tcgen05FenceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::Tcgen05FenceKindAttr kind);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05FenceKindAttr kind);
static Tcgen05FenceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05FenceKindAttr kind);
static Tcgen05FenceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05FenceKindAttr kind);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::Tcgen05FenceKind kind);
static Tcgen05FenceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::Tcgen05FenceKind kind);
static Tcgen05FenceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::Tcgen05FenceKind kind);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05FenceKind kind);
static Tcgen05FenceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05FenceKind kind);
static Tcgen05FenceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05FenceKind kind);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05FenceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05FenceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05FenceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05FenceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05FenceOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::Tcgen05FenceOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::Tcgen05LdOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class Tcgen05LdOpGenericAdaptorBase {
public:
struct Properties {
using packTy = ::mlir::UnitAttr;
packTy pack;
auto getPack() const {
auto &propStorage = this->pack;
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage);
}
void setPack(const ::mlir::UnitAttr &propValue) {
this->pack = propValue;
}
using shapeTy = ::mlir::NVVM::Tcgen05LdStShapeAttr;
shapeTy shape;
auto getShape() const {
auto &propStorage = this->shape;
return ::llvm::cast<::mlir::NVVM::Tcgen05LdStShapeAttr>(propStorage);
}
void setShape(const ::mlir::NVVM::Tcgen05LdStShapeAttr &propValue) {
this->shape = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.pack == this->pack &&
rhs.shape == this->shape &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
Tcgen05LdOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.tcgen05.ld", odsAttrs.getContext());
}
Tcgen05LdOpGenericAdaptorBase(Tcgen05LdOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::UnitAttr getPackAttr();
bool getPack();
::mlir::NVVM::Tcgen05LdStShapeAttr getShapeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::Tcgen05LdStShapeAttr>(getProperties().shape);
return attr;
}
::mlir::NVVM::Tcgen05LdStShape getShape();
};
} // namespace detail
template <typename RangeT>
class Tcgen05LdOpGenericAdaptor : public detail::Tcgen05LdOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::Tcgen05LdOpGenericAdaptorBase;
static constexpr int odsIndex_tmemAddr = 0;
static constexpr int odsIndex_offset = 1;
public:
Tcgen05LdOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
Tcgen05LdOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Tcgen05LdOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
Tcgen05LdOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : Tcgen05LdOpGenericAdaptor(values, attrs, Properties{}, {}) {}
Tcgen05LdOpGenericAdaptor(RangeT values, const Tcgen05LdOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = Tcgen05LdOp, typename = std::enable_if_t<std::is_same_v<LateInst, Tcgen05LdOp>>>
Tcgen05LdOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getTmemAddr() {
return (*getODSOperands(0).begin());
}
ValueT getOffset() {
auto operands = getODSOperands(1);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class Tcgen05LdOpAdaptor : public Tcgen05LdOpGenericAdaptor<::mlir::ValueRange> {
public:
using Tcgen05LdOpGenericAdaptor::Tcgen05LdOpGenericAdaptor;
Tcgen05LdOpAdaptor(Tcgen05LdOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class Tcgen05LdOp : public ::mlir::Op<Tcgen05LdOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<1002,1012,1102>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = Tcgen05LdOpAdaptor;
template <typename RangeT>
using GenericAdaptor = Tcgen05LdOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_tmemAddr = 0;
static constexpr int odsIndex_offset = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("pack"), ::llvm::StringRef("shape")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getPackAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getPackAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getShapeAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getShapeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.tcgen05.ld");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getTmemAddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getOffset() {
auto operands = getODSOperands(1);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getTmemAddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getOffsetMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::UnitAttr getPackAttr() {
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().pack);
}
bool getPack();
::mlir::NVVM::Tcgen05LdStShapeAttr getShapeAttr() {
return ::llvm::cast<::mlir::NVVM::Tcgen05LdStShapeAttr>(getProperties().shape);
}
::mlir::NVVM::Tcgen05LdStShape getShape();
void setPackAttr(::mlir::UnitAttr attr) {
getProperties().pack = attr;
}
void setPack(bool attrValue);
void setShapeAttr(::mlir::NVVM::Tcgen05LdStShapeAttr attr) {
getProperties().shape = attr;
}
void setShape(::mlir::NVVM::Tcgen05LdStShape attrValue);
::mlir::Attribute removePackAttr() {
auto attr = getProperties().pack;
getProperties().pack = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::UnitAttr pack, ::mlir::NVVM::Tcgen05LdStShapeAttr shape, ::mlir::Value tmemAddr, /*optional*/::mlir::Value offset);
static Tcgen05LdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::UnitAttr pack, ::mlir::NVVM::Tcgen05LdStShapeAttr shape, ::mlir::Value tmemAddr, /*optional*/::mlir::Value offset);
static Tcgen05LdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::UnitAttr pack, ::mlir::NVVM::Tcgen05LdStShapeAttr shape, ::mlir::Value tmemAddr, /*optional*/::mlir::Value offset);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::UnitAttr pack, ::mlir::NVVM::Tcgen05LdStShapeAttr shape, ::mlir::Value tmemAddr, /*optional*/::mlir::Value offset);
static Tcgen05LdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::UnitAttr pack, ::mlir::NVVM::Tcgen05LdStShapeAttr shape, ::mlir::Value tmemAddr, /*optional*/::mlir::Value offset);
static Tcgen05LdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::UnitAttr pack, ::mlir::NVVM::Tcgen05LdStShapeAttr shape, ::mlir::Value tmemAddr, /*optional*/::mlir::Value offset);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/bool pack, ::mlir::NVVM::Tcgen05LdStShape shape, ::mlir::Value tmemAddr, /*optional*/::mlir::Value offset);
static Tcgen05LdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/bool pack, ::mlir::NVVM::Tcgen05LdStShape shape, ::mlir::Value tmemAddr, /*optional*/::mlir::Value offset);
static Tcgen05LdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/bool pack, ::mlir::NVVM::Tcgen05LdStShape shape, ::mlir::Value tmemAddr, /*optional*/::mlir::Value offset);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/bool pack, ::mlir::NVVM::Tcgen05LdStShape shape, ::mlir::Value tmemAddr, /*optional*/::mlir::Value offset);
static Tcgen05LdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/bool pack, ::mlir::NVVM::Tcgen05LdStShape shape, ::mlir::Value tmemAddr, /*optional*/::mlir::Value offset);
static Tcgen05LdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/bool pack, ::mlir::NVVM::Tcgen05LdStShape shape, ::mlir::Value tmemAddr, /*optional*/::mlir::Value offset);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05LdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05LdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05LdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05LdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05LdOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::Tcgen05LdOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::Tcgen05LdRedOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class Tcgen05LdRedOpGenericAdaptorBase {
public:
struct Properties {
using absTy = ::mlir::UnitAttr;
absTy abs;
auto getAbs() const {
auto &propStorage = this->abs;
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage);
}
void setAbs(const ::mlir::UnitAttr &propValue) {
this->abs = propValue;
}
using nanTy = ::mlir::UnitAttr;
nanTy nan;
auto getNan() const {
auto &propStorage = this->nan;
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage);
}
void setNan(const ::mlir::UnitAttr &propValue) {
this->nan = propValue;
}
using opTy = ::mlir::NVVM::ReductionKindAttr;
opTy op;
auto getOp() const {
auto &propStorage = this->op;
return ::llvm::cast<::mlir::NVVM::ReductionKindAttr>(propStorage);
}
void setOp(const ::mlir::NVVM::ReductionKindAttr &propValue) {
this->op = propValue;
}
using shapeTy = ::mlir::NVVM::Tcgen05LdStShapeAttr;
shapeTy shape;
auto getShape() const {
auto &propStorage = this->shape;
return ::llvm::cast<::mlir::NVVM::Tcgen05LdStShapeAttr>(propStorage);
}
void setShape(const ::mlir::NVVM::Tcgen05LdStShapeAttr &propValue) {
this->shape = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.abs == this->abs &&
rhs.nan == this->nan &&
rhs.op == this->op &&
rhs.shape == this->shape &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
Tcgen05LdRedOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.tcgen05.ld.red", odsAttrs.getContext());
}
Tcgen05LdRedOpGenericAdaptorBase(Tcgen05LdRedOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::Tcgen05LdStShapeAttr getShapeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::Tcgen05LdStShapeAttr>(getProperties().shape);
return attr;
}
::mlir::NVVM::Tcgen05LdStShape getShape();
::mlir::NVVM::ReductionKindAttr getOpAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::ReductionKindAttr>(getProperties().op);
return attr;
}
::mlir::NVVM::ReductionKind getOp();
::mlir::UnitAttr getAbsAttr();
bool getAbs();
::mlir::UnitAttr getNanAttr();
bool getNan();
};
} // namespace detail
template <typename RangeT>
class Tcgen05LdRedOpGenericAdaptor : public detail::Tcgen05LdRedOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::Tcgen05LdRedOpGenericAdaptorBase;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_offset = 1;
public:
Tcgen05LdRedOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
Tcgen05LdRedOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Tcgen05LdRedOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
Tcgen05LdRedOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : Tcgen05LdRedOpGenericAdaptor(values, attrs, Properties{}, {}) {}
Tcgen05LdRedOpGenericAdaptor(RangeT values, const Tcgen05LdRedOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = Tcgen05LdRedOp, typename = std::enable_if_t<std::is_same_v<LateInst, Tcgen05LdRedOp>>>
Tcgen05LdRedOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getAddr() {
return (*getODSOperands(0).begin());
}
ValueT getOffset() {
auto operands = getODSOperands(1);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class Tcgen05LdRedOpAdaptor : public Tcgen05LdRedOpGenericAdaptor<::mlir::ValueRange> {
public:
using Tcgen05LdRedOpGenericAdaptor::Tcgen05LdRedOpGenericAdaptor;
Tcgen05LdRedOpAdaptor(Tcgen05LdRedOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class Tcgen05LdRedOp : public ::mlir::Op<Tcgen05LdRedOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::NResults<2>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<1013,1103,1012,1032,1102>::Impl, ::mlir::OpAsmOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = Tcgen05LdRedOpAdaptor;
template <typename RangeT>
using GenericAdaptor = Tcgen05LdRedOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_offset = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("abs"), ::llvm::StringRef("nan"), ::llvm::StringRef("op"), ::llvm::StringRef("shape")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getAbsAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getAbsAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getNanAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getNanAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getOpAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getOpAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
::mlir::StringAttr getShapeAttrName() {
return getAttributeNameForIndex(3);
}
static ::mlir::StringAttr getShapeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 3);
}
void getAsmResultNames(::mlir::OpAsmSetValueNameFn setNameFn);
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.tcgen05.ld.red");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getAddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getOffset() {
auto operands = getODSOperands(1);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getAddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getOffsetMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getData() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSResults(0).begin());
}
::mlir::TypedValue<::mlir::Type> getRedVal() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(1).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::Tcgen05LdStShapeAttr getShapeAttr() {
return ::llvm::cast<::mlir::NVVM::Tcgen05LdStShapeAttr>(getProperties().shape);
}
::mlir::NVVM::Tcgen05LdStShape getShape();
::mlir::NVVM::ReductionKindAttr getOpAttr() {
return ::llvm::cast<::mlir::NVVM::ReductionKindAttr>(getProperties().op);
}
::mlir::NVVM::ReductionKind getOp();
::mlir::UnitAttr getAbsAttr() {
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().abs);
}
bool getAbs();
::mlir::UnitAttr getNanAttr() {
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().nan);
}
bool getNan();
void setShapeAttr(::mlir::NVVM::Tcgen05LdStShapeAttr attr) {
getProperties().shape = attr;
}
void setShape(::mlir::NVVM::Tcgen05LdStShape attrValue);
void setOpAttr(::mlir::NVVM::ReductionKindAttr attr) {
getProperties().op = attr;
}
void setOp(::mlir::NVVM::ReductionKind attrValue);
void setAbsAttr(::mlir::UnitAttr attr) {
getProperties().abs = attr;
}
void setAbs(bool attrValue);
void setNanAttr(::mlir::UnitAttr attr) {
getProperties().nan = attr;
}
void setNan(bool attrValue);
::mlir::Attribute removeAbsAttr() {
auto attr = getProperties().abs;
getProperties().abs = {};
return attr;
}
::mlir::Attribute removeNanAttr() {
auto attr = getProperties().nan;
getProperties().nan = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type data, ::mlir::Type redVal, ::mlir::NVVM::Tcgen05LdStShapeAttr shape, ::mlir::NVVM::ReductionKindAttr op, /*optional*/::mlir::UnitAttr abs, /*optional*/::mlir::UnitAttr nan, ::mlir::Value addr, /*optional*/::mlir::Value offset);
static Tcgen05LdRedOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type data, ::mlir::Type redVal, ::mlir::NVVM::Tcgen05LdStShapeAttr shape, ::mlir::NVVM::ReductionKindAttr op, /*optional*/::mlir::UnitAttr abs, /*optional*/::mlir::UnitAttr nan, ::mlir::Value addr, /*optional*/::mlir::Value offset);
static Tcgen05LdRedOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type data, ::mlir::Type redVal, ::mlir::NVVM::Tcgen05LdStShapeAttr shape, ::mlir::NVVM::ReductionKindAttr op, /*optional*/::mlir::UnitAttr abs, /*optional*/::mlir::UnitAttr nan, ::mlir::Value addr, /*optional*/::mlir::Value offset);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05LdStShapeAttr shape, ::mlir::NVVM::ReductionKindAttr op, /*optional*/::mlir::UnitAttr abs, /*optional*/::mlir::UnitAttr nan, ::mlir::Value addr, /*optional*/::mlir::Value offset);
static Tcgen05LdRedOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05LdStShapeAttr shape, ::mlir::NVVM::ReductionKindAttr op, /*optional*/::mlir::UnitAttr abs, /*optional*/::mlir::UnitAttr nan, ::mlir::Value addr, /*optional*/::mlir::Value offset);
static Tcgen05LdRedOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05LdStShapeAttr shape, ::mlir::NVVM::ReductionKindAttr op, /*optional*/::mlir::UnitAttr abs, /*optional*/::mlir::UnitAttr nan, ::mlir::Value addr, /*optional*/::mlir::Value offset);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type data, ::mlir::Type redVal, ::mlir::NVVM::Tcgen05LdStShape shape, ::mlir::NVVM::ReductionKind op, /*optional*/bool abs, /*optional*/bool nan, ::mlir::Value addr, /*optional*/::mlir::Value offset);
static Tcgen05LdRedOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type data, ::mlir::Type redVal, ::mlir::NVVM::Tcgen05LdStShape shape, ::mlir::NVVM::ReductionKind op, /*optional*/bool abs, /*optional*/bool nan, ::mlir::Value addr, /*optional*/::mlir::Value offset);
static Tcgen05LdRedOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type data, ::mlir::Type redVal, ::mlir::NVVM::Tcgen05LdStShape shape, ::mlir::NVVM::ReductionKind op, /*optional*/bool abs, /*optional*/bool nan, ::mlir::Value addr, /*optional*/::mlir::Value offset);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05LdStShape shape, ::mlir::NVVM::ReductionKind op, /*optional*/bool abs, /*optional*/bool nan, ::mlir::Value addr, /*optional*/::mlir::Value offset);
static Tcgen05LdRedOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05LdStShape shape, ::mlir::NVVM::ReductionKind op, /*optional*/bool abs, /*optional*/bool nan, ::mlir::Value addr, /*optional*/::mlir::Value offset);
static Tcgen05LdRedOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05LdStShape shape, ::mlir::NVVM::ReductionKind op, /*optional*/bool abs, /*optional*/bool nan, ::mlir::Value addr, /*optional*/::mlir::Value offset);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05LdRedOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05LdRedOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05LdRedOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05LdRedOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 4 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static mlir::NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05LdRedOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::Tcgen05LdRedOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::Tcgen05MMABlockScaleOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class Tcgen05MMABlockScaleOpGenericAdaptorBase {
public:
struct Properties {
using blockScaleTy = ::mlir::NVVM::Tcgen05MMABlockScaleAttr;
blockScaleTy blockScale;
auto getBlockScale() const {
auto &propStorage = this->blockScale;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::Tcgen05MMABlockScaleAttr>(propStorage);
}
void setBlockScale(const ::mlir::NVVM::Tcgen05MMABlockScaleAttr &propValue) {
this->blockScale = propValue;
}
using collectorOpTy = ::mlir::NVVM::Tcgen05MMACollectorOpAttr;
collectorOpTy collectorOp;
auto getCollectorOp() const {
auto &propStorage = this->collectorOp;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::Tcgen05MMACollectorOpAttr>(propStorage);
}
void setCollectorOp(const ::mlir::NVVM::Tcgen05MMACollectorOpAttr &propValue) {
this->collectorOp = propValue;
}
using ctaGroupTy = ::mlir::NVVM::CTAGroupKindAttr;
ctaGroupTy ctaGroup;
auto getCtaGroup() const {
auto &propStorage = this->ctaGroup;
return ::llvm::cast<::mlir::NVVM::CTAGroupKindAttr>(propStorage);
}
void setCtaGroup(const ::mlir::NVVM::CTAGroupKindAttr &propValue) {
this->ctaGroup = propValue;
}
using kindTy = ::mlir::NVVM::Tcgen05MMAKindAttr;
kindTy kind;
auto getKind() const {
auto &propStorage = this->kind;
return ::llvm::cast<::mlir::NVVM::Tcgen05MMAKindAttr>(propStorage);
}
void setKind(const ::mlir::NVVM::Tcgen05MMAKindAttr &propValue) {
this->kind = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.blockScale == this->blockScale &&
rhs.collectorOp == this->collectorOp &&
rhs.ctaGroup == this->ctaGroup &&
rhs.kind == this->kind &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
Tcgen05MMABlockScaleOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.tcgen05.mma.block_scale", odsAttrs.getContext());
}
Tcgen05MMABlockScaleOpGenericAdaptorBase(Tcgen05MMABlockScaleOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::Tcgen05MMAKindAttr getKindAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::Tcgen05MMAKindAttr>(getProperties().kind);
return attr;
}
::mlir::NVVM::Tcgen05MMAKind getKind();
::mlir::NVVM::CTAGroupKindAttr getCtaGroupAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::CTAGroupKindAttr>(getProperties().ctaGroup);
return attr;
}
::mlir::NVVM::CTAGroupKind getCtaGroup();
::mlir::NVVM::Tcgen05MMABlockScaleAttr getBlockScaleAttr();
::mlir::NVVM::Tcgen05MMABlockScale getBlockScale();
::mlir::NVVM::Tcgen05MMACollectorOpAttr getCollectorOpAttr();
::mlir::NVVM::Tcgen05MMACollectorOp getCollectorOp();
};
} // namespace detail
template <typename RangeT>
class Tcgen05MMABlockScaleOpGenericAdaptor : public detail::Tcgen05MMABlockScaleOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::Tcgen05MMABlockScaleOpGenericAdaptorBase;
static constexpr int odsIndex_matrixD = 0;
static constexpr int odsIndex_matrixA = 1;
static constexpr int odsIndex_matrixB = 2;
static constexpr int odsIndex_idesc = 3;
static constexpr int odsIndex_enableInputD = 4;
static constexpr int odsIndex_scaleA = 5;
static constexpr int odsIndex_scaleB = 6;
public:
Tcgen05MMABlockScaleOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
Tcgen05MMABlockScaleOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Tcgen05MMABlockScaleOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
Tcgen05MMABlockScaleOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : Tcgen05MMABlockScaleOpGenericAdaptor(values, attrs, Properties{}, {}) {}
Tcgen05MMABlockScaleOpGenericAdaptor(RangeT values, const Tcgen05MMABlockScaleOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = Tcgen05MMABlockScaleOp, typename = std::enable_if_t<std::is_same_v<LateInst, Tcgen05MMABlockScaleOp>>>
Tcgen05MMABlockScaleOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getMatrixD() {
return (*getODSOperands(0).begin());
}
ValueT getMatrixA() {
return (*getODSOperands(1).begin());
}
ValueT getMatrixB() {
return (*getODSOperands(2).begin());
}
ValueT getIdesc() {
return (*getODSOperands(3).begin());
}
ValueT getEnableInputD() {
return (*getODSOperands(4).begin());
}
ValueT getScaleA() {
return (*getODSOperands(5).begin());
}
ValueT getScaleB() {
return (*getODSOperands(6).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class Tcgen05MMABlockScaleOpAdaptor : public Tcgen05MMABlockScaleOpGenericAdaptor<::mlir::ValueRange> {
public:
using Tcgen05MMABlockScaleOpGenericAdaptor::Tcgen05MMABlockScaleOpGenericAdaptor;
Tcgen05MMABlockScaleOpAdaptor(Tcgen05MMABlockScaleOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class Tcgen05MMABlockScaleOp : public ::mlir::Op<Tcgen05MMABlockScaleOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<7>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<1002,1012,1102>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = Tcgen05MMABlockScaleOpAdaptor;
template <typename RangeT>
using GenericAdaptor = Tcgen05MMABlockScaleOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_matrixD = 0;
static constexpr int odsIndex_matrixA = 1;
static constexpr int odsIndex_matrixB = 2;
static constexpr int odsIndex_idesc = 3;
static constexpr int odsIndex_enableInputD = 4;
static constexpr int odsIndex_scaleA = 5;
static constexpr int odsIndex_scaleB = 6;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("blockScale"), ::llvm::StringRef("collectorOp"), ::llvm::StringRef("ctaGroup"), ::llvm::StringRef("kind")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getBlockScaleAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getBlockScaleAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getCollectorOpAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getCollectorOpAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getCtaGroupAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getCtaGroupAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
::mlir::StringAttr getKindAttrName() {
return getAttributeNameForIndex(3);
}
static ::mlir::StringAttr getKindAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 3);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.tcgen05.mma.block_scale");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getMatrixD() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::Type> getMatrixA() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getMatrixB() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getIdesc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getEnableInputD() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(4).begin());
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getScaleA() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(5).begin());
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getScaleB() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(6).begin());
}
::mlir::OpOperand &getMatrixDMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getMatrixAMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getMatrixBMutable() {
auto range = getODSOperandIndexAndLength(2);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getIdescMutable() {
auto range = getODSOperandIndexAndLength(3);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getEnableInputDMutable() {
auto range = getODSOperandIndexAndLength(4);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getScaleAMutable() {
auto range = getODSOperandIndexAndLength(5);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getScaleBMutable() {
auto range = getODSOperandIndexAndLength(6);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::Tcgen05MMAKindAttr getKindAttr() {
return ::llvm::cast<::mlir::NVVM::Tcgen05MMAKindAttr>(getProperties().kind);
}
::mlir::NVVM::Tcgen05MMAKind getKind();
::mlir::NVVM::CTAGroupKindAttr getCtaGroupAttr() {
return ::llvm::cast<::mlir::NVVM::CTAGroupKindAttr>(getProperties().ctaGroup);
}
::mlir::NVVM::CTAGroupKind getCtaGroup();
::mlir::NVVM::Tcgen05MMABlockScaleAttr getBlockScaleAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::Tcgen05MMABlockScaleAttr>(getProperties().blockScale);
}
::mlir::NVVM::Tcgen05MMABlockScale getBlockScale();
::mlir::NVVM::Tcgen05MMACollectorOpAttr getCollectorOpAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::Tcgen05MMACollectorOpAttr>(getProperties().collectorOp);
}
::mlir::NVVM::Tcgen05MMACollectorOp getCollectorOp();
void setKindAttr(::mlir::NVVM::Tcgen05MMAKindAttr attr) {
getProperties().kind = attr;
}
void setKind(::mlir::NVVM::Tcgen05MMAKind attrValue);
void setCtaGroupAttr(::mlir::NVVM::CTAGroupKindAttr attr) {
getProperties().ctaGroup = attr;
}
void setCtaGroup(::mlir::NVVM::CTAGroupKind attrValue);
void setBlockScaleAttr(::mlir::NVVM::Tcgen05MMABlockScaleAttr attr) {
getProperties().blockScale = attr;
}
void setBlockScale(::mlir::NVVM::Tcgen05MMABlockScale attrValue);
void setCollectorOpAttr(::mlir::NVVM::Tcgen05MMACollectorOpAttr attr) {
getProperties().collectorOp = attr;
}
void setCollectorOp(::mlir::NVVM::Tcgen05MMACollectorOp attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::CTAGroupKindAttr ctaGroup, ::mlir::NVVM::Tcgen05MMABlockScaleAttr blockScale, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value scaleA, ::mlir::Value scaleB);
static Tcgen05MMABlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::CTAGroupKindAttr ctaGroup, ::mlir::NVVM::Tcgen05MMABlockScaleAttr blockScale, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value scaleA, ::mlir::Value scaleB);
static Tcgen05MMABlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::CTAGroupKindAttr ctaGroup, ::mlir::NVVM::Tcgen05MMABlockScaleAttr blockScale, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value scaleA, ::mlir::Value scaleB);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::CTAGroupKindAttr ctaGroup, ::mlir::NVVM::Tcgen05MMABlockScaleAttr blockScale, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value scaleA, ::mlir::Value scaleB);
static Tcgen05MMABlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::CTAGroupKindAttr ctaGroup, ::mlir::NVVM::Tcgen05MMABlockScaleAttr blockScale, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value scaleA, ::mlir::Value scaleB);
static Tcgen05MMABlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::CTAGroupKindAttr ctaGroup, ::mlir::NVVM::Tcgen05MMABlockScaleAttr blockScale, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value scaleA, ::mlir::Value scaleB);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::CTAGroupKind ctaGroup, ::mlir::NVVM::Tcgen05MMABlockScale blockScale, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value scaleA, ::mlir::Value scaleB);
static Tcgen05MMABlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::CTAGroupKind ctaGroup, ::mlir::NVVM::Tcgen05MMABlockScale blockScale, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value scaleA, ::mlir::Value scaleB);
static Tcgen05MMABlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::CTAGroupKind ctaGroup, ::mlir::NVVM::Tcgen05MMABlockScale blockScale, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value scaleA, ::mlir::Value scaleB);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::CTAGroupKind ctaGroup, ::mlir::NVVM::Tcgen05MMABlockScale blockScale, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value scaleA, ::mlir::Value scaleB);
static Tcgen05MMABlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::CTAGroupKind ctaGroup, ::mlir::NVVM::Tcgen05MMABlockScale blockScale, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value scaleA, ::mlir::Value scaleB);
static Tcgen05MMABlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::CTAGroupKind ctaGroup, ::mlir::NVVM::Tcgen05MMABlockScale blockScale, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value scaleA, ::mlir::Value scaleB);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05MMABlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05MMABlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05MMABlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05MMABlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 4 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static mlir::NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05MMABlockScaleOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::Tcgen05MMABlockScaleOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::Tcgen05MMAOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class Tcgen05MMAOpGenericAdaptorBase {
public:
struct Properties {
using aShiftTy = ::mlir::UnitAttr;
aShiftTy aShift;
auto getAShift() const {
auto &propStorage = this->aShift;
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage);
}
void setAShift(const ::mlir::UnitAttr &propValue) {
this->aShift = propValue;
}
using collectorOpTy = ::mlir::NVVM::Tcgen05MMACollectorOpAttr;
collectorOpTy collectorOp;
auto getCollectorOp() const {
auto &propStorage = this->collectorOp;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::Tcgen05MMACollectorOpAttr>(propStorage);
}
void setCollectorOp(const ::mlir::NVVM::Tcgen05MMACollectorOpAttr &propValue) {
this->collectorOp = propValue;
}
using ctaGroupTy = ::mlir::NVVM::CTAGroupKindAttr;
ctaGroupTy ctaGroup;
auto getCtaGroup() const {
auto &propStorage = this->ctaGroup;
return ::llvm::cast<::mlir::NVVM::CTAGroupKindAttr>(propStorage);
}
void setCtaGroup(const ::mlir::NVVM::CTAGroupKindAttr &propValue) {
this->ctaGroup = propValue;
}
using kindTy = ::mlir::NVVM::Tcgen05MMAKindAttr;
kindTy kind;
auto getKind() const {
auto &propStorage = this->kind;
return ::llvm::cast<::mlir::NVVM::Tcgen05MMAKindAttr>(propStorage);
}
void setKind(const ::mlir::NVVM::Tcgen05MMAKindAttr &propValue) {
this->kind = propValue;
}
using operandSegmentSizesTy = std::array<int32_t, 7>;
operandSegmentSizesTy operandSegmentSizes;
::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
auto &propStorage = this->operandSegmentSizes;
return propStorage;
}
void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
auto &propStorage = this->operandSegmentSizes;
::llvm::copy(propValue, propStorage.begin());
}
bool operator==(const Properties &rhs) const {
return
rhs.aShift == this->aShift &&
rhs.collectorOp == this->collectorOp &&
rhs.ctaGroup == this->ctaGroup &&
rhs.kind == this->kind &&
rhs.operandSegmentSizes == this->operandSegmentSizes &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
Tcgen05MMAOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.tcgen05.mma", odsAttrs.getContext());
}
Tcgen05MMAOpGenericAdaptorBase(Tcgen05MMAOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::Tcgen05MMAKindAttr getKindAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::Tcgen05MMAKindAttr>(getProperties().kind);
return attr;
}
::mlir::NVVM::Tcgen05MMAKind getKind();
::mlir::NVVM::CTAGroupKindAttr getCtaGroupAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::CTAGroupKindAttr>(getProperties().ctaGroup);
return attr;
}
::mlir::NVVM::CTAGroupKind getCtaGroup();
::mlir::NVVM::Tcgen05MMACollectorOpAttr getCollectorOpAttr();
::mlir::NVVM::Tcgen05MMACollectorOp getCollectorOp();
::mlir::UnitAttr getAShiftAttr();
bool getAShift();
};
} // namespace detail
template <typename RangeT>
class Tcgen05MMAOpGenericAdaptor : public detail::Tcgen05MMAOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::Tcgen05MMAOpGenericAdaptorBase;
static constexpr int odsIndex_matrixD = 0;
static constexpr int odsIndex_matrixA = 1;
static constexpr int odsIndex_matrixB = 2;
static constexpr int odsIndex_idesc = 3;
static constexpr int odsIndex_enableInputD = 4;
static constexpr int odsIndex_scaleInputD = 5;
static constexpr int odsIndex_disableOutputLane = 6;
public:
Tcgen05MMAOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
Tcgen05MMAOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Tcgen05MMAOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
Tcgen05MMAOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : Tcgen05MMAOpGenericAdaptor(values, attrs, Properties{}, {}) {}
Tcgen05MMAOpGenericAdaptor(RangeT values, const Tcgen05MMAOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = Tcgen05MMAOp, typename = std::enable_if_t<std::is_same_v<LateInst, Tcgen05MMAOp>>>
Tcgen05MMAOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getMatrixD() {
return (*getODSOperands(0).begin());
}
ValueT getMatrixA() {
return (*getODSOperands(1).begin());
}
ValueT getMatrixB() {
return (*getODSOperands(2).begin());
}
ValueT getIdesc() {
return (*getODSOperands(3).begin());
}
ValueT getEnableInputD() {
return (*getODSOperands(4).begin());
}
ValueT getScaleInputD() {
auto operands = getODSOperands(5);
return operands.empty() ? ValueT{} : (*operands.begin());
}
ValueT getDisableOutputLane() {
auto operands = getODSOperands(6);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class Tcgen05MMAOpAdaptor : public Tcgen05MMAOpGenericAdaptor<::mlir::ValueRange> {
public:
using Tcgen05MMAOpGenericAdaptor::Tcgen05MMAOpGenericAdaptor;
Tcgen05MMAOpAdaptor(Tcgen05MMAOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class Tcgen05MMAOp : public ::mlir::Op<Tcgen05MMAOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<5>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<1002,1012,1102>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = Tcgen05MMAOpAdaptor;
template <typename RangeT>
using GenericAdaptor = Tcgen05MMAOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_matrixD = 0;
static constexpr int odsIndex_matrixA = 1;
static constexpr int odsIndex_matrixB = 2;
static constexpr int odsIndex_idesc = 3;
static constexpr int odsIndex_enableInputD = 4;
static constexpr int odsIndex_scaleInputD = 5;
static constexpr int odsIndex_disableOutputLane = 6;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("aShift"), ::llvm::StringRef("collectorOp"), ::llvm::StringRef("ctaGroup"), ::llvm::StringRef("kind"), ::llvm::StringRef("operandSegmentSizes")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getAShiftAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getAShiftAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getCollectorOpAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getCollectorOpAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getCtaGroupAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getCtaGroupAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
::mlir::StringAttr getKindAttrName() {
return getAttributeNameForIndex(3);
}
static ::mlir::StringAttr getKindAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 3);
}
::mlir::StringAttr getOperandSegmentSizesAttrName() {
return (*this)->getName().getAttributeNames().back();
}
static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
return name.getAttributeNames().back();
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.tcgen05.mma");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getMatrixD() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::Type> getMatrixA() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getMatrixB() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getIdesc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getEnableInputD() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(4).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getScaleInputD() {
auto operands = getODSOperands(5);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::TypedValue<::mlir::VectorType> getDisableOutputLane() {
auto operands = getODSOperands(6);
return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*operands.begin());
}
::mlir::OpOperand &getMatrixDMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getMatrixAMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getMatrixBMutable() {
auto range = getODSOperandIndexAndLength(2);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getIdescMutable() {
auto range = getODSOperandIndexAndLength(3);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getEnableInputDMutable() {
auto range = getODSOperandIndexAndLength(4);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getScaleInputDMutable();
::mlir::MutableOperandRange getDisableOutputLaneMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::Tcgen05MMAKindAttr getKindAttr() {
return ::llvm::cast<::mlir::NVVM::Tcgen05MMAKindAttr>(getProperties().kind);
}
::mlir::NVVM::Tcgen05MMAKind getKind();
::mlir::NVVM::CTAGroupKindAttr getCtaGroupAttr() {
return ::llvm::cast<::mlir::NVVM::CTAGroupKindAttr>(getProperties().ctaGroup);
}
::mlir::NVVM::CTAGroupKind getCtaGroup();
::mlir::NVVM::Tcgen05MMACollectorOpAttr getCollectorOpAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::Tcgen05MMACollectorOpAttr>(getProperties().collectorOp);
}
::mlir::NVVM::Tcgen05MMACollectorOp getCollectorOp();
::mlir::UnitAttr getAShiftAttr() {
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().aShift);
}
bool getAShift();
void setKindAttr(::mlir::NVVM::Tcgen05MMAKindAttr attr) {
getProperties().kind = attr;
}
void setKind(::mlir::NVVM::Tcgen05MMAKind attrValue);
void setCtaGroupAttr(::mlir::NVVM::CTAGroupKindAttr attr) {
getProperties().ctaGroup = attr;
}
void setCtaGroup(::mlir::NVVM::CTAGroupKind attrValue);
void setCollectorOpAttr(::mlir::NVVM::Tcgen05MMACollectorOpAttr attr) {
getProperties().collectorOp = attr;
}
void setCollectorOp(::mlir::NVVM::Tcgen05MMACollectorOp attrValue);
void setAShiftAttr(::mlir::UnitAttr attr) {
getProperties().aShift = attr;
}
void setAShift(bool attrValue);
::mlir::Attribute removeAShiftAttr() {
auto attr = getProperties().aShift;
getProperties().aShift = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::CTAGroupKindAttr ctaGroup, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, /*optional*/::mlir::UnitAttr aShift, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, /*optional*/::mlir::Value scaleInputD, /*optional*/::mlir::Value disableOutputLane);
static Tcgen05MMAOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::CTAGroupKindAttr ctaGroup, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, /*optional*/::mlir::UnitAttr aShift, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, /*optional*/::mlir::Value scaleInputD, /*optional*/::mlir::Value disableOutputLane);
static Tcgen05MMAOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::CTAGroupKindAttr ctaGroup, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, /*optional*/::mlir::UnitAttr aShift, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, /*optional*/::mlir::Value scaleInputD, /*optional*/::mlir::Value disableOutputLane);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::CTAGroupKindAttr ctaGroup, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, /*optional*/::mlir::UnitAttr aShift, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, /*optional*/::mlir::Value scaleInputD, /*optional*/::mlir::Value disableOutputLane);
static Tcgen05MMAOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::CTAGroupKindAttr ctaGroup, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, /*optional*/::mlir::UnitAttr aShift, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, /*optional*/::mlir::Value scaleInputD, /*optional*/::mlir::Value disableOutputLane);
static Tcgen05MMAOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::CTAGroupKindAttr ctaGroup, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, /*optional*/::mlir::UnitAttr aShift, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, /*optional*/::mlir::Value scaleInputD, /*optional*/::mlir::Value disableOutputLane);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::CTAGroupKind ctaGroup, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, /*optional*/bool aShift, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, /*optional*/::mlir::Value scaleInputD, /*optional*/::mlir::Value disableOutputLane);
static Tcgen05MMAOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::CTAGroupKind ctaGroup, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, /*optional*/bool aShift, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, /*optional*/::mlir::Value scaleInputD, /*optional*/::mlir::Value disableOutputLane);
static Tcgen05MMAOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::CTAGroupKind ctaGroup, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, /*optional*/bool aShift, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, /*optional*/::mlir::Value scaleInputD, /*optional*/::mlir::Value disableOutputLane);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::CTAGroupKind ctaGroup, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, /*optional*/bool aShift, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, /*optional*/::mlir::Value scaleInputD, /*optional*/::mlir::Value disableOutputLane);
static Tcgen05MMAOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::CTAGroupKind ctaGroup, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, /*optional*/bool aShift, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, /*optional*/::mlir::Value scaleInputD, /*optional*/::mlir::Value disableOutputLane);
static Tcgen05MMAOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::CTAGroupKind ctaGroup, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, /*optional*/bool aShift, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, /*optional*/::mlir::Value scaleInputD, /*optional*/::mlir::Value disableOutputLane);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05MMAOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05MMAOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05MMAOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05MMAOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 4 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static mlir::NVVM::IDArgPair getIntrinsicIDAndArgs(
Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05MMAOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::Tcgen05MMAOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::Tcgen05MMASparseBlockScaleOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class Tcgen05MMASparseBlockScaleOpGenericAdaptorBase {
public:
struct Properties {
using blockScaleTy = ::mlir::NVVM::Tcgen05MMABlockScaleAttr;
blockScaleTy blockScale;
auto getBlockScale() const {
auto &propStorage = this->blockScale;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::Tcgen05MMABlockScaleAttr>(propStorage);
}
void setBlockScale(const ::mlir::NVVM::Tcgen05MMABlockScaleAttr &propValue) {
this->blockScale = propValue;
}
using collectorOpTy = ::mlir::NVVM::Tcgen05MMACollectorOpAttr;
collectorOpTy collectorOp;
auto getCollectorOp() const {
auto &propStorage = this->collectorOp;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::Tcgen05MMACollectorOpAttr>(propStorage);
}
void setCollectorOp(const ::mlir::NVVM::Tcgen05MMACollectorOpAttr &propValue) {
this->collectorOp = propValue;
}
using ctaGroupTy = ::mlir::NVVM::CTAGroupKindAttr;
ctaGroupTy ctaGroup;
auto getCtaGroup() const {
auto &propStorage = this->ctaGroup;
return ::llvm::cast<::mlir::NVVM::CTAGroupKindAttr>(propStorage);
}
void setCtaGroup(const ::mlir::NVVM::CTAGroupKindAttr &propValue) {
this->ctaGroup = propValue;
}
using kindTy = ::mlir::NVVM::Tcgen05MMAKindAttr;
kindTy kind;
auto getKind() const {
auto &propStorage = this->kind;
return ::llvm::cast<::mlir::NVVM::Tcgen05MMAKindAttr>(propStorage);
}
void setKind(const ::mlir::NVVM::Tcgen05MMAKindAttr &propValue) {
this->kind = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.blockScale == this->blockScale &&
rhs.collectorOp == this->collectorOp &&
rhs.ctaGroup == this->ctaGroup &&
rhs.kind == this->kind &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
Tcgen05MMASparseBlockScaleOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.tcgen05.mma.sp.block_scale", odsAttrs.getContext());
}
Tcgen05MMASparseBlockScaleOpGenericAdaptorBase(Tcgen05MMASparseBlockScaleOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::Tcgen05MMAKindAttr getKindAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::Tcgen05MMAKindAttr>(getProperties().kind);
return attr;
}
::mlir::NVVM::Tcgen05MMAKind getKind();
::mlir::NVVM::CTAGroupKindAttr getCtaGroupAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::CTAGroupKindAttr>(getProperties().ctaGroup);
return attr;
}
::mlir::NVVM::CTAGroupKind getCtaGroup();
::mlir::NVVM::Tcgen05MMABlockScaleAttr getBlockScaleAttr();
::mlir::NVVM::Tcgen05MMABlockScale getBlockScale();
::mlir::NVVM::Tcgen05MMACollectorOpAttr getCollectorOpAttr();
::mlir::NVVM::Tcgen05MMACollectorOp getCollectorOp();
};
} // namespace detail
template <typename RangeT>
class Tcgen05MMASparseBlockScaleOpGenericAdaptor : public detail::Tcgen05MMASparseBlockScaleOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::Tcgen05MMASparseBlockScaleOpGenericAdaptorBase;
static constexpr int odsIndex_matrixD = 0;
static constexpr int odsIndex_matrixA = 1;
static constexpr int odsIndex_matrixB = 2;
static constexpr int odsIndex_idesc = 3;
static constexpr int odsIndex_enableInputD = 4;
static constexpr int odsIndex_sparseMetadata = 5;
static constexpr int odsIndex_scaleA = 6;
static constexpr int odsIndex_scaleB = 7;
public:
Tcgen05MMASparseBlockScaleOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
Tcgen05MMASparseBlockScaleOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Tcgen05MMASparseBlockScaleOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
Tcgen05MMASparseBlockScaleOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : Tcgen05MMASparseBlockScaleOpGenericAdaptor(values, attrs, Properties{}, {}) {}
Tcgen05MMASparseBlockScaleOpGenericAdaptor(RangeT values, const Tcgen05MMASparseBlockScaleOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = Tcgen05MMASparseBlockScaleOp, typename = std::enable_if_t<std::is_same_v<LateInst, Tcgen05MMASparseBlockScaleOp>>>
Tcgen05MMASparseBlockScaleOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getMatrixD() {
return (*getODSOperands(0).begin());
}
ValueT getMatrixA() {
return (*getODSOperands(1).begin());
}
ValueT getMatrixB() {
return (*getODSOperands(2).begin());
}
ValueT getIdesc() {
return (*getODSOperands(3).begin());
}
ValueT getEnableInputD() {
return (*getODSOperands(4).begin());
}
ValueT getSparseMetadata() {
return (*getODSOperands(5).begin());
}
ValueT getScaleA() {
return (*getODSOperands(6).begin());
}
ValueT getScaleB() {
return (*getODSOperands(7).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class Tcgen05MMASparseBlockScaleOpAdaptor : public Tcgen05MMASparseBlockScaleOpGenericAdaptor<::mlir::ValueRange> {
public:
using Tcgen05MMASparseBlockScaleOpGenericAdaptor::Tcgen05MMASparseBlockScaleOpGenericAdaptor;
Tcgen05MMASparseBlockScaleOpAdaptor(Tcgen05MMASparseBlockScaleOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class Tcgen05MMASparseBlockScaleOp : public ::mlir::Op<Tcgen05MMASparseBlockScaleOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<8>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<1002,1012,1102>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = Tcgen05MMASparseBlockScaleOpAdaptor;
template <typename RangeT>
using GenericAdaptor = Tcgen05MMASparseBlockScaleOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_matrixD = 0;
static constexpr int odsIndex_matrixA = 1;
static constexpr int odsIndex_matrixB = 2;
static constexpr int odsIndex_idesc = 3;
static constexpr int odsIndex_enableInputD = 4;
static constexpr int odsIndex_sparseMetadata = 5;
static constexpr int odsIndex_scaleA = 6;
static constexpr int odsIndex_scaleB = 7;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("blockScale"), ::llvm::StringRef("collectorOp"), ::llvm::StringRef("ctaGroup"), ::llvm::StringRef("kind")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getBlockScaleAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getBlockScaleAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getCollectorOpAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getCollectorOpAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getCtaGroupAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getCtaGroupAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
::mlir::StringAttr getKindAttrName() {
return getAttributeNameForIndex(3);
}
static ::mlir::StringAttr getKindAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 3);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.tcgen05.mma.sp.block_scale");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getMatrixD() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::Type> getMatrixA() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getMatrixB() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getIdesc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getEnableInputD() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(4).begin());
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getSparseMetadata() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(5).begin());
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getScaleA() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(6).begin());
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getScaleB() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(7).begin());
}
::mlir::OpOperand &getMatrixDMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getMatrixAMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getMatrixBMutable() {
auto range = getODSOperandIndexAndLength(2);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getIdescMutable() {
auto range = getODSOperandIndexAndLength(3);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getEnableInputDMutable() {
auto range = getODSOperandIndexAndLength(4);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSparseMetadataMutable() {
auto range = getODSOperandIndexAndLength(5);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getScaleAMutable() {
auto range = getODSOperandIndexAndLength(6);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getScaleBMutable() {
auto range = getODSOperandIndexAndLength(7);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::Tcgen05MMAKindAttr getKindAttr() {
return ::llvm::cast<::mlir::NVVM::Tcgen05MMAKindAttr>(getProperties().kind);
}
::mlir::NVVM::Tcgen05MMAKind getKind();
::mlir::NVVM::CTAGroupKindAttr getCtaGroupAttr() {
return ::llvm::cast<::mlir::NVVM::CTAGroupKindAttr>(getProperties().ctaGroup);
}
::mlir::NVVM::CTAGroupKind getCtaGroup();
::mlir::NVVM::Tcgen05MMABlockScaleAttr getBlockScaleAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::Tcgen05MMABlockScaleAttr>(getProperties().blockScale);
}
::mlir::NVVM::Tcgen05MMABlockScale getBlockScale();
::mlir::NVVM::Tcgen05MMACollectorOpAttr getCollectorOpAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::Tcgen05MMACollectorOpAttr>(getProperties().collectorOp);
}
::mlir::NVVM::Tcgen05MMACollectorOp getCollectorOp();
void setKindAttr(::mlir::NVVM::Tcgen05MMAKindAttr attr) {
getProperties().kind = attr;
}
void setKind(::mlir::NVVM::Tcgen05MMAKind attrValue);
void setCtaGroupAttr(::mlir::NVVM::CTAGroupKindAttr attr) {
getProperties().ctaGroup = attr;
}
void setCtaGroup(::mlir::NVVM::CTAGroupKind attrValue);
void setBlockScaleAttr(::mlir::NVVM::Tcgen05MMABlockScaleAttr attr) {
getProperties().blockScale = attr;
}
void setBlockScale(::mlir::NVVM::Tcgen05MMABlockScale attrValue);
void setCollectorOpAttr(::mlir::NVVM::Tcgen05MMACollectorOpAttr attr) {
getProperties().collectorOp = attr;
}
void setCollectorOp(::mlir::NVVM::Tcgen05MMACollectorOp attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::CTAGroupKindAttr ctaGroup, ::mlir::NVVM::Tcgen05MMABlockScaleAttr blockScale, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, ::mlir::Value scaleA, ::mlir::Value scaleB);
static Tcgen05MMASparseBlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::CTAGroupKindAttr ctaGroup, ::mlir::NVVM::Tcgen05MMABlockScaleAttr blockScale, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, ::mlir::Value scaleA, ::mlir::Value scaleB);
static Tcgen05MMASparseBlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::CTAGroupKindAttr ctaGroup, ::mlir::NVVM::Tcgen05MMABlockScaleAttr blockScale, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, ::mlir::Value scaleA, ::mlir::Value scaleB);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::CTAGroupKindAttr ctaGroup, ::mlir::NVVM::Tcgen05MMABlockScaleAttr blockScale, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, ::mlir::Value scaleA, ::mlir::Value scaleB);
static Tcgen05MMASparseBlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::CTAGroupKindAttr ctaGroup, ::mlir::NVVM::Tcgen05MMABlockScaleAttr blockScale, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, ::mlir::Value scaleA, ::mlir::Value scaleB);
static Tcgen05MMASparseBlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::CTAGroupKindAttr ctaGroup, ::mlir::NVVM::Tcgen05MMABlockScaleAttr blockScale, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, ::mlir::Value scaleA, ::mlir::Value scaleB);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::CTAGroupKind ctaGroup, ::mlir::NVVM::Tcgen05MMABlockScale blockScale, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, ::mlir::Value scaleA, ::mlir::Value scaleB);
static Tcgen05MMASparseBlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::CTAGroupKind ctaGroup, ::mlir::NVVM::Tcgen05MMABlockScale blockScale, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, ::mlir::Value scaleA, ::mlir::Value scaleB);
static Tcgen05MMASparseBlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::CTAGroupKind ctaGroup, ::mlir::NVVM::Tcgen05MMABlockScale blockScale, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, ::mlir::Value scaleA, ::mlir::Value scaleB);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::CTAGroupKind ctaGroup, ::mlir::NVVM::Tcgen05MMABlockScale blockScale, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, ::mlir::Value scaleA, ::mlir::Value scaleB);
static Tcgen05MMASparseBlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::CTAGroupKind ctaGroup, ::mlir::NVVM::Tcgen05MMABlockScale blockScale, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, ::mlir::Value scaleA, ::mlir::Value scaleB);
static Tcgen05MMASparseBlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::CTAGroupKind ctaGroup, ::mlir::NVVM::Tcgen05MMABlockScale blockScale, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, ::mlir::Value scaleA, ::mlir::Value scaleB);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05MMASparseBlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05MMASparseBlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05MMASparseBlockScaleOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05MMASparseBlockScaleOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 4 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static mlir::NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05MMASparseBlockScaleOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::Tcgen05MMASparseBlockScaleOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::Tcgen05MMASparseOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class Tcgen05MMASparseOpGenericAdaptorBase {
public:
struct Properties {
using aShiftTy = ::mlir::UnitAttr;
aShiftTy aShift;
auto getAShift() const {
auto &propStorage = this->aShift;
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage);
}
void setAShift(const ::mlir::UnitAttr &propValue) {
this->aShift = propValue;
}
using collectorOpTy = ::mlir::NVVM::Tcgen05MMACollectorOpAttr;
collectorOpTy collectorOp;
auto getCollectorOp() const {
auto &propStorage = this->collectorOp;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::Tcgen05MMACollectorOpAttr>(propStorage);
}
void setCollectorOp(const ::mlir::NVVM::Tcgen05MMACollectorOpAttr &propValue) {
this->collectorOp = propValue;
}
using ctaGroupTy = ::mlir::NVVM::CTAGroupKindAttr;
ctaGroupTy ctaGroup;
auto getCtaGroup() const {
auto &propStorage = this->ctaGroup;
return ::llvm::cast<::mlir::NVVM::CTAGroupKindAttr>(propStorage);
}
void setCtaGroup(const ::mlir::NVVM::CTAGroupKindAttr &propValue) {
this->ctaGroup = propValue;
}
using kindTy = ::mlir::NVVM::Tcgen05MMAKindAttr;
kindTy kind;
auto getKind() const {
auto &propStorage = this->kind;
return ::llvm::cast<::mlir::NVVM::Tcgen05MMAKindAttr>(propStorage);
}
void setKind(const ::mlir::NVVM::Tcgen05MMAKindAttr &propValue) {
this->kind = propValue;
}
using operandSegmentSizesTy = std::array<int32_t, 8>;
operandSegmentSizesTy operandSegmentSizes;
::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
auto &propStorage = this->operandSegmentSizes;
return propStorage;
}
void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
auto &propStorage = this->operandSegmentSizes;
::llvm::copy(propValue, propStorage.begin());
}
bool operator==(const Properties &rhs) const {
return
rhs.aShift == this->aShift &&
rhs.collectorOp == this->collectorOp &&
rhs.ctaGroup == this->ctaGroup &&
rhs.kind == this->kind &&
rhs.operandSegmentSizes == this->operandSegmentSizes &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
Tcgen05MMASparseOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.tcgen05.mma.sp", odsAttrs.getContext());
}
Tcgen05MMASparseOpGenericAdaptorBase(Tcgen05MMASparseOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::Tcgen05MMAKindAttr getKindAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::Tcgen05MMAKindAttr>(getProperties().kind);
return attr;
}
::mlir::NVVM::Tcgen05MMAKind getKind();
::mlir::NVVM::CTAGroupKindAttr getCtaGroupAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::CTAGroupKindAttr>(getProperties().ctaGroup);
return attr;
}
::mlir::NVVM::CTAGroupKind getCtaGroup();
::mlir::NVVM::Tcgen05MMACollectorOpAttr getCollectorOpAttr();
::mlir::NVVM::Tcgen05MMACollectorOp getCollectorOp();
::mlir::UnitAttr getAShiftAttr();
bool getAShift();
};
} // namespace detail
template <typename RangeT>
class Tcgen05MMASparseOpGenericAdaptor : public detail::Tcgen05MMASparseOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::Tcgen05MMASparseOpGenericAdaptorBase;
static constexpr int odsIndex_matrixD = 0;
static constexpr int odsIndex_matrixA = 1;
static constexpr int odsIndex_matrixB = 2;
static constexpr int odsIndex_idesc = 3;
static constexpr int odsIndex_enableInputD = 4;
static constexpr int odsIndex_sparseMetadata = 5;
static constexpr int odsIndex_scaleInputD = 6;
static constexpr int odsIndex_disableOutputLane = 7;
public:
Tcgen05MMASparseOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
Tcgen05MMASparseOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Tcgen05MMASparseOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
Tcgen05MMASparseOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : Tcgen05MMASparseOpGenericAdaptor(values, attrs, Properties{}, {}) {}
Tcgen05MMASparseOpGenericAdaptor(RangeT values, const Tcgen05MMASparseOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = Tcgen05MMASparseOp, typename = std::enable_if_t<std::is_same_v<LateInst, Tcgen05MMASparseOp>>>
Tcgen05MMASparseOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getMatrixD() {
return (*getODSOperands(0).begin());
}
ValueT getMatrixA() {
return (*getODSOperands(1).begin());
}
ValueT getMatrixB() {
return (*getODSOperands(2).begin());
}
ValueT getIdesc() {
return (*getODSOperands(3).begin());
}
ValueT getEnableInputD() {
return (*getODSOperands(4).begin());
}
ValueT getSparseMetadata() {
return (*getODSOperands(5).begin());
}
ValueT getScaleInputD() {
auto operands = getODSOperands(6);
return operands.empty() ? ValueT{} : (*operands.begin());
}
ValueT getDisableOutputLane() {
auto operands = getODSOperands(7);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class Tcgen05MMASparseOpAdaptor : public Tcgen05MMASparseOpGenericAdaptor<::mlir::ValueRange> {
public:
using Tcgen05MMASparseOpGenericAdaptor::Tcgen05MMASparseOpGenericAdaptor;
Tcgen05MMASparseOpAdaptor(Tcgen05MMASparseOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class Tcgen05MMASparseOp : public ::mlir::Op<Tcgen05MMASparseOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<6>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<1002,1012,1102>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = Tcgen05MMASparseOpAdaptor;
template <typename RangeT>
using GenericAdaptor = Tcgen05MMASparseOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_matrixD = 0;
static constexpr int odsIndex_matrixA = 1;
static constexpr int odsIndex_matrixB = 2;
static constexpr int odsIndex_idesc = 3;
static constexpr int odsIndex_enableInputD = 4;
static constexpr int odsIndex_sparseMetadata = 5;
static constexpr int odsIndex_scaleInputD = 6;
static constexpr int odsIndex_disableOutputLane = 7;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("aShift"), ::llvm::StringRef("collectorOp"), ::llvm::StringRef("ctaGroup"), ::llvm::StringRef("kind"), ::llvm::StringRef("operandSegmentSizes")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getAShiftAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getAShiftAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getCollectorOpAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getCollectorOpAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getCtaGroupAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getCtaGroupAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
::mlir::StringAttr getKindAttrName() {
return getAttributeNameForIndex(3);
}
static ::mlir::StringAttr getKindAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 3);
}
::mlir::StringAttr getOperandSegmentSizesAttrName() {
return (*this)->getName().getAttributeNames().back();
}
static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
return name.getAttributeNames().back();
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.tcgen05.mma.sp");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getMatrixD() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::Type> getMatrixA() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getMatrixB() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getIdesc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getEnableInputD() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(4).begin());
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getSparseMetadata() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(5).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getScaleInputD() {
auto operands = getODSOperands(6);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::TypedValue<::mlir::VectorType> getDisableOutputLane() {
auto operands = getODSOperands(7);
return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*operands.begin());
}
::mlir::OpOperand &getMatrixDMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getMatrixAMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getMatrixBMutable() {
auto range = getODSOperandIndexAndLength(2);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getIdescMutable() {
auto range = getODSOperandIndexAndLength(3);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getEnableInputDMutable() {
auto range = getODSOperandIndexAndLength(4);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSparseMetadataMutable() {
auto range = getODSOperandIndexAndLength(5);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getScaleInputDMutable();
::mlir::MutableOperandRange getDisableOutputLaneMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::Tcgen05MMAKindAttr getKindAttr() {
return ::llvm::cast<::mlir::NVVM::Tcgen05MMAKindAttr>(getProperties().kind);
}
::mlir::NVVM::Tcgen05MMAKind getKind();
::mlir::NVVM::CTAGroupKindAttr getCtaGroupAttr() {
return ::llvm::cast<::mlir::NVVM::CTAGroupKindAttr>(getProperties().ctaGroup);
}
::mlir::NVVM::CTAGroupKind getCtaGroup();
::mlir::NVVM::Tcgen05MMACollectorOpAttr getCollectorOpAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::Tcgen05MMACollectorOpAttr>(getProperties().collectorOp);
}
::mlir::NVVM::Tcgen05MMACollectorOp getCollectorOp();
::mlir::UnitAttr getAShiftAttr() {
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().aShift);
}
bool getAShift();
void setKindAttr(::mlir::NVVM::Tcgen05MMAKindAttr attr) {
getProperties().kind = attr;
}
void setKind(::mlir::NVVM::Tcgen05MMAKind attrValue);
void setCtaGroupAttr(::mlir::NVVM::CTAGroupKindAttr attr) {
getProperties().ctaGroup = attr;
}
void setCtaGroup(::mlir::NVVM::CTAGroupKind attrValue);
void setCollectorOpAttr(::mlir::NVVM::Tcgen05MMACollectorOpAttr attr) {
getProperties().collectorOp = attr;
}
void setCollectorOp(::mlir::NVVM::Tcgen05MMACollectorOp attrValue);
void setAShiftAttr(::mlir::UnitAttr attr) {
getProperties().aShift = attr;
}
void setAShift(bool attrValue);
::mlir::Attribute removeAShiftAttr() {
auto attr = getProperties().aShift;
getProperties().aShift = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::CTAGroupKindAttr ctaGroup, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, /*optional*/::mlir::UnitAttr aShift, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, /*optional*/::mlir::Value scaleInputD, /*optional*/::mlir::Value disableOutputLane);
static Tcgen05MMASparseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::CTAGroupKindAttr ctaGroup, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, /*optional*/::mlir::UnitAttr aShift, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, /*optional*/::mlir::Value scaleInputD, /*optional*/::mlir::Value disableOutputLane);
static Tcgen05MMASparseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::CTAGroupKindAttr ctaGroup, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, /*optional*/::mlir::UnitAttr aShift, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, /*optional*/::mlir::Value scaleInputD, /*optional*/::mlir::Value disableOutputLane);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::CTAGroupKindAttr ctaGroup, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, /*optional*/::mlir::UnitAttr aShift, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, /*optional*/::mlir::Value scaleInputD, /*optional*/::mlir::Value disableOutputLane);
static Tcgen05MMASparseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::CTAGroupKindAttr ctaGroup, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, /*optional*/::mlir::UnitAttr aShift, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, /*optional*/::mlir::Value scaleInputD, /*optional*/::mlir::Value disableOutputLane);
static Tcgen05MMASparseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::CTAGroupKindAttr ctaGroup, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, /*optional*/::mlir::UnitAttr aShift, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, /*optional*/::mlir::Value scaleInputD, /*optional*/::mlir::Value disableOutputLane);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::CTAGroupKind ctaGroup, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, /*optional*/bool aShift, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, /*optional*/::mlir::Value scaleInputD, /*optional*/::mlir::Value disableOutputLane);
static Tcgen05MMASparseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::CTAGroupKind ctaGroup, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, /*optional*/bool aShift, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, /*optional*/::mlir::Value scaleInputD, /*optional*/::mlir::Value disableOutputLane);
static Tcgen05MMASparseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::CTAGroupKind ctaGroup, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, /*optional*/bool aShift, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, /*optional*/::mlir::Value scaleInputD, /*optional*/::mlir::Value disableOutputLane);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::CTAGroupKind ctaGroup, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, /*optional*/bool aShift, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, /*optional*/::mlir::Value scaleInputD, /*optional*/::mlir::Value disableOutputLane);
static Tcgen05MMASparseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::CTAGroupKind ctaGroup, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, /*optional*/bool aShift, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, /*optional*/::mlir::Value scaleInputD, /*optional*/::mlir::Value disableOutputLane);
static Tcgen05MMASparseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::CTAGroupKind ctaGroup, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, /*optional*/bool aShift, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, /*optional*/::mlir::Value scaleInputD, /*optional*/::mlir::Value disableOutputLane);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05MMASparseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05MMASparseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05MMASparseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05MMASparseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 4 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static mlir::NVVM::IDArgPair getIntrinsicIDAndArgs(
Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05MMASparseOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::Tcgen05MMASparseOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::Tcgen05MMAWsOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class Tcgen05MMAWsOpGenericAdaptorBase {
public:
struct Properties {
using collectorBBufferTy = ::mlir::NVVM::Tcgen05MMACollectorBBufferAttr;
collectorBBufferTy collectorBBuffer;
auto getCollectorBBuffer() const {
auto &propStorage = this->collectorBBuffer;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::Tcgen05MMACollectorBBufferAttr>(propStorage);
}
void setCollectorBBuffer(const ::mlir::NVVM::Tcgen05MMACollectorBBufferAttr &propValue) {
this->collectorBBuffer = propValue;
}
using collectorOpTy = ::mlir::NVVM::Tcgen05MMACollectorOpAttr;
collectorOpTy collectorOp;
auto getCollectorOp() const {
auto &propStorage = this->collectorOp;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::Tcgen05MMACollectorOpAttr>(propStorage);
}
void setCollectorOp(const ::mlir::NVVM::Tcgen05MMACollectorOpAttr &propValue) {
this->collectorOp = propValue;
}
using kindTy = ::mlir::NVVM::Tcgen05MMAKindAttr;
kindTy kind;
auto getKind() const {
auto &propStorage = this->kind;
return ::llvm::cast<::mlir::NVVM::Tcgen05MMAKindAttr>(propStorage);
}
void setKind(const ::mlir::NVVM::Tcgen05MMAKindAttr &propValue) {
this->kind = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.collectorBBuffer == this->collectorBBuffer &&
rhs.collectorOp == this->collectorOp &&
rhs.kind == this->kind &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
Tcgen05MMAWsOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.tcgen05.mma.ws", odsAttrs.getContext());
}
Tcgen05MMAWsOpGenericAdaptorBase(Tcgen05MMAWsOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::Tcgen05MMAKindAttr getKindAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::Tcgen05MMAKindAttr>(getProperties().kind);
return attr;
}
::mlir::NVVM::Tcgen05MMAKind getKind();
::mlir::NVVM::Tcgen05MMACollectorBBufferAttr getCollectorBBufferAttr();
::mlir::NVVM::Tcgen05MMACollectorBBuffer getCollectorBBuffer();
::mlir::NVVM::Tcgen05MMACollectorOpAttr getCollectorOpAttr();
::mlir::NVVM::Tcgen05MMACollectorOp getCollectorOp();
};
} // namespace detail
template <typename RangeT>
class Tcgen05MMAWsOpGenericAdaptor : public detail::Tcgen05MMAWsOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::Tcgen05MMAWsOpGenericAdaptorBase;
static constexpr int odsIndex_matrixD = 0;
static constexpr int odsIndex_matrixA = 1;
static constexpr int odsIndex_matrixB = 2;
static constexpr int odsIndex_idesc = 3;
static constexpr int odsIndex_enableInputD = 4;
static constexpr int odsIndex_zeroColMask = 5;
public:
Tcgen05MMAWsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
Tcgen05MMAWsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Tcgen05MMAWsOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
Tcgen05MMAWsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : Tcgen05MMAWsOpGenericAdaptor(values, attrs, Properties{}, {}) {}
Tcgen05MMAWsOpGenericAdaptor(RangeT values, const Tcgen05MMAWsOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = Tcgen05MMAWsOp, typename = std::enable_if_t<std::is_same_v<LateInst, Tcgen05MMAWsOp>>>
Tcgen05MMAWsOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getMatrixD() {
return (*getODSOperands(0).begin());
}
ValueT getMatrixA() {
return (*getODSOperands(1).begin());
}
ValueT getMatrixB() {
return (*getODSOperands(2).begin());
}
ValueT getIdesc() {
return (*getODSOperands(3).begin());
}
ValueT getEnableInputD() {
return (*getODSOperands(4).begin());
}
ValueT getZeroColMask() {
auto operands = getODSOperands(5);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class Tcgen05MMAWsOpAdaptor : public Tcgen05MMAWsOpGenericAdaptor<::mlir::ValueRange> {
public:
using Tcgen05MMAWsOpGenericAdaptor::Tcgen05MMAWsOpGenericAdaptor;
Tcgen05MMAWsOpAdaptor(Tcgen05MMAWsOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class Tcgen05MMAWsOp : public ::mlir::Op<Tcgen05MMAWsOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<5>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<1002,1012,1102>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = Tcgen05MMAWsOpAdaptor;
template <typename RangeT>
using GenericAdaptor = Tcgen05MMAWsOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_matrixD = 0;
static constexpr int odsIndex_matrixA = 1;
static constexpr int odsIndex_matrixB = 2;
static constexpr int odsIndex_idesc = 3;
static constexpr int odsIndex_enableInputD = 4;
static constexpr int odsIndex_zeroColMask = 5;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("collectorBBuffer"), ::llvm::StringRef("collectorOp"), ::llvm::StringRef("kind")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getCollectorBBufferAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getCollectorBBufferAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getCollectorOpAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getCollectorOpAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getKindAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getKindAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.tcgen05.mma.ws");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getMatrixD() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::Type> getMatrixA() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getMatrixB() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getIdesc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getEnableInputD() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(4).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getZeroColMask() {
auto operands = getODSOperands(5);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getMatrixDMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getMatrixAMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getMatrixBMutable() {
auto range = getODSOperandIndexAndLength(2);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getIdescMutable() {
auto range = getODSOperandIndexAndLength(3);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getEnableInputDMutable() {
auto range = getODSOperandIndexAndLength(4);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getZeroColMaskMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::Tcgen05MMAKindAttr getKindAttr() {
return ::llvm::cast<::mlir::NVVM::Tcgen05MMAKindAttr>(getProperties().kind);
}
::mlir::NVVM::Tcgen05MMAKind getKind();
::mlir::NVVM::Tcgen05MMACollectorBBufferAttr getCollectorBBufferAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::Tcgen05MMACollectorBBufferAttr>(getProperties().collectorBBuffer);
}
::mlir::NVVM::Tcgen05MMACollectorBBuffer getCollectorBBuffer();
::mlir::NVVM::Tcgen05MMACollectorOpAttr getCollectorOpAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::Tcgen05MMACollectorOpAttr>(getProperties().collectorOp);
}
::mlir::NVVM::Tcgen05MMACollectorOp getCollectorOp();
void setKindAttr(::mlir::NVVM::Tcgen05MMAKindAttr attr) {
getProperties().kind = attr;
}
void setKind(::mlir::NVVM::Tcgen05MMAKind attrValue);
void setCollectorBBufferAttr(::mlir::NVVM::Tcgen05MMACollectorBBufferAttr attr) {
getProperties().collectorBBuffer = attr;
}
void setCollectorBBuffer(::mlir::NVVM::Tcgen05MMACollectorBBuffer attrValue);
void setCollectorOpAttr(::mlir::NVVM::Tcgen05MMACollectorOpAttr attr) {
getProperties().collectorOp = attr;
}
void setCollectorOp(::mlir::NVVM::Tcgen05MMACollectorOp attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::Tcgen05MMACollectorBBufferAttr collectorBBuffer, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, /*optional*/::mlir::Value zeroColMask);
static Tcgen05MMAWsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::Tcgen05MMACollectorBBufferAttr collectorBBuffer, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, /*optional*/::mlir::Value zeroColMask);
static Tcgen05MMAWsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::Tcgen05MMACollectorBBufferAttr collectorBBuffer, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, /*optional*/::mlir::Value zeroColMask);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::Tcgen05MMACollectorBBufferAttr collectorBBuffer, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, /*optional*/::mlir::Value zeroColMask);
static Tcgen05MMAWsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::Tcgen05MMACollectorBBufferAttr collectorBBuffer, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, /*optional*/::mlir::Value zeroColMask);
static Tcgen05MMAWsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::Tcgen05MMACollectorBBufferAttr collectorBBuffer, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, /*optional*/::mlir::Value zeroColMask);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::Tcgen05MMACollectorBBuffer collectorBBuffer, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, /*optional*/::mlir::Value zeroColMask);
static Tcgen05MMAWsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::Tcgen05MMACollectorBBuffer collectorBBuffer, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, /*optional*/::mlir::Value zeroColMask);
static Tcgen05MMAWsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::Tcgen05MMACollectorBBuffer collectorBBuffer, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, /*optional*/::mlir::Value zeroColMask);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::Tcgen05MMACollectorBBuffer collectorBBuffer, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, /*optional*/::mlir::Value zeroColMask);
static Tcgen05MMAWsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::Tcgen05MMACollectorBBuffer collectorBBuffer, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, /*optional*/::mlir::Value zeroColMask);
static Tcgen05MMAWsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::Tcgen05MMACollectorBBuffer collectorBBuffer, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, /*optional*/::mlir::Value zeroColMask);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05MMAWsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05MMAWsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05MMAWsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05MMAWsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 3 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static mlir::NVVM::IDArgPair getIntrinsicIDAndArgs(
Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05MMAWsOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::Tcgen05MMAWsOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::Tcgen05MMAWsSparseOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class Tcgen05MMAWsSparseOpGenericAdaptorBase {
public:
struct Properties {
using collectorBBufferTy = ::mlir::NVVM::Tcgen05MMACollectorBBufferAttr;
collectorBBufferTy collectorBBuffer;
auto getCollectorBBuffer() const {
auto &propStorage = this->collectorBBuffer;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::Tcgen05MMACollectorBBufferAttr>(propStorage);
}
void setCollectorBBuffer(const ::mlir::NVVM::Tcgen05MMACollectorBBufferAttr &propValue) {
this->collectorBBuffer = propValue;
}
using collectorOpTy = ::mlir::NVVM::Tcgen05MMACollectorOpAttr;
collectorOpTy collectorOp;
auto getCollectorOp() const {
auto &propStorage = this->collectorOp;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::Tcgen05MMACollectorOpAttr>(propStorage);
}
void setCollectorOp(const ::mlir::NVVM::Tcgen05MMACollectorOpAttr &propValue) {
this->collectorOp = propValue;
}
using kindTy = ::mlir::NVVM::Tcgen05MMAKindAttr;
kindTy kind;
auto getKind() const {
auto &propStorage = this->kind;
return ::llvm::cast<::mlir::NVVM::Tcgen05MMAKindAttr>(propStorage);
}
void setKind(const ::mlir::NVVM::Tcgen05MMAKindAttr &propValue) {
this->kind = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.collectorBBuffer == this->collectorBBuffer &&
rhs.collectorOp == this->collectorOp &&
rhs.kind == this->kind &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
Tcgen05MMAWsSparseOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.tcgen05.mma.ws.sp", odsAttrs.getContext());
}
Tcgen05MMAWsSparseOpGenericAdaptorBase(Tcgen05MMAWsSparseOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::Tcgen05MMAKindAttr getKindAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::Tcgen05MMAKindAttr>(getProperties().kind);
return attr;
}
::mlir::NVVM::Tcgen05MMAKind getKind();
::mlir::NVVM::Tcgen05MMACollectorBBufferAttr getCollectorBBufferAttr();
::mlir::NVVM::Tcgen05MMACollectorBBuffer getCollectorBBuffer();
::mlir::NVVM::Tcgen05MMACollectorOpAttr getCollectorOpAttr();
::mlir::NVVM::Tcgen05MMACollectorOp getCollectorOp();
};
} // namespace detail
template <typename RangeT>
class Tcgen05MMAWsSparseOpGenericAdaptor : public detail::Tcgen05MMAWsSparseOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::Tcgen05MMAWsSparseOpGenericAdaptorBase;
static constexpr int odsIndex_matrixD = 0;
static constexpr int odsIndex_matrixA = 1;
static constexpr int odsIndex_matrixB = 2;
static constexpr int odsIndex_idesc = 3;
static constexpr int odsIndex_enableInputD = 4;
static constexpr int odsIndex_sparseMetadata = 5;
static constexpr int odsIndex_zeroColMask = 6;
public:
Tcgen05MMAWsSparseOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
Tcgen05MMAWsSparseOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Tcgen05MMAWsSparseOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
Tcgen05MMAWsSparseOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : Tcgen05MMAWsSparseOpGenericAdaptor(values, attrs, Properties{}, {}) {}
Tcgen05MMAWsSparseOpGenericAdaptor(RangeT values, const Tcgen05MMAWsSparseOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = Tcgen05MMAWsSparseOp, typename = std::enable_if_t<std::is_same_v<LateInst, Tcgen05MMAWsSparseOp>>>
Tcgen05MMAWsSparseOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getMatrixD() {
return (*getODSOperands(0).begin());
}
ValueT getMatrixA() {
return (*getODSOperands(1).begin());
}
ValueT getMatrixB() {
return (*getODSOperands(2).begin());
}
ValueT getIdesc() {
return (*getODSOperands(3).begin());
}
ValueT getEnableInputD() {
return (*getODSOperands(4).begin());
}
ValueT getSparseMetadata() {
return (*getODSOperands(5).begin());
}
ValueT getZeroColMask() {
auto operands = getODSOperands(6);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class Tcgen05MMAWsSparseOpAdaptor : public Tcgen05MMAWsSparseOpGenericAdaptor<::mlir::ValueRange> {
public:
using Tcgen05MMAWsSparseOpGenericAdaptor::Tcgen05MMAWsSparseOpGenericAdaptor;
Tcgen05MMAWsSparseOpAdaptor(Tcgen05MMAWsSparseOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class Tcgen05MMAWsSparseOp : public ::mlir::Op<Tcgen05MMAWsSparseOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<6>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<1002,1012,1102>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = Tcgen05MMAWsSparseOpAdaptor;
template <typename RangeT>
using GenericAdaptor = Tcgen05MMAWsSparseOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_matrixD = 0;
static constexpr int odsIndex_matrixA = 1;
static constexpr int odsIndex_matrixB = 2;
static constexpr int odsIndex_idesc = 3;
static constexpr int odsIndex_enableInputD = 4;
static constexpr int odsIndex_sparseMetadata = 5;
static constexpr int odsIndex_zeroColMask = 6;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("collectorBBuffer"), ::llvm::StringRef("collectorOp"), ::llvm::StringRef("kind")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getCollectorBBufferAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getCollectorBBufferAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getCollectorOpAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getCollectorOpAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getKindAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getKindAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.tcgen05.mma.ws.sp");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getMatrixD() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::Type> getMatrixA() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getMatrixB() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getIdesc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getEnableInputD() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(4).begin());
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getSparseMetadata() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(5).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getZeroColMask() {
auto operands = getODSOperands(6);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getMatrixDMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getMatrixAMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getMatrixBMutable() {
auto range = getODSOperandIndexAndLength(2);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getIdescMutable() {
auto range = getODSOperandIndexAndLength(3);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getEnableInputDMutable() {
auto range = getODSOperandIndexAndLength(4);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSparseMetadataMutable() {
auto range = getODSOperandIndexAndLength(5);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getZeroColMaskMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::Tcgen05MMAKindAttr getKindAttr() {
return ::llvm::cast<::mlir::NVVM::Tcgen05MMAKindAttr>(getProperties().kind);
}
::mlir::NVVM::Tcgen05MMAKind getKind();
::mlir::NVVM::Tcgen05MMACollectorBBufferAttr getCollectorBBufferAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::Tcgen05MMACollectorBBufferAttr>(getProperties().collectorBBuffer);
}
::mlir::NVVM::Tcgen05MMACollectorBBuffer getCollectorBBuffer();
::mlir::NVVM::Tcgen05MMACollectorOpAttr getCollectorOpAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::Tcgen05MMACollectorOpAttr>(getProperties().collectorOp);
}
::mlir::NVVM::Tcgen05MMACollectorOp getCollectorOp();
void setKindAttr(::mlir::NVVM::Tcgen05MMAKindAttr attr) {
getProperties().kind = attr;
}
void setKind(::mlir::NVVM::Tcgen05MMAKind attrValue);
void setCollectorBBufferAttr(::mlir::NVVM::Tcgen05MMACollectorBBufferAttr attr) {
getProperties().collectorBBuffer = attr;
}
void setCollectorBBuffer(::mlir::NVVM::Tcgen05MMACollectorBBuffer attrValue);
void setCollectorOpAttr(::mlir::NVVM::Tcgen05MMACollectorOpAttr attr) {
getProperties().collectorOp = attr;
}
void setCollectorOp(::mlir::NVVM::Tcgen05MMACollectorOp attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::Tcgen05MMACollectorBBufferAttr collectorBBuffer, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, /*optional*/::mlir::Value zeroColMask);
static Tcgen05MMAWsSparseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::Tcgen05MMACollectorBBufferAttr collectorBBuffer, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, /*optional*/::mlir::Value zeroColMask);
static Tcgen05MMAWsSparseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::Tcgen05MMACollectorBBufferAttr collectorBBuffer, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, /*optional*/::mlir::Value zeroColMask);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::Tcgen05MMACollectorBBufferAttr collectorBBuffer, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, /*optional*/::mlir::Value zeroColMask);
static Tcgen05MMAWsSparseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::Tcgen05MMACollectorBBufferAttr collectorBBuffer, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, /*optional*/::mlir::Value zeroColMask);
static Tcgen05MMAWsSparseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKindAttr kind, ::mlir::NVVM::Tcgen05MMACollectorBBufferAttr collectorBBuffer, ::mlir::NVVM::Tcgen05MMACollectorOpAttr collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, /*optional*/::mlir::Value zeroColMask);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::Tcgen05MMACollectorBBuffer collectorBBuffer, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, /*optional*/::mlir::Value zeroColMask);
static Tcgen05MMAWsSparseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::Tcgen05MMACollectorBBuffer collectorBBuffer, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, /*optional*/::mlir::Value zeroColMask);
static Tcgen05MMAWsSparseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::Tcgen05MMACollectorBBuffer collectorBBuffer, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, /*optional*/::mlir::Value zeroColMask);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::Tcgen05MMACollectorBBuffer collectorBBuffer, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, /*optional*/::mlir::Value zeroColMask);
static Tcgen05MMAWsSparseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::Tcgen05MMACollectorBBuffer collectorBBuffer, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, /*optional*/::mlir::Value zeroColMask);
static Tcgen05MMAWsSparseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05MMAKind kind, ::mlir::NVVM::Tcgen05MMACollectorBBuffer collectorBBuffer, ::mlir::NVVM::Tcgen05MMACollectorOp collectorOp, ::mlir::Value matrixD, ::mlir::Value matrixA, ::mlir::Value matrixB, ::mlir::Value idesc, ::mlir::Value enableInputD, ::mlir::Value sparseMetadata, /*optional*/::mlir::Value zeroColMask);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05MMAWsSparseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05MMAWsSparseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05MMAWsSparseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05MMAWsSparseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 3 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static mlir::NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05MMAWsSparseOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::Tcgen05MMAWsSparseOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::Tcgen05MmaSmemDescOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class Tcgen05MmaSmemDescOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
Tcgen05MmaSmemDescOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.tcgen05.mma_smem_desc", odsAttrs.getContext());
}
Tcgen05MmaSmemDescOpGenericAdaptorBase(Tcgen05MmaSmemDescOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class Tcgen05MmaSmemDescOpGenericAdaptor : public detail::Tcgen05MmaSmemDescOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::Tcgen05MmaSmemDescOpGenericAdaptorBase;
static constexpr int odsIndex_startAddr = 0;
static constexpr int odsIndex_leadingDimOffset = 1;
static constexpr int odsIndex_strideDimOffset = 2;
static constexpr int odsIndex_baseOffset = 3;
static constexpr int odsIndex_leadingDimMode = 4;
static constexpr int odsIndex_swizzleMode = 5;
public:
Tcgen05MmaSmemDescOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
Tcgen05MmaSmemDescOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Tcgen05MmaSmemDescOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
Tcgen05MmaSmemDescOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : Tcgen05MmaSmemDescOpGenericAdaptor(values, attrs, Properties{}, {}) {}
Tcgen05MmaSmemDescOpGenericAdaptor(RangeT values, const Tcgen05MmaSmemDescOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = Tcgen05MmaSmemDescOp, typename = std::enable_if_t<std::is_same_v<LateInst, Tcgen05MmaSmemDescOp>>>
Tcgen05MmaSmemDescOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getStartAddr() {
return (*getODSOperands(0).begin());
}
ValueT getLeadingDimOffset() {
return (*getODSOperands(1).begin());
}
ValueT getStrideDimOffset() {
return (*getODSOperands(2).begin());
}
ValueT getBaseOffset() {
return (*getODSOperands(3).begin());
}
ValueT getLeadingDimMode() {
return (*getODSOperands(4).begin());
}
ValueT getSwizzleMode() {
return (*getODSOperands(5).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class Tcgen05MmaSmemDescOpAdaptor : public Tcgen05MmaSmemDescOpGenericAdaptor<::mlir::ValueRange> {
public:
using Tcgen05MmaSmemDescOpGenericAdaptor::Tcgen05MmaSmemDescOpGenericAdaptor;
Tcgen05MmaSmemDescOpAdaptor(Tcgen05MmaSmemDescOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class Tcgen05MmaSmemDescOp : public ::mlir::Op<Tcgen05MmaSmemDescOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<6>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = Tcgen05MmaSmemDescOpAdaptor;
template <typename RangeT>
using GenericAdaptor = Tcgen05MmaSmemDescOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_startAddr = 0;
static constexpr int odsIndex_leadingDimOffset = 1;
static constexpr int odsIndex_strideDimOffset = 2;
static constexpr int odsIndex_baseOffset = 3;
static constexpr int odsIndex_leadingDimMode = 4;
static constexpr int odsIndex_swizzleMode = 5;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.tcgen05.mma_smem_desc");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getStartAddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getLeadingDimOffset() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getStrideDimOffset() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getBaseOffset() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getLeadingDimMode() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(4).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getSwizzleMode() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(5).begin());
}
::mlir::OpOperand &getStartAddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getLeadingDimOffsetMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getStrideDimOffsetMutable() {
auto range = getODSOperandIndexAndLength(2);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getBaseOffsetMutable() {
auto range = getODSOperandIndexAndLength(3);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getLeadingDimModeMutable() {
auto range = getODSOperandIndexAndLength(4);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSwizzleModeMutable() {
auto range = getODSOperandIndexAndLength(5);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value startAddr, ::mlir::Value leadingDimOffset, ::mlir::Value strideDimOffset, ::mlir::Value baseOffset, ::mlir::Value leadingDimMode, ::mlir::Value swizzleMode);
static Tcgen05MmaSmemDescOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value startAddr, ::mlir::Value leadingDimOffset, ::mlir::Value strideDimOffset, ::mlir::Value baseOffset, ::mlir::Value leadingDimMode, ::mlir::Value swizzleMode);
static Tcgen05MmaSmemDescOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value startAddr, ::mlir::Value leadingDimOffset, ::mlir::Value strideDimOffset, ::mlir::Value baseOffset, ::mlir::Value leadingDimMode, ::mlir::Value swizzleMode);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value startAddr, ::mlir::Value leadingDimOffset, ::mlir::Value strideDimOffset, ::mlir::Value baseOffset, ::mlir::Value leadingDimMode, ::mlir::Value swizzleMode);
static Tcgen05MmaSmemDescOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value startAddr, ::mlir::Value leadingDimOffset, ::mlir::Value strideDimOffset, ::mlir::Value baseOffset, ::mlir::Value leadingDimMode, ::mlir::Value swizzleMode);
static Tcgen05MmaSmemDescOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value startAddr, ::mlir::Value leadingDimOffset, ::mlir::Value strideDimOffset, ::mlir::Value baseOffset, ::mlir::Value leadingDimMode, ::mlir::Value swizzleMode);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value startAddr, ::mlir::Value leadingDimOffset, ::mlir::Value strideDimOffset, ::mlir::Value baseOffset, ::mlir::Value leadingDimMode, ::mlir::Value swizzleMode);
static Tcgen05MmaSmemDescOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value startAddr, ::mlir::Value leadingDimOffset, ::mlir::Value strideDimOffset, ::mlir::Value baseOffset, ::mlir::Value leadingDimMode, ::mlir::Value swizzleMode);
static Tcgen05MmaSmemDescOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value startAddr, ::mlir::Value leadingDimOffset, ::mlir::Value strideDimOffset, ::mlir::Value baseOffset, ::mlir::Value leadingDimMode, ::mlir::Value swizzleMode);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05MmaSmemDescOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05MmaSmemDescOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05MmaSmemDescOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05MmaSmemDescOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05MmaSmemDescOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05MmaSmemDescOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05MmaSmemDescOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05MmaSmemDescOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
public:
static void createSmemDescriptor(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase& builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05MmaSmemDescOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::Tcgen05RelinquishAllocPermitOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class Tcgen05RelinquishAllocPermitOpGenericAdaptorBase {
public:
struct Properties {
using groupTy = ::mlir::NVVM::CTAGroupKindAttr;
groupTy group;
auto getGroup() const {
auto &propStorage = this->group;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::CTAGroupKindAttr>(propStorage);
}
void setGroup(const ::mlir::NVVM::CTAGroupKindAttr &propValue) {
this->group = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.group == this->group &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
Tcgen05RelinquishAllocPermitOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.tcgen05.relinquish_alloc_permit", odsAttrs.getContext());
}
Tcgen05RelinquishAllocPermitOpGenericAdaptorBase(Tcgen05RelinquishAllocPermitOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::CTAGroupKindAttr getGroupAttr();
::mlir::NVVM::CTAGroupKind getGroup();
};
} // namespace detail
template <typename RangeT>
class Tcgen05RelinquishAllocPermitOpGenericAdaptor : public detail::Tcgen05RelinquishAllocPermitOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::Tcgen05RelinquishAllocPermitOpGenericAdaptorBase;
public:
Tcgen05RelinquishAllocPermitOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
Tcgen05RelinquishAllocPermitOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Tcgen05RelinquishAllocPermitOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
Tcgen05RelinquishAllocPermitOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : Tcgen05RelinquishAllocPermitOpGenericAdaptor(values, attrs, Properties{}, {}) {}
Tcgen05RelinquishAllocPermitOpGenericAdaptor(RangeT values, const Tcgen05RelinquishAllocPermitOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = Tcgen05RelinquishAllocPermitOp, typename = std::enable_if_t<std::is_same_v<LateInst, Tcgen05RelinquishAllocPermitOp>>>
Tcgen05RelinquishAllocPermitOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class Tcgen05RelinquishAllocPermitOpAdaptor : public Tcgen05RelinquishAllocPermitOpGenericAdaptor<::mlir::ValueRange> {
public:
using Tcgen05RelinquishAllocPermitOpGenericAdaptor::Tcgen05RelinquishAllocPermitOpGenericAdaptor;
Tcgen05RelinquishAllocPermitOpAdaptor(Tcgen05RelinquishAllocPermitOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class Tcgen05RelinquishAllocPermitOp : public ::mlir::Op<Tcgen05RelinquishAllocPermitOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<1002,1012,1102>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = Tcgen05RelinquishAllocPermitOpAdaptor;
template <typename RangeT>
using GenericAdaptor = Tcgen05RelinquishAllocPermitOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("group")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getGroupAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getGroupAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.tcgen05.relinquish_alloc_permit");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::CTAGroupKindAttr getGroupAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::CTAGroupKindAttr>(getProperties().group);
}
::mlir::NVVM::CTAGroupKind getGroup();
void setGroupAttr(::mlir::NVVM::CTAGroupKindAttr attr) {
getProperties().group = attr;
}
void setGroup(::mlir::NVVM::CTAGroupKind attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::CTAGroupKindAttr group);
static Tcgen05RelinquishAllocPermitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::CTAGroupKindAttr group);
static Tcgen05RelinquishAllocPermitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::CTAGroupKindAttr group);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::CTAGroupKindAttr group);
static Tcgen05RelinquishAllocPermitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::CTAGroupKindAttr group);
static Tcgen05RelinquishAllocPermitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::CTAGroupKindAttr group);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static Tcgen05RelinquishAllocPermitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static Tcgen05RelinquishAllocPermitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static Tcgen05RelinquishAllocPermitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static Tcgen05RelinquishAllocPermitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05RelinquishAllocPermitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05RelinquishAllocPermitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05RelinquishAllocPermitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05RelinquishAllocPermitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05RelinquishAllocPermitOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::Tcgen05RelinquishAllocPermitOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::Tcgen05ShiftOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class Tcgen05ShiftOpGenericAdaptorBase {
public:
struct Properties {
using groupTy = ::mlir::NVVM::CTAGroupKindAttr;
groupTy group;
auto getGroup() const {
auto &propStorage = this->group;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::CTAGroupKindAttr>(propStorage);
}
void setGroup(const ::mlir::NVVM::CTAGroupKindAttr &propValue) {
this->group = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.group == this->group &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
Tcgen05ShiftOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.tcgen05.shift", odsAttrs.getContext());
}
Tcgen05ShiftOpGenericAdaptorBase(Tcgen05ShiftOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::CTAGroupKindAttr getGroupAttr();
::mlir::NVVM::CTAGroupKind getGroup();
};
} // namespace detail
template <typename RangeT>
class Tcgen05ShiftOpGenericAdaptor : public detail::Tcgen05ShiftOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::Tcgen05ShiftOpGenericAdaptorBase;
static constexpr int odsIndex_taddr = 0;
public:
Tcgen05ShiftOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
Tcgen05ShiftOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Tcgen05ShiftOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
Tcgen05ShiftOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : Tcgen05ShiftOpGenericAdaptor(values, attrs, Properties{}, {}) {}
Tcgen05ShiftOpGenericAdaptor(RangeT values, const Tcgen05ShiftOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = Tcgen05ShiftOp, typename = std::enable_if_t<std::is_same_v<LateInst, Tcgen05ShiftOp>>>
Tcgen05ShiftOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getTaddr() {
return (*getODSOperands(0).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class Tcgen05ShiftOpAdaptor : public Tcgen05ShiftOpGenericAdaptor<::mlir::ValueRange> {
public:
using Tcgen05ShiftOpGenericAdaptor::Tcgen05ShiftOpGenericAdaptor;
Tcgen05ShiftOpAdaptor(Tcgen05ShiftOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class Tcgen05ShiftOp : public ::mlir::Op<Tcgen05ShiftOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<1003,1013,1033,1103>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = Tcgen05ShiftOpAdaptor;
template <typename RangeT>
using GenericAdaptor = Tcgen05ShiftOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_taddr = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("group")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getGroupAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getGroupAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.tcgen05.shift");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getTaddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin());
}
::mlir::OpOperand &getTaddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::CTAGroupKindAttr getGroupAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::CTAGroupKindAttr>(getProperties().group);
}
::mlir::NVVM::CTAGroupKind getGroup();
void setGroupAttr(::mlir::NVVM::CTAGroupKindAttr attr) {
getProperties().group = attr;
}
void setGroup(::mlir::NVVM::CTAGroupKind attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value taddr, ::mlir::NVVM::CTAGroupKindAttr group);
static Tcgen05ShiftOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value taddr, ::mlir::NVVM::CTAGroupKindAttr group);
static Tcgen05ShiftOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value taddr, ::mlir::NVVM::CTAGroupKindAttr group);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value taddr, ::mlir::NVVM::CTAGroupKindAttr group);
static Tcgen05ShiftOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value taddr, ::mlir::NVVM::CTAGroupKindAttr group);
static Tcgen05ShiftOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value taddr, ::mlir::NVVM::CTAGroupKindAttr group);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value taddr, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static Tcgen05ShiftOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value taddr, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static Tcgen05ShiftOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value taddr, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value taddr, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static Tcgen05ShiftOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value taddr, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static Tcgen05ShiftOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value taddr, ::mlir::NVVM::CTAGroupKind group = CTAGroupKind::CTA_1);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05ShiftOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05ShiftOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05ShiftOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05ShiftOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05ShiftOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::Tcgen05ShiftOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::Tcgen05StOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class Tcgen05StOpGenericAdaptorBase {
public:
struct Properties {
using shapeTy = ::mlir::NVVM::Tcgen05LdStShapeAttr;
shapeTy shape;
auto getShape() const {
auto &propStorage = this->shape;
return ::llvm::cast<::mlir::NVVM::Tcgen05LdStShapeAttr>(propStorage);
}
void setShape(const ::mlir::NVVM::Tcgen05LdStShapeAttr &propValue) {
this->shape = propValue;
}
using unpackTy = ::mlir::UnitAttr;
unpackTy unpack;
auto getUnpack() const {
auto &propStorage = this->unpack;
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage);
}
void setUnpack(const ::mlir::UnitAttr &propValue) {
this->unpack = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.shape == this->shape &&
rhs.unpack == this->unpack &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
Tcgen05StOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.tcgen05.st", odsAttrs.getContext());
}
Tcgen05StOpGenericAdaptorBase(Tcgen05StOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::UnitAttr getUnpackAttr();
bool getUnpack();
::mlir::NVVM::Tcgen05LdStShapeAttr getShapeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::Tcgen05LdStShapeAttr>(getProperties().shape);
return attr;
}
::mlir::NVVM::Tcgen05LdStShape getShape();
};
} // namespace detail
template <typename RangeT>
class Tcgen05StOpGenericAdaptor : public detail::Tcgen05StOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::Tcgen05StOpGenericAdaptorBase;
static constexpr int odsIndex_tmemAddr = 0;
static constexpr int odsIndex_val = 1;
static constexpr int odsIndex_offset = 2;
public:
Tcgen05StOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
Tcgen05StOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Tcgen05StOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
Tcgen05StOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : Tcgen05StOpGenericAdaptor(values, attrs, Properties{}, {}) {}
Tcgen05StOpGenericAdaptor(RangeT values, const Tcgen05StOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = Tcgen05StOp, typename = std::enable_if_t<std::is_same_v<LateInst, Tcgen05StOp>>>
Tcgen05StOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getTmemAddr() {
return (*getODSOperands(0).begin());
}
ValueT getVal() {
return (*getODSOperands(1).begin());
}
ValueT getOffset() {
auto operands = getODSOperands(2);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class Tcgen05StOpAdaptor : public Tcgen05StOpGenericAdaptor<::mlir::ValueRange> {
public:
using Tcgen05StOpGenericAdaptor::Tcgen05StOpGenericAdaptor;
Tcgen05StOpAdaptor(Tcgen05StOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class Tcgen05StOp : public ::mlir::Op<Tcgen05StOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<1002,1012,1102>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = Tcgen05StOpAdaptor;
template <typename RangeT>
using GenericAdaptor = Tcgen05StOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_tmemAddr = 0;
static constexpr int odsIndex_val = 1;
static constexpr int odsIndex_offset = 2;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("shape"), ::llvm::StringRef("unpack")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getShapeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getShapeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getUnpackAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getUnpackAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.tcgen05.st");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getTmemAddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::Type> getVal() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getOffset() {
auto operands = getODSOperands(2);
return operands.empty() ? ::mlir::TypedValue<::mlir::IntegerType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*operands.begin());
}
::mlir::OpOperand &getTmemAddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getValMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getOffsetMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::UnitAttr getUnpackAttr() {
return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().unpack);
}
bool getUnpack();
::mlir::NVVM::Tcgen05LdStShapeAttr getShapeAttr() {
return ::llvm::cast<::mlir::NVVM::Tcgen05LdStShapeAttr>(getProperties().shape);
}
::mlir::NVVM::Tcgen05LdStShape getShape();
void setUnpackAttr(::mlir::UnitAttr attr) {
getProperties().unpack = attr;
}
void setUnpack(bool attrValue);
void setShapeAttr(::mlir::NVVM::Tcgen05LdStShapeAttr attr) {
getProperties().shape = attr;
}
void setShape(::mlir::NVVM::Tcgen05LdStShape attrValue);
::mlir::Attribute removeUnpackAttr() {
auto attr = getProperties().unpack;
getProperties().unpack = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::UnitAttr unpack, ::mlir::NVVM::Tcgen05LdStShapeAttr shape, ::mlir::Value tmemAddr, ::mlir::Value val, /*optional*/::mlir::Value offset);
static Tcgen05StOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::UnitAttr unpack, ::mlir::NVVM::Tcgen05LdStShapeAttr shape, ::mlir::Value tmemAddr, ::mlir::Value val, /*optional*/::mlir::Value offset);
static Tcgen05StOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::UnitAttr unpack, ::mlir::NVVM::Tcgen05LdStShapeAttr shape, ::mlir::Value tmemAddr, ::mlir::Value val, /*optional*/::mlir::Value offset);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::UnitAttr unpack, ::mlir::NVVM::Tcgen05LdStShapeAttr shape, ::mlir::Value tmemAddr, ::mlir::Value val, /*optional*/::mlir::Value offset);
static Tcgen05StOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::UnitAttr unpack, ::mlir::NVVM::Tcgen05LdStShapeAttr shape, ::mlir::Value tmemAddr, ::mlir::Value val, /*optional*/::mlir::Value offset);
static Tcgen05StOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::UnitAttr unpack, ::mlir::NVVM::Tcgen05LdStShapeAttr shape, ::mlir::Value tmemAddr, ::mlir::Value val, /*optional*/::mlir::Value offset);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/bool unpack, ::mlir::NVVM::Tcgen05LdStShape shape, ::mlir::Value tmemAddr, ::mlir::Value val, /*optional*/::mlir::Value offset);
static Tcgen05StOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/bool unpack, ::mlir::NVVM::Tcgen05LdStShape shape, ::mlir::Value tmemAddr, ::mlir::Value val, /*optional*/::mlir::Value offset);
static Tcgen05StOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/bool unpack, ::mlir::NVVM::Tcgen05LdStShape shape, ::mlir::Value tmemAddr, ::mlir::Value val, /*optional*/::mlir::Value offset);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/bool unpack, ::mlir::NVVM::Tcgen05LdStShape shape, ::mlir::Value tmemAddr, ::mlir::Value val, /*optional*/::mlir::Value offset);
static Tcgen05StOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/bool unpack, ::mlir::NVVM::Tcgen05LdStShape shape, ::mlir::Value tmemAddr, ::mlir::Value val, /*optional*/::mlir::Value offset);
static Tcgen05StOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/bool unpack, ::mlir::NVVM::Tcgen05LdStShape shape, ::mlir::Value tmemAddr, ::mlir::Value val, /*optional*/::mlir::Value offset);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05StOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05StOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05StOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05StOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 2 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05StOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::Tcgen05StOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::Tcgen05WaitOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class Tcgen05WaitOpGenericAdaptorBase {
public:
struct Properties {
using kindTy = ::mlir::NVVM::Tcgen05WaitKindAttr;
kindTy kind;
auto getKind() const {
auto &propStorage = this->kind;
return ::llvm::cast<::mlir::NVVM::Tcgen05WaitKindAttr>(propStorage);
}
void setKind(const ::mlir::NVVM::Tcgen05WaitKindAttr &propValue) {
this->kind = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.kind == this->kind &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
Tcgen05WaitOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.tcgen05.wait", odsAttrs.getContext());
}
Tcgen05WaitOpGenericAdaptorBase(Tcgen05WaitOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::Tcgen05WaitKindAttr getKindAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::Tcgen05WaitKindAttr>(getProperties().kind);
return attr;
}
::mlir::NVVM::Tcgen05WaitKind getKind();
};
} // namespace detail
template <typename RangeT>
class Tcgen05WaitOpGenericAdaptor : public detail::Tcgen05WaitOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::Tcgen05WaitOpGenericAdaptorBase;
public:
Tcgen05WaitOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
Tcgen05WaitOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Tcgen05WaitOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
Tcgen05WaitOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : Tcgen05WaitOpGenericAdaptor(values, attrs, Properties{}, {}) {}
Tcgen05WaitOpGenericAdaptor(RangeT values, const Tcgen05WaitOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = Tcgen05WaitOp, typename = std::enable_if_t<std::is_same_v<LateInst, Tcgen05WaitOp>>>
Tcgen05WaitOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class Tcgen05WaitOpAdaptor : public Tcgen05WaitOpGenericAdaptor<::mlir::ValueRange> {
public:
using Tcgen05WaitOpGenericAdaptor::Tcgen05WaitOpGenericAdaptor;
Tcgen05WaitOpAdaptor(Tcgen05WaitOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class Tcgen05WaitOp : public ::mlir::Op<Tcgen05WaitOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<1002,1012,1102>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = Tcgen05WaitOpAdaptor;
template <typename RangeT>
using GenericAdaptor = Tcgen05WaitOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("kind")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getKindAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getKindAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.tcgen05.wait");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::Tcgen05WaitKindAttr getKindAttr() {
return ::llvm::cast<::mlir::NVVM::Tcgen05WaitKindAttr>(getProperties().kind);
}
::mlir::NVVM::Tcgen05WaitKind getKind();
void setKindAttr(::mlir::NVVM::Tcgen05WaitKindAttr attr) {
getProperties().kind = attr;
}
void setKind(::mlir::NVVM::Tcgen05WaitKind attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::Tcgen05WaitKindAttr kind);
static Tcgen05WaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::Tcgen05WaitKindAttr kind);
static Tcgen05WaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::Tcgen05WaitKindAttr kind);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05WaitKindAttr kind);
static Tcgen05WaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05WaitKindAttr kind);
static Tcgen05WaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05WaitKindAttr kind);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::Tcgen05WaitKind kind);
static Tcgen05WaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::Tcgen05WaitKind kind);
static Tcgen05WaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::Tcgen05WaitKind kind);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05WaitKind kind);
static Tcgen05WaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05WaitKind kind);
static Tcgen05WaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::Tcgen05WaitKind kind);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05WaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Tcgen05WaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05WaitOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Tcgen05WaitOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05WaitOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::Tcgen05WaitOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::TensormapReplaceOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class TensormapReplaceOpGenericAdaptorBase {
public:
struct Properties {
using fieldTy = ::mlir::NVVM::TensormapFieldAttr;
fieldTy field;
auto getField() const {
auto &propStorage = this->field;
return ::llvm::cast<::mlir::NVVM::TensormapFieldAttr>(propStorage);
}
void setField(const ::mlir::NVVM::TensormapFieldAttr &propValue) {
this->field = propValue;
}
using new_value_attrTy = ::mlir::Attribute;
new_value_attrTy new_value_attr;
auto getNewValueAttr() const {
auto &propStorage = this->new_value_attr;
return ::llvm::dyn_cast_or_null<::mlir::Attribute>(propStorage);
}
void setNewValueAttr(const ::mlir::Attribute &propValue) {
this->new_value_attr = propValue;
}
using ordTy = ::mlir::IntegerAttr;
ordTy ord;
auto getOrd() const {
auto &propStorage = this->ord;
return ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(propStorage);
}
void setOrd(const ::mlir::IntegerAttr &propValue) {
this->ord = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.field == this->field &&
rhs.new_value_attr == this->new_value_attr &&
rhs.ord == this->ord &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
TensormapReplaceOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.tensormap.replace", odsAttrs.getContext());
}
TensormapReplaceOpGenericAdaptorBase(TensormapReplaceOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::TensormapFieldAttr getFieldAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::TensormapFieldAttr>(getProperties().field);
return attr;
}
::mlir::NVVM::TensormapField getField();
::mlir::IntegerAttr getOrdAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().ord);
return attr;
}
::std::optional<uint32_t> getOrd();
::mlir::Attribute getNewValueAttrAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::Attribute>(getProperties().new_value_attr);
return attr;
}
::std::optional<::mlir::Attribute> getNewValueAttr();
};
} // namespace detail
template <typename RangeT>
class TensormapReplaceOpGenericAdaptor : public detail::TensormapReplaceOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::TensormapReplaceOpGenericAdaptorBase;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_new_value = 1;
public:
TensormapReplaceOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
TensormapReplaceOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : TensormapReplaceOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
TensormapReplaceOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : TensormapReplaceOpGenericAdaptor(values, attrs, Properties{}, {}) {}
TensormapReplaceOpGenericAdaptor(RangeT values, const TensormapReplaceOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = TensormapReplaceOp, typename = std::enable_if_t<std::is_same_v<LateInst, TensormapReplaceOp>>>
TensormapReplaceOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getAddr() {
return (*getODSOperands(0).begin());
}
ValueT getNewValue() {
auto operands = getODSOperands(1);
return operands.empty() ? ValueT{} : (*operands.begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class TensormapReplaceOpAdaptor : public TensormapReplaceOpGenericAdaptor<::mlir::ValueRange> {
public:
using TensormapReplaceOpGenericAdaptor::TensormapReplaceOpGenericAdaptor;
TensormapReplaceOpAdaptor(TensormapReplaceOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class TensormapReplaceOp : public ::mlir::Op<TensormapReplaceOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<903,1033,1002,1012,1102,1202>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = TensormapReplaceOpAdaptor;
template <typename RangeT>
using GenericAdaptor = TensormapReplaceOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_addr = 0;
static constexpr int odsIndex_new_value = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("field"), ::llvm::StringRef("new_value_attr"), ::llvm::StringRef("ord")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getFieldAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getFieldAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getNewValueAttrAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getNewValueAttrAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getOrdAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getOrdAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.tensormap.replace");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getAddr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::Type> getNewValue() {
auto operands = getODSOperands(1);
return operands.empty() ? ::mlir::TypedValue<::mlir::Type>{} : ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*operands.begin());
}
::mlir::OpOperand &getAddrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getNewValueMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::TensormapFieldAttr getFieldAttr() {
return ::llvm::cast<::mlir::NVVM::TensormapFieldAttr>(getProperties().field);
}
::mlir::NVVM::TensormapField getField();
::mlir::IntegerAttr getOrdAttr() {
return ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().ord);
}
::std::optional<uint32_t> getOrd();
::mlir::Attribute getNewValueAttrAttr() {
return ::llvm::dyn_cast_or_null<::mlir::Attribute>(getProperties().new_value_attr);
}
::std::optional<::mlir::Attribute> getNewValueAttr();
void setFieldAttr(::mlir::NVVM::TensormapFieldAttr attr) {
getProperties().field = attr;
}
void setField(::mlir::NVVM::TensormapField attrValue);
void setOrdAttr(::mlir::IntegerAttr attr) {
getProperties().ord = attr;
}
void setOrd(::std::optional<uint32_t> attrValue);
void setNewValueAttrAttr(::mlir::Attribute attr) {
getProperties().new_value_attr = attr;
}
::mlir::Attribute removeOrdAttr() {
auto attr = getProperties().ord;
getProperties().ord = {};
return attr;
}
::mlir::Attribute removeNewValueAttrAttr() {
auto attr = getProperties().new_value_attr;
getProperties().new_value_attr = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::TensormapFieldAttr field, ::mlir::Value addr, /*optional*/::mlir::Value new_value, /*optional*/::mlir::IntegerAttr ord, /*optional*/::mlir::Attribute new_value_attr);
static TensormapReplaceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::TensormapFieldAttr field, ::mlir::Value addr, /*optional*/::mlir::Value new_value, /*optional*/::mlir::IntegerAttr ord, /*optional*/::mlir::Attribute new_value_attr);
static TensormapReplaceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::TensormapFieldAttr field, ::mlir::Value addr, /*optional*/::mlir::Value new_value, /*optional*/::mlir::IntegerAttr ord, /*optional*/::mlir::Attribute new_value_attr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::TensormapFieldAttr field, ::mlir::Value addr, /*optional*/::mlir::Value new_value, /*optional*/::mlir::IntegerAttr ord, /*optional*/::mlir::Attribute new_value_attr);
static TensormapReplaceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::TensormapFieldAttr field, ::mlir::Value addr, /*optional*/::mlir::Value new_value, /*optional*/::mlir::IntegerAttr ord, /*optional*/::mlir::Attribute new_value_attr);
static TensormapReplaceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::TensormapFieldAttr field, ::mlir::Value addr, /*optional*/::mlir::Value new_value, /*optional*/::mlir::IntegerAttr ord, /*optional*/::mlir::Attribute new_value_attr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::NVVM::TensormapField field, ::mlir::Value addr, /*optional*/::mlir::Value new_value, /*optional*/::mlir::IntegerAttr ord, /*optional*/::mlir::Attribute new_value_attr);
static TensormapReplaceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::NVVM::TensormapField field, ::mlir::Value addr, /*optional*/::mlir::Value new_value, /*optional*/::mlir::IntegerAttr ord, /*optional*/::mlir::Attribute new_value_attr);
static TensormapReplaceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::NVVM::TensormapField field, ::mlir::Value addr, /*optional*/::mlir::Value new_value, /*optional*/::mlir::IntegerAttr ord, /*optional*/::mlir::Attribute new_value_attr);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::NVVM::TensormapField field, ::mlir::Value addr, /*optional*/::mlir::Value new_value, /*optional*/::mlir::IntegerAttr ord, /*optional*/::mlir::Attribute new_value_attr);
static TensormapReplaceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::NVVM::TensormapField field, ::mlir::Value addr, /*optional*/::mlir::Value new_value, /*optional*/::mlir::IntegerAttr ord, /*optional*/::mlir::Attribute new_value_attr);
static TensormapReplaceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::NVVM::TensormapField field, ::mlir::Value addr, /*optional*/::mlir::Value new_value, /*optional*/::mlir::IntegerAttr ord, /*optional*/::mlir::Attribute new_value_attr);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static TensormapReplaceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static TensormapReplaceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static TensormapReplaceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static TensormapReplaceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 3 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static NVVM::IDArgPair
getIntrinsicIDAndArgs(Operation &op, LLVM::ModuleTranslation &mt,
llvm::IRBuilderBase &builder);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::TensormapReplaceOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::TensormapReplaceOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ThreadIdXOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ThreadIdXOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ThreadIdXOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.tid.x", odsAttrs.getContext());
}
ThreadIdXOpGenericAdaptorBase(ThreadIdXOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class ThreadIdXOpGenericAdaptor : public detail::ThreadIdXOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ThreadIdXOpGenericAdaptorBase;
public:
ThreadIdXOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ThreadIdXOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ThreadIdXOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ThreadIdXOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ThreadIdXOpGenericAdaptor(values, attrs, Properties{}, {}) {}
ThreadIdXOpGenericAdaptor(RangeT values, const ThreadIdXOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ThreadIdXOp, typename = std::enable_if_t<std::is_same_v<LateInst, ThreadIdXOp>>>
ThreadIdXOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ThreadIdXOpAdaptor : public ThreadIdXOpGenericAdaptor<::mlir::ValueRange> {
public:
using ThreadIdXOpGenericAdaptor::ThreadIdXOpGenericAdaptor;
ThreadIdXOpAdaptor(ThreadIdXOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ThreadIdXOp : public ::mlir::Op<ThreadIdXOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ThreadIdXOpAdaptor;
template <typename RangeT>
using GenericAdaptor = ThreadIdXOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<ThreadIdXOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.tid.x");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static ThreadIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static ThreadIdXOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ThreadIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ThreadIdXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ThreadIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ThreadIdXOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ThreadIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ThreadIdXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ThreadIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ThreadIdXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ThreadIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ThreadIdXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ThreadIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ThreadIdXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ThreadIdXOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ThreadIdXOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ThreadIdXOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ThreadIdXOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ThreadIdYOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ThreadIdYOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ThreadIdYOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.tid.y", odsAttrs.getContext());
}
ThreadIdYOpGenericAdaptorBase(ThreadIdYOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class ThreadIdYOpGenericAdaptor : public detail::ThreadIdYOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ThreadIdYOpGenericAdaptorBase;
public:
ThreadIdYOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ThreadIdYOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ThreadIdYOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ThreadIdYOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ThreadIdYOpGenericAdaptor(values, attrs, Properties{}, {}) {}
ThreadIdYOpGenericAdaptor(RangeT values, const ThreadIdYOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ThreadIdYOp, typename = std::enable_if_t<std::is_same_v<LateInst, ThreadIdYOp>>>
ThreadIdYOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ThreadIdYOpAdaptor : public ThreadIdYOpGenericAdaptor<::mlir::ValueRange> {
public:
using ThreadIdYOpGenericAdaptor::ThreadIdYOpGenericAdaptor;
ThreadIdYOpAdaptor(ThreadIdYOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ThreadIdYOp : public ::mlir::Op<ThreadIdYOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ThreadIdYOpAdaptor;
template <typename RangeT>
using GenericAdaptor = ThreadIdYOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<ThreadIdYOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.tid.y");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static ThreadIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static ThreadIdYOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ThreadIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ThreadIdYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ThreadIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ThreadIdYOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ThreadIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ThreadIdYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ThreadIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ThreadIdYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ThreadIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ThreadIdYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ThreadIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ThreadIdYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ThreadIdYOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ThreadIdYOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ThreadIdYOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ThreadIdYOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::ThreadIdZOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class ThreadIdZOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
ThreadIdZOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.tid.z", odsAttrs.getContext());
}
ThreadIdZOpGenericAdaptorBase(ThreadIdZOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class ThreadIdZOpGenericAdaptor : public detail::ThreadIdZOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::ThreadIdZOpGenericAdaptorBase;
public:
ThreadIdZOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
ThreadIdZOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ThreadIdZOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
ThreadIdZOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ThreadIdZOpGenericAdaptor(values, attrs, Properties{}, {}) {}
ThreadIdZOpGenericAdaptor(RangeT values, const ThreadIdZOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = ThreadIdZOp, typename = std::enable_if_t<std::is_same_v<LateInst, ThreadIdZOp>>>
ThreadIdZOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class ThreadIdZOpAdaptor : public ThreadIdZOpGenericAdaptor<::mlir::ValueRange> {
public:
using ThreadIdZOpGenericAdaptor::ThreadIdZOpGenericAdaptor;
ThreadIdZOpAdaptor(ThreadIdZOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class ThreadIdZOp : public ::mlir::Op<ThreadIdZOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = ThreadIdZOpAdaptor;
template <typename RangeT>
using GenericAdaptor = ThreadIdZOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<ThreadIdZOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.tid.z");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static ThreadIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static ThreadIdZOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ThreadIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ThreadIdZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ThreadIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ThreadIdZOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ThreadIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static ThreadIdZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ThreadIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ThreadIdZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ThreadIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static ThreadIdZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ThreadIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ThreadIdZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ThreadIdZOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static ThreadIdZOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::ThreadIdZOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::ThreadIdZOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::TotalSmemSize declarations
//===----------------------------------------------------------------------===//
namespace detail {
class TotalSmemSizeGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
TotalSmemSizeGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.total.smem.size", odsAttrs.getContext());
}
TotalSmemSizeGenericAdaptorBase(TotalSmemSize op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class TotalSmemSizeGenericAdaptor : public detail::TotalSmemSizeGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::TotalSmemSizeGenericAdaptorBase;
public:
TotalSmemSizeGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
TotalSmemSizeGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : TotalSmemSizeGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
TotalSmemSizeGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : TotalSmemSizeGenericAdaptor(values, attrs, Properties{}, {}) {}
TotalSmemSizeGenericAdaptor(RangeT values, const TotalSmemSizeGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = TotalSmemSize, typename = std::enable_if_t<std::is_same_v<LateInst, TotalSmemSize>>>
TotalSmemSizeGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class TotalSmemSizeAdaptor : public TotalSmemSizeGenericAdaptor<::mlir::ValueRange> {
public:
using TotalSmemSizeGenericAdaptor::TotalSmemSizeGenericAdaptor;
TotalSmemSizeAdaptor(TotalSmemSize op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class TotalSmemSize : public ::mlir::Op<TotalSmemSize, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = TotalSmemSizeAdaptor;
template <typename RangeT>
using GenericAdaptor = TotalSmemSizeGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.total.smem.size");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
static TotalSmemSize create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
static TotalSmemSize create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static TotalSmemSize create(::mlir::OpBuilder &builder, ::mlir::Location location);
static TotalSmemSize create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static TotalSmemSize create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static TotalSmemSize create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static TotalSmemSize create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static TotalSmemSize create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static TotalSmemSize create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static TotalSmemSize create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static TotalSmemSize create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static TotalSmemSize create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static TotalSmemSize create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static TotalSmemSize create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::TotalSmemSize)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::VoteSyncOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class VoteSyncOpGenericAdaptorBase {
public:
struct Properties {
using kindTy = ::mlir::NVVM::VoteSyncKindAttr;
kindTy kind;
auto getKind() const {
auto &propStorage = this->kind;
return ::llvm::cast<::mlir::NVVM::VoteSyncKindAttr>(propStorage);
}
void setKind(const ::mlir::NVVM::VoteSyncKindAttr &propValue) {
this->kind = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.kind == this->kind &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
VoteSyncOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.vote.sync", odsAttrs.getContext());
}
VoteSyncOpGenericAdaptorBase(VoteSyncOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::VoteSyncKindAttr getKindAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::VoteSyncKindAttr>(getProperties().kind);
return attr;
}
::mlir::NVVM::VoteSyncKind getKind();
};
} // namespace detail
template <typename RangeT>
class VoteSyncOpGenericAdaptor : public detail::VoteSyncOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::VoteSyncOpGenericAdaptorBase;
static constexpr int odsIndex_mask = 0;
static constexpr int odsIndex_pred = 1;
public:
VoteSyncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
VoteSyncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VoteSyncOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
VoteSyncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VoteSyncOpGenericAdaptor(values, attrs, Properties{}, {}) {}
VoteSyncOpGenericAdaptor(RangeT values, const VoteSyncOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = VoteSyncOp, typename = std::enable_if_t<std::is_same_v<LateInst, VoteSyncOp>>>
VoteSyncOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getMask() {
return (*getODSOperands(0).begin());
}
ValueT getPred() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class VoteSyncOpAdaptor : public VoteSyncOpGenericAdaptor<::mlir::ValueRange> {
public:
using VoteSyncOpGenericAdaptor::VoteSyncOpGenericAdaptor;
VoteSyncOpAdaptor(VoteSyncOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class VoteSyncOp : public ::mlir::Op<VoteSyncOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor> {
public:
using Op::Op;
using Op::print;
using Adaptor = VoteSyncOpAdaptor;
template <typename RangeT>
using GenericAdaptor = VoteSyncOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_mask = 0;
static constexpr int odsIndex_pred = 1;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferTypeOpInterface::Trait<VoteSyncOp>::refineReturnTypes;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("kind")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getKindAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getKindAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.vote.sync");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getMask() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getPred() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getMaskMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getPredMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::VoteSyncKindAttr getKindAttr() {
return ::llvm::cast<::mlir::NVVM::VoteSyncKindAttr>(getProperties().kind);
}
::mlir::NVVM::VoteSyncKind getKind();
void setKindAttr(::mlir::NVVM::VoteSyncKindAttr attr) {
getProperties().kind = attr;
}
void setKind(::mlir::NVVM::VoteSyncKind attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value mask, ::mlir::Value pred, ::mlir::NVVM::VoteSyncKindAttr kind);
static VoteSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value mask, ::mlir::Value pred, ::mlir::NVVM::VoteSyncKindAttr kind);
static VoteSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value mask, ::mlir::Value pred, ::mlir::NVVM::VoteSyncKindAttr kind);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value mask, ::mlir::Value pred, ::mlir::NVVM::VoteSyncKindAttr kind);
static VoteSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value mask, ::mlir::Value pred, ::mlir::NVVM::VoteSyncKindAttr kind);
static VoteSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value mask, ::mlir::Value pred, ::mlir::NVVM::VoteSyncKindAttr kind);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value mask, ::mlir::Value pred, ::mlir::NVVM::VoteSyncKindAttr kind);
static VoteSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value mask, ::mlir::Value pred, ::mlir::NVVM::VoteSyncKindAttr kind);
static VoteSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value mask, ::mlir::Value pred, ::mlir::NVVM::VoteSyncKindAttr kind);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value mask, ::mlir::Value pred, ::mlir::NVVM::VoteSyncKind kind);
static VoteSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value mask, ::mlir::Value pred, ::mlir::NVVM::VoteSyncKind kind);
static VoteSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value mask, ::mlir::Value pred, ::mlir::NVVM::VoteSyncKind kind);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value mask, ::mlir::Value pred, ::mlir::NVVM::VoteSyncKind kind);
static VoteSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value mask, ::mlir::Value pred, ::mlir::NVVM::VoteSyncKind kind);
static VoteSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value mask, ::mlir::Value pred, ::mlir::NVVM::VoteSyncKind kind);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value mask, ::mlir::Value pred, ::mlir::NVVM::VoteSyncKind kind);
static VoteSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value mask, ::mlir::Value pred, ::mlir::NVVM::VoteSyncKind kind);
static VoteSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value mask, ::mlir::Value pred, ::mlir::NVVM::VoteSyncKind kind);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static VoteSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static VoteSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static VoteSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static VoteSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static VoteSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static VoteSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static VoteSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static VoteSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static ::llvm::LogicalResult
inferReturnTypes(::mlir::MLIRContext *context,
std::optional<::mlir::Location> location,
Adaptor adaptor,
::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::VoteSyncOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::VoteSyncOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::WMMALoadOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class WMMALoadOpGenericAdaptorBase {
public:
struct Properties {
using eltypeTy = ::mlir::NVVM::MMATypesAttr;
eltypeTy eltype;
auto getEltype() const {
auto &propStorage = this->eltype;
return ::llvm::cast<::mlir::NVVM::MMATypesAttr>(propStorage);
}
void setEltype(const ::mlir::NVVM::MMATypesAttr &propValue) {
this->eltype = propValue;
}
using fragTy = ::mlir::NVVM::MMAFragAttr;
fragTy frag;
auto getFrag() const {
auto &propStorage = this->frag;
return ::llvm::cast<::mlir::NVVM::MMAFragAttr>(propStorage);
}
void setFrag(const ::mlir::NVVM::MMAFragAttr &propValue) {
this->frag = propValue;
}
using kTy = ::mlir::IntegerAttr;
kTy k;
auto getK() const {
auto &propStorage = this->k;
return ::llvm::cast<::mlir::IntegerAttr>(propStorage);
}
void setK(const ::mlir::IntegerAttr &propValue) {
this->k = propValue;
}
using layoutTy = ::mlir::NVVM::MMALayoutAttr;
layoutTy layout;
auto getLayout() const {
auto &propStorage = this->layout;
return ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(propStorage);
}
void setLayout(const ::mlir::NVVM::MMALayoutAttr &propValue) {
this->layout = propValue;
}
using mTy = ::mlir::IntegerAttr;
mTy m;
auto getM() const {
auto &propStorage = this->m;
return ::llvm::cast<::mlir::IntegerAttr>(propStorage);
}
void setM(const ::mlir::IntegerAttr &propValue) {
this->m = propValue;
}
using nTy = ::mlir::IntegerAttr;
nTy n;
auto getN() const {
auto &propStorage = this->n;
return ::llvm::cast<::mlir::IntegerAttr>(propStorage);
}
void setN(const ::mlir::IntegerAttr &propValue) {
this->n = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.eltype == this->eltype &&
rhs.frag == this->frag &&
rhs.k == this->k &&
rhs.layout == this->layout &&
rhs.m == this->m &&
rhs.n == this->n &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
WMMALoadOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.wmma.load", odsAttrs.getContext());
}
WMMALoadOpGenericAdaptorBase(WMMALoadOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::IntegerAttr getMAttr() {
auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().m);
return attr;
}
uint32_t getM();
::mlir::IntegerAttr getNAttr() {
auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().n);
return attr;
}
uint32_t getN();
::mlir::IntegerAttr getKAttr() {
auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().k);
return attr;
}
uint32_t getK();
::mlir::NVVM::MMALayoutAttr getLayoutAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(getProperties().layout);
return attr;
}
::mlir::NVVM::MMALayout getLayout();
::mlir::NVVM::MMATypesAttr getEltypeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MMATypesAttr>(getProperties().eltype);
return attr;
}
::mlir::NVVM::MMATypes getEltype();
::mlir::NVVM::MMAFragAttr getFragAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MMAFragAttr>(getProperties().frag);
return attr;
}
::mlir::NVVM::MMAFrag getFrag();
};
} // namespace detail
template <typename RangeT>
class WMMALoadOpGenericAdaptor : public detail::WMMALoadOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::WMMALoadOpGenericAdaptorBase;
static constexpr int odsIndex_ptr = 0;
static constexpr int odsIndex_stride = 1;
public:
WMMALoadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
WMMALoadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : WMMALoadOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
WMMALoadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : WMMALoadOpGenericAdaptor(values, attrs, Properties{}, {}) {}
WMMALoadOpGenericAdaptor(RangeT values, const WMMALoadOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = WMMALoadOp, typename = std::enable_if_t<std::is_same_v<LateInst, WMMALoadOp>>>
WMMALoadOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getPtr() {
return (*getODSOperands(0).begin());
}
ValueT getStride() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class WMMALoadOpAdaptor : public WMMALoadOpGenericAdaptor<::mlir::ValueRange> {
public:
using WMMALoadOpGenericAdaptor::WMMALoadOpGenericAdaptor;
WMMALoadOpAdaptor(WMMALoadOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class WMMALoadOp : public ::mlir::Op<WMMALoadOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = WMMALoadOpAdaptor;
template <typename RangeT>
using GenericAdaptor = WMMALoadOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_ptr = 0;
static constexpr int odsIndex_stride = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("eltype"), ::llvm::StringRef("frag"), ::llvm::StringRef("k"), ::llvm::StringRef("layout"), ::llvm::StringRef("m"), ::llvm::StringRef("n")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getEltypeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getEltypeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getFragAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getFragAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getKAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getKAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
::mlir::StringAttr getLayoutAttrName() {
return getAttributeNameForIndex(3);
}
static ::mlir::StringAttr getLayoutAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 3);
}
::mlir::StringAttr getMAttrName() {
return getAttributeNameForIndex(4);
}
static ::mlir::StringAttr getMAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 4);
}
::mlir::StringAttr getNAttrName() {
return getAttributeNameForIndex(5);
}
static ::mlir::StringAttr getNAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 5);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.wmma.load");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getPtr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getStride() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getPtrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getStrideMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::IntegerAttr getMAttr() {
return ::llvm::cast<::mlir::IntegerAttr>(getProperties().m);
}
uint32_t getM();
::mlir::IntegerAttr getNAttr() {
return ::llvm::cast<::mlir::IntegerAttr>(getProperties().n);
}
uint32_t getN();
::mlir::IntegerAttr getKAttr() {
return ::llvm::cast<::mlir::IntegerAttr>(getProperties().k);
}
uint32_t getK();
::mlir::NVVM::MMALayoutAttr getLayoutAttr() {
return ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(getProperties().layout);
}
::mlir::NVVM::MMALayout getLayout();
::mlir::NVVM::MMATypesAttr getEltypeAttr() {
return ::llvm::cast<::mlir::NVVM::MMATypesAttr>(getProperties().eltype);
}
::mlir::NVVM::MMATypes getEltype();
::mlir::NVVM::MMAFragAttr getFragAttr() {
return ::llvm::cast<::mlir::NVVM::MMAFragAttr>(getProperties().frag);
}
::mlir::NVVM::MMAFrag getFrag();
void setMAttr(::mlir::IntegerAttr attr) {
getProperties().m = attr;
}
void setM(uint32_t attrValue);
void setNAttr(::mlir::IntegerAttr attr) {
getProperties().n = attr;
}
void setN(uint32_t attrValue);
void setKAttr(::mlir::IntegerAttr attr) {
getProperties().k = attr;
}
void setK(uint32_t attrValue);
void setLayoutAttr(::mlir::NVVM::MMALayoutAttr attr) {
getProperties().layout = attr;
}
void setLayout(::mlir::NVVM::MMALayout attrValue);
void setEltypeAttr(::mlir::NVVM::MMATypesAttr attr) {
getProperties().eltype = attr;
}
void setEltype(::mlir::NVVM::MMATypes attrValue);
void setFragAttr(::mlir::NVVM::MMAFragAttr attr) {
getProperties().frag = attr;
}
void setFrag(::mlir::NVVM::MMAFrag attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value ptr, ::mlir::Value stride, ::mlir::IntegerAttr m, ::mlir::IntegerAttr n, ::mlir::IntegerAttr k, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::MMATypesAttr eltype, ::mlir::NVVM::MMAFragAttr frag);
static WMMALoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptr, ::mlir::Value stride, ::mlir::IntegerAttr m, ::mlir::IntegerAttr n, ::mlir::IntegerAttr k, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::MMATypesAttr eltype, ::mlir::NVVM::MMAFragAttr frag);
static WMMALoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptr, ::mlir::Value stride, ::mlir::IntegerAttr m, ::mlir::IntegerAttr n, ::mlir::IntegerAttr k, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::MMATypesAttr eltype, ::mlir::NVVM::MMAFragAttr frag);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::Value stride, ::mlir::IntegerAttr m, ::mlir::IntegerAttr n, ::mlir::IntegerAttr k, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::MMATypesAttr eltype, ::mlir::NVVM::MMAFragAttr frag);
static WMMALoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::Value stride, ::mlir::IntegerAttr m, ::mlir::IntegerAttr n, ::mlir::IntegerAttr k, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::MMATypesAttr eltype, ::mlir::NVVM::MMAFragAttr frag);
static WMMALoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::Value stride, ::mlir::IntegerAttr m, ::mlir::IntegerAttr n, ::mlir::IntegerAttr k, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::MMATypesAttr eltype, ::mlir::NVVM::MMAFragAttr frag);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value ptr, ::mlir::Value stride, uint32_t m, uint32_t n, uint32_t k, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::MMATypes eltype, ::mlir::NVVM::MMAFrag frag);
static WMMALoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptr, ::mlir::Value stride, uint32_t m, uint32_t n, uint32_t k, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::MMATypes eltype, ::mlir::NVVM::MMAFrag frag);
static WMMALoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptr, ::mlir::Value stride, uint32_t m, uint32_t n, uint32_t k, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::MMATypes eltype, ::mlir::NVVM::MMAFrag frag);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::Value stride, uint32_t m, uint32_t n, uint32_t k, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::MMATypes eltype, ::mlir::NVVM::MMAFrag frag);
static WMMALoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::Value stride, uint32_t m, uint32_t n, uint32_t k, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::MMATypes eltype, ::mlir::NVVM::MMAFrag frag);
static WMMALoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::Value stride, uint32_t m, uint32_t n, uint32_t k, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::MMATypes eltype, ::mlir::NVVM::MMAFrag frag);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WMMALoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WMMALoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WMMALoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WMMALoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 6 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static llvm::Intrinsic::ID getIntrinsicID(int m, int n, int k, mlir::NVVM::MMALayout layoutEnum,mlir::NVVM::MMATypes eltypeEnum,mlir::NVVM::MMAFrag fragEnum) {llvm::StringRef layout = stringifyEnum(layoutEnum);llvm::StringRef eltype = stringifyEnum(eltypeEnum);llvm::StringRef frag = stringifyEnum(fragEnum);
if (layout == "row" && m == 16 && n == 16 && k == 16 && "f16" == eltype && frag == "a") return llvm::Intrinsic::nvvm_wmma_m16n16k16_load_a_f16_row_stride;
if (layout == "col" && m == 16 && n == 16 && k == 16 && "f16" == eltype && frag == "a") return llvm::Intrinsic::nvvm_wmma_m16n16k16_load_a_f16_col_stride;
if (layout == "row" && m == 16 && n == 16 && k == 16 && "s8" == eltype && frag == "a") return llvm::Intrinsic::nvvm_wmma_m16n16k16_load_a_s8_row_stride;
if (layout == "col" && m == 16 && n == 16 && k == 16 && "s8" == eltype && frag == "a") return llvm::Intrinsic::nvvm_wmma_m16n16k16_load_a_s8_col_stride;
if (layout == "row" && m == 16 && n == 16 && k == 16 && "u8" == eltype && frag == "a") return llvm::Intrinsic::nvvm_wmma_m16n16k16_load_a_u8_row_stride;
if (layout == "col" && m == 16 && n == 16 && k == 16 && "u8" == eltype && frag == "a") return llvm::Intrinsic::nvvm_wmma_m16n16k16_load_a_u8_col_stride;
if (layout == "row" && m == 16 && n == 16 && k == 16 && "f16" == eltype && frag == "b") return llvm::Intrinsic::nvvm_wmma_m16n16k16_load_b_f16_row_stride;
if (layout == "col" && m == 16 && n == 16 && k == 16 && "f16" == eltype && frag == "b") return llvm::Intrinsic::nvvm_wmma_m16n16k16_load_b_f16_col_stride;
if (layout == "row" && m == 16 && n == 16 && k == 16 && "s8" == eltype && frag == "b") return llvm::Intrinsic::nvvm_wmma_m16n16k16_load_b_s8_row_stride;
if (layout == "col" && m == 16 && n == 16 && k == 16 && "s8" == eltype && frag == "b") return llvm::Intrinsic::nvvm_wmma_m16n16k16_load_b_s8_col_stride;
if (layout == "row" && m == 16 && n == 16 && k == 16 && "u8" == eltype && frag == "b") return llvm::Intrinsic::nvvm_wmma_m16n16k16_load_b_u8_row_stride;
if (layout == "col" && m == 16 && n == 16 && k == 16 && "u8" == eltype && frag == "b") return llvm::Intrinsic::nvvm_wmma_m16n16k16_load_b_u8_col_stride;
if (layout == "row" && m == 32 && n == 8 && k == 16 && "f16" == eltype && frag == "a") return llvm::Intrinsic::nvvm_wmma_m32n8k16_load_a_f16_row_stride;
if (layout == "col" && m == 32 && n == 8 && k == 16 && "f16" == eltype && frag == "a") return llvm::Intrinsic::nvvm_wmma_m32n8k16_load_a_f16_col_stride;
if (layout == "row" && m == 32 && n == 8 && k == 16 && "s8" == eltype && frag == "a") return llvm::Intrinsic::nvvm_wmma_m32n8k16_load_a_s8_row_stride;
if (layout == "col" && m == 32 && n == 8 && k == 16 && "s8" == eltype && frag == "a") return llvm::Intrinsic::nvvm_wmma_m32n8k16_load_a_s8_col_stride;
if (layout == "row" && m == 32 && n == 8 && k == 16 && "u8" == eltype && frag == "a") return llvm::Intrinsic::nvvm_wmma_m32n8k16_load_a_u8_row_stride;
if (layout == "col" && m == 32 && n == 8 && k == 16 && "u8" == eltype && frag == "a") return llvm::Intrinsic::nvvm_wmma_m32n8k16_load_a_u8_col_stride;
if (layout == "row" && m == 32 && n == 8 && k == 16 && "f16" == eltype && frag == "b") return llvm::Intrinsic::nvvm_wmma_m32n8k16_load_b_f16_row_stride;
if (layout == "col" && m == 32 && n == 8 && k == 16 && "f16" == eltype && frag == "b") return llvm::Intrinsic::nvvm_wmma_m32n8k16_load_b_f16_col_stride;
if (layout == "row" && m == 32 && n == 8 && k == 16 && "s8" == eltype && frag == "b") return llvm::Intrinsic::nvvm_wmma_m32n8k16_load_b_s8_row_stride;
if (layout == "col" && m == 32 && n == 8 && k == 16 && "s8" == eltype && frag == "b") return llvm::Intrinsic::nvvm_wmma_m32n8k16_load_b_s8_col_stride;
if (layout == "row" && m == 32 && n == 8 && k == 16 && "u8" == eltype && frag == "b") return llvm::Intrinsic::nvvm_wmma_m32n8k16_load_b_u8_row_stride;
if (layout == "col" && m == 32 && n == 8 && k == 16 && "u8" == eltype && frag == "b") return llvm::Intrinsic::nvvm_wmma_m32n8k16_load_b_u8_col_stride;
if (layout == "row" && m == 8 && n == 32 && k == 16 && "f16" == eltype && frag == "a") return llvm::Intrinsic::nvvm_wmma_m8n32k16_load_a_f16_row_stride;
if (layout == "col" && m == 8 && n == 32 && k == 16 && "f16" == eltype && frag == "a") return llvm::Intrinsic::nvvm_wmma_m8n32k16_load_a_f16_col_stride;
if (layout == "row" && m == 8 && n == 32 && k == 16 && "s8" == eltype && frag == "a") return llvm::Intrinsic::nvvm_wmma_m8n32k16_load_a_s8_row_stride;
if (layout == "col" && m == 8 && n == 32 && k == 16 && "s8" == eltype && frag == "a") return llvm::Intrinsic::nvvm_wmma_m8n32k16_load_a_s8_col_stride;
if (layout == "row" && m == 8 && n == 32 && k == 16 && "u8" == eltype && frag == "a") return llvm::Intrinsic::nvvm_wmma_m8n32k16_load_a_u8_row_stride;
if (layout == "col" && m == 8 && n == 32 && k == 16 && "u8" == eltype && frag == "a") return llvm::Intrinsic::nvvm_wmma_m8n32k16_load_a_u8_col_stride;
if (layout == "row" && m == 8 && n == 32 && k == 16 && "f16" == eltype && frag == "b") return llvm::Intrinsic::nvvm_wmma_m8n32k16_load_b_f16_row_stride;
if (layout == "col" && m == 8 && n == 32 && k == 16 && "f16" == eltype && frag == "b") return llvm::Intrinsic::nvvm_wmma_m8n32k16_load_b_f16_col_stride;
if (layout == "row" && m == 8 && n == 32 && k == 16 && "s8" == eltype && frag == "b") return llvm::Intrinsic::nvvm_wmma_m8n32k16_load_b_s8_row_stride;
if (layout == "col" && m == 8 && n == 32 && k == 16 && "s8" == eltype && frag == "b") return llvm::Intrinsic::nvvm_wmma_m8n32k16_load_b_s8_col_stride;
if (layout == "row" && m == 8 && n == 32 && k == 16 && "u8" == eltype && frag == "b") return llvm::Intrinsic::nvvm_wmma_m8n32k16_load_b_u8_row_stride;
if (layout == "col" && m == 8 && n == 32 && k == 16 && "u8" == eltype && frag == "b") return llvm::Intrinsic::nvvm_wmma_m8n32k16_load_b_u8_col_stride;
if (layout == "row" && m == 16 && n == 16 && k == 16 && "f16" == eltype && frag == "c") return llvm::Intrinsic::nvvm_wmma_m16n16k16_load_c_f16_row_stride;
if (layout == "col" && m == 16 && n == 16 && k == 16 && "f16" == eltype && frag == "c") return llvm::Intrinsic::nvvm_wmma_m16n16k16_load_c_f16_col_stride;
if (layout == "row" && m == 16 && n == 16 && k == 16 && "f32" == eltype && frag == "c") return llvm::Intrinsic::nvvm_wmma_m16n16k16_load_c_f32_row_stride;
if (layout == "col" && m == 16 && n == 16 && k == 16 && "f32" == eltype && frag == "c") return llvm::Intrinsic::nvvm_wmma_m16n16k16_load_c_f32_col_stride;
if (layout == "row" && m == 16 && n == 16 && k == 16 && "s32" == eltype && frag == "c") return llvm::Intrinsic::nvvm_wmma_m16n16k16_load_c_s32_row_stride;
if (layout == "col" && m == 16 && n == 16 && k == 16 && "s32" == eltype && frag == "c") return llvm::Intrinsic::nvvm_wmma_m16n16k16_load_c_s32_col_stride;
if (layout == "row" && m == 32 && n == 8 && k == 16 && "f16" == eltype && frag == "c") return llvm::Intrinsic::nvvm_wmma_m32n8k16_load_c_f16_row_stride;
if (layout == "col" && m == 32 && n == 8 && k == 16 && "f16" == eltype && frag == "c") return llvm::Intrinsic::nvvm_wmma_m32n8k16_load_c_f16_col_stride;
if (layout == "row" && m == 32 && n == 8 && k == 16 && "f32" == eltype && frag == "c") return llvm::Intrinsic::nvvm_wmma_m32n8k16_load_c_f32_row_stride;
if (layout == "col" && m == 32 && n == 8 && k == 16 && "f32" == eltype && frag == "c") return llvm::Intrinsic::nvvm_wmma_m32n8k16_load_c_f32_col_stride;
if (layout == "row" && m == 32 && n == 8 && k == 16 && "s32" == eltype && frag == "c") return llvm::Intrinsic::nvvm_wmma_m32n8k16_load_c_s32_row_stride;
if (layout == "col" && m == 32 && n == 8 && k == 16 && "s32" == eltype && frag == "c") return llvm::Intrinsic::nvvm_wmma_m32n8k16_load_c_s32_col_stride;
if (layout == "row" && m == 8 && n == 32 && k == 16 && "f16" == eltype && frag == "c") return llvm::Intrinsic::nvvm_wmma_m8n32k16_load_c_f16_row_stride;
if (layout == "col" && m == 8 && n == 32 && k == 16 && "f16" == eltype && frag == "c") return llvm::Intrinsic::nvvm_wmma_m8n32k16_load_c_f16_col_stride;
if (layout == "row" && m == 8 && n == 32 && k == 16 && "f32" == eltype && frag == "c") return llvm::Intrinsic::nvvm_wmma_m8n32k16_load_c_f32_row_stride;
if (layout == "col" && m == 8 && n == 32 && k == 16 && "f32" == eltype && frag == "c") return llvm::Intrinsic::nvvm_wmma_m8n32k16_load_c_f32_col_stride;
if (layout == "row" && m == 8 && n == 32 && k == 16 && "s32" == eltype && frag == "c") return llvm::Intrinsic::nvvm_wmma_m8n32k16_load_c_s32_row_stride;
if (layout == "col" && m == 8 && n == 32 && k == 16 && "s32" == eltype && frag == "c") return llvm::Intrinsic::nvvm_wmma_m8n32k16_load_c_s32_col_stride;
if (layout == "row" && m == 16 && n == 16 && k == 8 && "tf32" == eltype && frag == "a") return llvm::Intrinsic::nvvm_wmma_m16n16k8_load_a_tf32_row_stride;
if (layout == "col" && m == 16 && n == 16 && k == 8 && "tf32" == eltype && frag == "a") return llvm::Intrinsic::nvvm_wmma_m16n16k8_load_a_tf32_col_stride;
if (layout == "row" && m == 16 && n == 16 && k == 8 && "tf32" == eltype && frag == "b") return llvm::Intrinsic::nvvm_wmma_m16n16k8_load_b_tf32_row_stride;
if (layout == "col" && m == 16 && n == 16 && k == 8 && "tf32" == eltype && frag == "b") return llvm::Intrinsic::nvvm_wmma_m16n16k8_load_b_tf32_col_stride;
if (layout == "row" && m == 16 && n == 16 && k == 8 && "f32" == eltype && frag == "c") return llvm::Intrinsic::nvvm_wmma_m16n16k8_load_c_f32_row_stride;
if (layout == "col" && m == 16 && n == 16 && k == 8 && "f32" == eltype && frag == "c") return llvm::Intrinsic::nvvm_wmma_m16n16k8_load_c_f32_col_stride;
if (layout == "row" && m == 8 && n == 8 && k == 4 && "f64" == eltype && frag == "a") return llvm::Intrinsic::nvvm_wmma_m8n8k4_load_a_f64_row_stride;
if (layout == "col" && m == 8 && n == 8 && k == 4 && "f64" == eltype && frag == "a") return llvm::Intrinsic::nvvm_wmma_m8n8k4_load_a_f64_col_stride;
if (layout == "row" && m == 8 && n == 8 && k == 4 && "f64" == eltype && frag == "b") return llvm::Intrinsic::nvvm_wmma_m8n8k4_load_b_f64_row_stride;
if (layout == "col" && m == 8 && n == 8 && k == 4 && "f64" == eltype && frag == "b") return llvm::Intrinsic::nvvm_wmma_m8n8k4_load_b_f64_col_stride;
if (layout == "row" && m == 8 && n == 8 && k == 4 && "f64" == eltype && frag == "c") return llvm::Intrinsic::nvvm_wmma_m8n8k4_load_c_f64_row_stride;
if (layout == "col" && m == 8 && n == 8 && k == 4 && "f64" == eltype && frag == "c") return llvm::Intrinsic::nvvm_wmma_m8n8k4_load_c_f64_col_stride;
return 0;}
/// Helpers to find valid n dimension based on mxk load shape.
static int inferNDimension(int m, int k, mlir::NVVM::MMATypes eltypeEnum) { llvm::StringRef eltype = stringifyEnum(eltypeEnum);
if (m == 16 && k == 16 && "f16" == eltype) return 16;
if (m == 16 && k == 16 && "s8" == eltype) return 16;
if (m == 16 && k == 16 && "u8" == eltype) return 16;
if (m == 32 && k == 16 && "f16" == eltype) return 8;
if (m == 32 && k == 16 && "s8" == eltype) return 8;
if (m == 32 && k == 16 && "u8" == eltype) return 8;
if (m == 8 && k == 16 && "f16" == eltype) return 32;
if (m == 8 && k == 16 && "s8" == eltype) return 32;
if (m == 8 && k == 16 && "u8" == eltype) return 32;
if (m == 16 && k == 8 && "tf32" == eltype) return 16;
if (m == 8 && k == 4 && "f64" == eltype) return 8;
return 0;}
/// Helpers to find valid m dimension based on kxn load shape.
static int inferMDimension(int k, int n, mlir::NVVM::MMATypes eltypeEnum) { llvm::StringRef eltype = stringifyEnum(eltypeEnum);
if (n == 16 && k == 16 && "f16" == eltype) return 16;
if (n == 16 && k == 16 && "s8" == eltype) return 16;
if (n == 16 && k == 16 && "u8" == eltype) return 16;
if (n == 8 && k == 16 && "f16" == eltype) return 32;
if (n == 8 && k == 16 && "s8" == eltype) return 32;
if (n == 8 && k == 16 && "u8" == eltype) return 32;
if (n == 32 && k == 16 && "f16" == eltype) return 8;
if (n == 32 && k == 16 && "s8" == eltype) return 8;
if (n == 32 && k == 16 && "u8" == eltype) return 8;
if (n == 16 && k == 8 && "tf32" == eltype) return 16;
if (n == 8 && k == 4 && "f64" == eltype) return 8;
return 0;}
/// Helpers to find valid k dimension based on mxn load shape.
static int inferKDimension(int m, int n, mlir::NVVM::MMATypes eltypeEnum) { llvm::StringRef eltype = stringifyEnum(eltypeEnum);
if (m == 16 && n == 16 && "f16" == eltype) return 16;
if (m == 16 && n == 16 && "f32" == eltype) return 16;
if (m == 16 && n == 16 && "s32" == eltype) return 16;
if (m == 32 && n == 8 && "f16" == eltype) return 16;
if (m == 32 && n == 8 && "f32" == eltype) return 16;
if (m == 32 && n == 8 && "s32" == eltype) return 16;
if (m == 8 && n == 32 && "f16" == eltype) return 16;
if (m == 8 && n == 32 && "f32" == eltype) return 16;
if (m == 8 && n == 32 && "s32" == eltype) return 16;
if (m == 16 && n == 16 && "f32" == eltype) return 8;
if (m == 8 && n == 8 && "f64" == eltype) return 4;
return 0;}
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::WMMALoadOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::WMMALoadOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::WMMAMmaOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class WMMAMmaOpGenericAdaptorBase {
public:
struct Properties {
using eltypeATy = ::mlir::NVVM::MMATypesAttr;
eltypeATy eltypeA;
auto getEltypeA() const {
auto &propStorage = this->eltypeA;
return ::llvm::cast<::mlir::NVVM::MMATypesAttr>(propStorage);
}
void setEltypeA(const ::mlir::NVVM::MMATypesAttr &propValue) {
this->eltypeA = propValue;
}
using eltypeBTy = ::mlir::NVVM::MMATypesAttr;
eltypeBTy eltypeB;
auto getEltypeB() const {
auto &propStorage = this->eltypeB;
return ::llvm::cast<::mlir::NVVM::MMATypesAttr>(propStorage);
}
void setEltypeB(const ::mlir::NVVM::MMATypesAttr &propValue) {
this->eltypeB = propValue;
}
using kTy = ::mlir::IntegerAttr;
kTy k;
auto getK() const {
auto &propStorage = this->k;
return ::llvm::cast<::mlir::IntegerAttr>(propStorage);
}
void setK(const ::mlir::IntegerAttr &propValue) {
this->k = propValue;
}
using layoutATy = ::mlir::NVVM::MMALayoutAttr;
layoutATy layoutA;
auto getLayoutA() const {
auto &propStorage = this->layoutA;
return ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(propStorage);
}
void setLayoutA(const ::mlir::NVVM::MMALayoutAttr &propValue) {
this->layoutA = propValue;
}
using layoutBTy = ::mlir::NVVM::MMALayoutAttr;
layoutBTy layoutB;
auto getLayoutB() const {
auto &propStorage = this->layoutB;
return ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(propStorage);
}
void setLayoutB(const ::mlir::NVVM::MMALayoutAttr &propValue) {
this->layoutB = propValue;
}
using mTy = ::mlir::IntegerAttr;
mTy m;
auto getM() const {
auto &propStorage = this->m;
return ::llvm::cast<::mlir::IntegerAttr>(propStorage);
}
void setM(const ::mlir::IntegerAttr &propValue) {
this->m = propValue;
}
using nTy = ::mlir::IntegerAttr;
nTy n;
auto getN() const {
auto &propStorage = this->n;
return ::llvm::cast<::mlir::IntegerAttr>(propStorage);
}
void setN(const ::mlir::IntegerAttr &propValue) {
this->n = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.eltypeA == this->eltypeA &&
rhs.eltypeB == this->eltypeB &&
rhs.k == this->k &&
rhs.layoutA == this->layoutA &&
rhs.layoutB == this->layoutB &&
rhs.m == this->m &&
rhs.n == this->n &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
WMMAMmaOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.wmma.mma", odsAttrs.getContext());
}
WMMAMmaOpGenericAdaptorBase(WMMAMmaOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::IntegerAttr getMAttr() {
auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().m);
return attr;
}
uint32_t getM();
::mlir::IntegerAttr getNAttr() {
auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().n);
return attr;
}
uint32_t getN();
::mlir::IntegerAttr getKAttr() {
auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().k);
return attr;
}
uint32_t getK();
::mlir::NVVM::MMALayoutAttr getLayoutAAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(getProperties().layoutA);
return attr;
}
::mlir::NVVM::MMALayout getLayoutA();
::mlir::NVVM::MMALayoutAttr getLayoutBAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(getProperties().layoutB);
return attr;
}
::mlir::NVVM::MMALayout getLayoutB();
::mlir::NVVM::MMATypesAttr getEltypeAAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MMATypesAttr>(getProperties().eltypeA);
return attr;
}
::mlir::NVVM::MMATypes getEltypeA();
::mlir::NVVM::MMATypesAttr getEltypeBAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MMATypesAttr>(getProperties().eltypeB);
return attr;
}
::mlir::NVVM::MMATypes getEltypeB();
};
} // namespace detail
template <typename RangeT>
class WMMAMmaOpGenericAdaptor : public detail::WMMAMmaOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::WMMAMmaOpGenericAdaptorBase;
static constexpr int odsIndex_args = 0;
public:
WMMAMmaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
WMMAMmaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : WMMAMmaOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
WMMAMmaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : WMMAMmaOpGenericAdaptor(values, attrs, Properties{}, {}) {}
WMMAMmaOpGenericAdaptor(RangeT values, const WMMAMmaOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = WMMAMmaOp, typename = std::enable_if_t<std::is_same_v<LateInst, WMMAMmaOp>>>
WMMAMmaOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getArgs() {
return getODSOperands(0);
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class WMMAMmaOpAdaptor : public WMMAMmaOpGenericAdaptor<::mlir::ValueRange> {
public:
using WMMAMmaOpGenericAdaptor::WMMAMmaOpGenericAdaptor;
WMMAMmaOpAdaptor(WMMAMmaOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class WMMAMmaOp : public ::mlir::Op<WMMAMmaOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::VariadicOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = WMMAMmaOpAdaptor;
template <typename RangeT>
using GenericAdaptor = WMMAMmaOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_args = 0;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("eltypeA"), ::llvm::StringRef("eltypeB"), ::llvm::StringRef("k"), ::llvm::StringRef("layoutA"), ::llvm::StringRef("layoutB"), ::llvm::StringRef("m"), ::llvm::StringRef("n")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getEltypeAAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getEltypeAAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getEltypeBAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getEltypeBAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getKAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getKAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
::mlir::StringAttr getLayoutAAttrName() {
return getAttributeNameForIndex(3);
}
static ::mlir::StringAttr getLayoutAAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 3);
}
::mlir::StringAttr getLayoutBAttrName() {
return getAttributeNameForIndex(4);
}
static ::mlir::StringAttr getLayoutBAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 4);
}
::mlir::StringAttr getMAttrName() {
return getAttributeNameForIndex(5);
}
static ::mlir::StringAttr getMAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 5);
}
::mlir::StringAttr getNAttrName() {
return getAttributeNameForIndex(6);
}
static ::mlir::StringAttr getNAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 6);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.wmma.mma");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::Operation::operand_range getArgs() {
return getODSOperands(0);
}
::mlir::MutableOperandRange getArgsMutable();
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::IntegerAttr getMAttr() {
return ::llvm::cast<::mlir::IntegerAttr>(getProperties().m);
}
uint32_t getM();
::mlir::IntegerAttr getNAttr() {
return ::llvm::cast<::mlir::IntegerAttr>(getProperties().n);
}
uint32_t getN();
::mlir::IntegerAttr getKAttr() {
return ::llvm::cast<::mlir::IntegerAttr>(getProperties().k);
}
uint32_t getK();
::mlir::NVVM::MMALayoutAttr getLayoutAAttr() {
return ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(getProperties().layoutA);
}
::mlir::NVVM::MMALayout getLayoutA();
::mlir::NVVM::MMALayoutAttr getLayoutBAttr() {
return ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(getProperties().layoutB);
}
::mlir::NVVM::MMALayout getLayoutB();
::mlir::NVVM::MMATypesAttr getEltypeAAttr() {
return ::llvm::cast<::mlir::NVVM::MMATypesAttr>(getProperties().eltypeA);
}
::mlir::NVVM::MMATypes getEltypeA();
::mlir::NVVM::MMATypesAttr getEltypeBAttr() {
return ::llvm::cast<::mlir::NVVM::MMATypesAttr>(getProperties().eltypeB);
}
::mlir::NVVM::MMATypes getEltypeB();
void setMAttr(::mlir::IntegerAttr attr) {
getProperties().m = attr;
}
void setM(uint32_t attrValue);
void setNAttr(::mlir::IntegerAttr attr) {
getProperties().n = attr;
}
void setN(uint32_t attrValue);
void setKAttr(::mlir::IntegerAttr attr) {
getProperties().k = attr;
}
void setK(uint32_t attrValue);
void setLayoutAAttr(::mlir::NVVM::MMALayoutAttr attr) {
getProperties().layoutA = attr;
}
void setLayoutA(::mlir::NVVM::MMALayout attrValue);
void setLayoutBAttr(::mlir::NVVM::MMALayoutAttr attr) {
getProperties().layoutB = attr;
}
void setLayoutB(::mlir::NVVM::MMALayout attrValue);
void setEltypeAAttr(::mlir::NVVM::MMATypesAttr attr) {
getProperties().eltypeA = attr;
}
void setEltypeA(::mlir::NVVM::MMATypes attrValue);
void setEltypeBAttr(::mlir::NVVM::MMATypesAttr attr) {
getProperties().eltypeB = attr;
}
void setEltypeB(::mlir::NVVM::MMATypes attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::IntegerAttr m, ::mlir::IntegerAttr n, ::mlir::IntegerAttr k, ::mlir::NVVM::MMALayoutAttr layoutA, ::mlir::NVVM::MMALayoutAttr layoutB, ::mlir::NVVM::MMATypesAttr eltypeA, ::mlir::NVVM::MMATypesAttr eltypeB, ::mlir::ValueRange args);
static WMMAMmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::IntegerAttr m, ::mlir::IntegerAttr n, ::mlir::IntegerAttr k, ::mlir::NVVM::MMALayoutAttr layoutA, ::mlir::NVVM::MMALayoutAttr layoutB, ::mlir::NVVM::MMATypesAttr eltypeA, ::mlir::NVVM::MMATypesAttr eltypeB, ::mlir::ValueRange args);
static WMMAMmaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::IntegerAttr m, ::mlir::IntegerAttr n, ::mlir::IntegerAttr k, ::mlir::NVVM::MMALayoutAttr layoutA, ::mlir::NVVM::MMALayoutAttr layoutB, ::mlir::NVVM::MMATypesAttr eltypeA, ::mlir::NVVM::MMATypesAttr eltypeB, ::mlir::ValueRange args);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr m, ::mlir::IntegerAttr n, ::mlir::IntegerAttr k, ::mlir::NVVM::MMALayoutAttr layoutA, ::mlir::NVVM::MMALayoutAttr layoutB, ::mlir::NVVM::MMATypesAttr eltypeA, ::mlir::NVVM::MMATypesAttr eltypeB, ::mlir::ValueRange args);
static WMMAMmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr m, ::mlir::IntegerAttr n, ::mlir::IntegerAttr k, ::mlir::NVVM::MMALayoutAttr layoutA, ::mlir::NVVM::MMALayoutAttr layoutB, ::mlir::NVVM::MMATypesAttr eltypeA, ::mlir::NVVM::MMATypesAttr eltypeB, ::mlir::ValueRange args);
static WMMAMmaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr m, ::mlir::IntegerAttr n, ::mlir::IntegerAttr k, ::mlir::NVVM::MMALayoutAttr layoutA, ::mlir::NVVM::MMALayoutAttr layoutB, ::mlir::NVVM::MMATypesAttr eltypeA, ::mlir::NVVM::MMATypesAttr eltypeB, ::mlir::ValueRange args);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, uint32_t m, uint32_t n, uint32_t k, ::mlir::NVVM::MMALayout layoutA, ::mlir::NVVM::MMALayout layoutB, ::mlir::NVVM::MMATypes eltypeA, ::mlir::NVVM::MMATypes eltypeB, ::mlir::ValueRange args);
static WMMAMmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, uint32_t m, uint32_t n, uint32_t k, ::mlir::NVVM::MMALayout layoutA, ::mlir::NVVM::MMALayout layoutB, ::mlir::NVVM::MMATypes eltypeA, ::mlir::NVVM::MMATypes eltypeB, ::mlir::ValueRange args);
static WMMAMmaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, uint32_t m, uint32_t n, uint32_t k, ::mlir::NVVM::MMALayout layoutA, ::mlir::NVVM::MMALayout layoutB, ::mlir::NVVM::MMATypes eltypeA, ::mlir::NVVM::MMATypes eltypeB, ::mlir::ValueRange args);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t m, uint32_t n, uint32_t k, ::mlir::NVVM::MMALayout layoutA, ::mlir::NVVM::MMALayout layoutB, ::mlir::NVVM::MMATypes eltypeA, ::mlir::NVVM::MMATypes eltypeB, ::mlir::ValueRange args);
static WMMAMmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t m, uint32_t n, uint32_t k, ::mlir::NVVM::MMALayout layoutA, ::mlir::NVVM::MMALayout layoutB, ::mlir::NVVM::MMATypes eltypeA, ::mlir::NVVM::MMATypes eltypeB, ::mlir::ValueRange args);
static WMMAMmaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t m, uint32_t n, uint32_t k, ::mlir::NVVM::MMALayout layoutA, ::mlir::NVVM::MMALayout layoutB, ::mlir::NVVM::MMATypes eltypeA, ::mlir::NVVM::MMATypes eltypeB, ::mlir::ValueRange args);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WMMAMmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WMMAMmaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WMMAMmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WMMAMmaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 7 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static llvm::Intrinsic::ID getIntrinsicID(int m, int n, int k, mlir::NVVM::MMALayout layoutAEnum,mlir::NVVM::MMALayout layoutBEnum, mlir::NVVM::MMATypes eltypeAEnum,mlir::NVVM::MMATypes eltypeBEnum) {llvm::StringRef layoutA = stringifyEnum(layoutAEnum);llvm::StringRef layoutB = stringifyEnum(layoutBEnum);llvm::StringRef eltypeA = stringifyEnum(eltypeAEnum);llvm::StringRef eltypeB = stringifyEnum(eltypeBEnum);
if (layoutA == "row" && layoutB == "row" && m == 8 && n == 8 && k == 4 && "f64" == eltypeA && "f64" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m8n8k4_mma_row_row_f64;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 8 && k == 4 && "f64" == eltypeA && "f64" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m8n8k4_mma_row_col_f64;
if (layoutA == "col" && layoutB == "row" && m == 8 && n == 8 && k == 4 && "f64" == eltypeA && "f64" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m8n8k4_mma_col_row_f64;
if (layoutA == "col" && layoutB == "col" && m == 8 && n == 8 && k == 4 && "f64" == eltypeA && "f64" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m8n8k4_mma_col_col_f64;
if (layoutA == "row" && layoutB == "row" && m == 16 && n == 16 && k == 8 && "tf32" == eltypeA && "f32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m16n16k8_mma_row_row_tf32;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 16 && k == 8 && "tf32" == eltypeA && "f32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m16n16k8_mma_row_col_tf32;
if (layoutA == "col" && layoutB == "row" && m == 16 && n == 16 && k == 8 && "tf32" == eltypeA && "f32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m16n16k8_mma_col_row_tf32;
if (layoutA == "col" && layoutB == "col" && m == 16 && n == 16 && k == 8 && "tf32" == eltypeA && "f32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m16n16k8_mma_col_col_tf32;
if (layoutA == "row" && layoutB == "row" && m == 16 && n == 16 && k == 16 && "f16" == eltypeA && "f16" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m16n16k16_mma_row_row_f16_f16;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 16 && k == 16 && "f16" == eltypeA && "f16" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m16n16k16_mma_row_col_f16_f16;
if (layoutA == "col" && layoutB == "row" && m == 16 && n == 16 && k == 16 && "f16" == eltypeA && "f16" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m16n16k16_mma_col_row_f16_f16;
if (layoutA == "col" && layoutB == "col" && m == 16 && n == 16 && k == 16 && "f16" == eltypeA && "f16" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m16n16k16_mma_col_col_f16_f16;
if (layoutA == "row" && layoutB == "row" && m == 16 && n == 16 && k == 16 && "f16" == eltypeA && "f32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m16n16k16_mma_row_row_f32_f32;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 16 && k == 16 && "f16" == eltypeA && "f32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m16n16k16_mma_row_col_f32_f32;
if (layoutA == "col" && layoutB == "row" && m == 16 && n == 16 && k == 16 && "f16" == eltypeA && "f32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m16n16k16_mma_col_row_f32_f32;
if (layoutA == "col" && layoutB == "col" && m == 16 && n == 16 && k == 16 && "f16" == eltypeA && "f32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m16n16k16_mma_col_col_f32_f32;
if (layoutA == "row" && layoutB == "row" && m == 32 && n == 8 && k == 16 && "f16" == eltypeA && "f16" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m32n8k16_mma_row_row_f16_f16;
if (layoutA == "row" && layoutB == "col" && m == 32 && n == 8 && k == 16 && "f16" == eltypeA && "f16" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m32n8k16_mma_row_col_f16_f16;
if (layoutA == "col" && layoutB == "row" && m == 32 && n == 8 && k == 16 && "f16" == eltypeA && "f16" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m32n8k16_mma_col_row_f16_f16;
if (layoutA == "col" && layoutB == "col" && m == 32 && n == 8 && k == 16 && "f16" == eltypeA && "f16" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m32n8k16_mma_col_col_f16_f16;
if (layoutA == "row" && layoutB == "row" && m == 32 && n == 8 && k == 16 && "f16" == eltypeA && "f32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m32n8k16_mma_row_row_f32_f32;
if (layoutA == "row" && layoutB == "col" && m == 32 && n == 8 && k == 16 && "f16" == eltypeA && "f32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m32n8k16_mma_row_col_f32_f32;
if (layoutA == "col" && layoutB == "row" && m == 32 && n == 8 && k == 16 && "f16" == eltypeA && "f32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m32n8k16_mma_col_row_f32_f32;
if (layoutA == "col" && layoutB == "col" && m == 32 && n == 8 && k == 16 && "f16" == eltypeA && "f32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m32n8k16_mma_col_col_f32_f32;
if (layoutA == "row" && layoutB == "row" && m == 8 && n == 32 && k == 16 && "f16" == eltypeA && "f16" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m8n32k16_mma_row_row_f16_f16;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 32 && k == 16 && "f16" == eltypeA && "f16" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m8n32k16_mma_row_col_f16_f16;
if (layoutA == "col" && layoutB == "row" && m == 8 && n == 32 && k == 16 && "f16" == eltypeA && "f16" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m8n32k16_mma_col_row_f16_f16;
if (layoutA == "col" && layoutB == "col" && m == 8 && n == 32 && k == 16 && "f16" == eltypeA && "f16" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m8n32k16_mma_col_col_f16_f16;
if (layoutA == "row" && layoutB == "row" && m == 8 && n == 32 && k == 16 && "f16" == eltypeA && "f32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m8n32k16_mma_row_row_f32_f32;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 32 && k == 16 && "f16" == eltypeA && "f32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m8n32k16_mma_row_col_f32_f32;
if (layoutA == "col" && layoutB == "row" && m == 8 && n == 32 && k == 16 && "f16" == eltypeA && "f32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m8n32k16_mma_col_row_f32_f32;
if (layoutA == "col" && layoutB == "col" && m == 8 && n == 32 && k == 16 && "f16" == eltypeA && "f32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m8n32k16_mma_col_col_f32_f32;
if (layoutA == "row" && layoutB == "row" && m == 16 && n == 16 && k == 16 && "s8" == eltypeA && "s32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m16n16k16_mma_row_row_s8;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 16 && k == 16 && "s8" == eltypeA && "s32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m16n16k16_mma_row_col_s8;
if (layoutA == "col" && layoutB == "row" && m == 16 && n == 16 && k == 16 && "s8" == eltypeA && "s32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m16n16k16_mma_col_row_s8;
if (layoutA == "col" && layoutB == "col" && m == 16 && n == 16 && k == 16 && "s8" == eltypeA && "s32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m16n16k16_mma_col_col_s8;
if (layoutA == "row" && layoutB == "row" && m == 16 && n == 16 && k == 16 && "u8" == eltypeA && "s32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m16n16k16_mma_row_row_u8;
if (layoutA == "row" && layoutB == "col" && m == 16 && n == 16 && k == 16 && "u8" == eltypeA && "s32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m16n16k16_mma_row_col_u8;
if (layoutA == "col" && layoutB == "row" && m == 16 && n == 16 && k == 16 && "u8" == eltypeA && "s32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m16n16k16_mma_col_row_u8;
if (layoutA == "col" && layoutB == "col" && m == 16 && n == 16 && k == 16 && "u8" == eltypeA && "s32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m16n16k16_mma_col_col_u8;
if (layoutA == "row" && layoutB == "row" && m == 32 && n == 8 && k == 16 && "s8" == eltypeA && "s32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m32n8k16_mma_row_row_s8;
if (layoutA == "row" && layoutB == "col" && m == 32 && n == 8 && k == 16 && "s8" == eltypeA && "s32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m32n8k16_mma_row_col_s8;
if (layoutA == "col" && layoutB == "row" && m == 32 && n == 8 && k == 16 && "s8" == eltypeA && "s32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m32n8k16_mma_col_row_s8;
if (layoutA == "col" && layoutB == "col" && m == 32 && n == 8 && k == 16 && "s8" == eltypeA && "s32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m32n8k16_mma_col_col_s8;
if (layoutA == "row" && layoutB == "row" && m == 32 && n == 8 && k == 16 && "u8" == eltypeA && "s32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m32n8k16_mma_row_row_u8;
if (layoutA == "row" && layoutB == "col" && m == 32 && n == 8 && k == 16 && "u8" == eltypeA && "s32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m32n8k16_mma_row_col_u8;
if (layoutA == "col" && layoutB == "row" && m == 32 && n == 8 && k == 16 && "u8" == eltypeA && "s32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m32n8k16_mma_col_row_u8;
if (layoutA == "col" && layoutB == "col" && m == 32 && n == 8 && k == 16 && "u8" == eltypeA && "s32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m32n8k16_mma_col_col_u8;
if (layoutA == "row" && layoutB == "row" && m == 8 && n == 32 && k == 16 && "s8" == eltypeA && "s32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m8n32k16_mma_row_row_s8;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 32 && k == 16 && "s8" == eltypeA && "s32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m8n32k16_mma_row_col_s8;
if (layoutA == "col" && layoutB == "row" && m == 8 && n == 32 && k == 16 && "s8" == eltypeA && "s32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m8n32k16_mma_col_row_s8;
if (layoutA == "col" && layoutB == "col" && m == 8 && n == 32 && k == 16 && "s8" == eltypeA && "s32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m8n32k16_mma_col_col_s8;
if (layoutA == "row" && layoutB == "row" && m == 8 && n == 32 && k == 16 && "u8" == eltypeA && "s32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m8n32k16_mma_row_row_u8;
if (layoutA == "row" && layoutB == "col" && m == 8 && n == 32 && k == 16 && "u8" == eltypeA && "s32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m8n32k16_mma_row_col_u8;
if (layoutA == "col" && layoutB == "row" && m == 8 && n == 32 && k == 16 && "u8" == eltypeA && "s32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m8n32k16_mma_col_row_u8;
if (layoutA == "col" && layoutB == "col" && m == 8 && n == 32 && k == 16 && "u8" == eltypeA && "s32" == eltypeB) return llvm::Intrinsic::nvvm_wmma_m8n32k16_mma_col_col_u8;
return 0;}};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::WMMAMmaOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::WMMAMmaOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::WMMAStoreOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class WMMAStoreOpGenericAdaptorBase {
public:
struct Properties {
using eltypeTy = ::mlir::NVVM::MMATypesAttr;
eltypeTy eltype;
auto getEltype() const {
auto &propStorage = this->eltype;
return ::llvm::cast<::mlir::NVVM::MMATypesAttr>(propStorage);
}
void setEltype(const ::mlir::NVVM::MMATypesAttr &propValue) {
this->eltype = propValue;
}
using kTy = ::mlir::IntegerAttr;
kTy k;
auto getK() const {
auto &propStorage = this->k;
return ::llvm::cast<::mlir::IntegerAttr>(propStorage);
}
void setK(const ::mlir::IntegerAttr &propValue) {
this->k = propValue;
}
using layoutTy = ::mlir::NVVM::MMALayoutAttr;
layoutTy layout;
auto getLayout() const {
auto &propStorage = this->layout;
return ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(propStorage);
}
void setLayout(const ::mlir::NVVM::MMALayoutAttr &propValue) {
this->layout = propValue;
}
using mTy = ::mlir::IntegerAttr;
mTy m;
auto getM() const {
auto &propStorage = this->m;
return ::llvm::cast<::mlir::IntegerAttr>(propStorage);
}
void setM(const ::mlir::IntegerAttr &propValue) {
this->m = propValue;
}
using nTy = ::mlir::IntegerAttr;
nTy n;
auto getN() const {
auto &propStorage = this->n;
return ::llvm::cast<::mlir::IntegerAttr>(propStorage);
}
void setN(const ::mlir::IntegerAttr &propValue) {
this->n = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.eltype == this->eltype &&
rhs.k == this->k &&
rhs.layout == this->layout &&
rhs.m == this->m &&
rhs.n == this->n &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
WMMAStoreOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.wmma.store", odsAttrs.getContext());
}
WMMAStoreOpGenericAdaptorBase(WMMAStoreOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::IntegerAttr getMAttr() {
auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().m);
return attr;
}
uint32_t getM();
::mlir::IntegerAttr getNAttr() {
auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().n);
return attr;
}
uint32_t getN();
::mlir::IntegerAttr getKAttr() {
auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().k);
return attr;
}
uint32_t getK();
::mlir::NVVM::MMALayoutAttr getLayoutAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(getProperties().layout);
return attr;
}
::mlir::NVVM::MMALayout getLayout();
::mlir::NVVM::MMATypesAttr getEltypeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MMATypesAttr>(getProperties().eltype);
return attr;
}
::mlir::NVVM::MMATypes getEltype();
};
} // namespace detail
template <typename RangeT>
class WMMAStoreOpGenericAdaptor : public detail::WMMAStoreOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::WMMAStoreOpGenericAdaptorBase;
static constexpr int odsIndex_ptr = 0;
static constexpr int odsIndex_args = 1;
static constexpr int odsIndex_stride = 2;
public:
WMMAStoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
WMMAStoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : WMMAStoreOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
WMMAStoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : WMMAStoreOpGenericAdaptor(values, attrs, Properties{}, {}) {}
WMMAStoreOpGenericAdaptor(RangeT values, const WMMAStoreOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = WMMAStoreOp, typename = std::enable_if_t<std::is_same_v<LateInst, WMMAStoreOp>>>
WMMAStoreOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getPtr() {
return (*getODSOperands(0).begin());
}
RangeT getArgs() {
return getODSOperands(1);
}
ValueT getStride() {
return (*getODSOperands(2).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class WMMAStoreOpAdaptor : public WMMAStoreOpGenericAdaptor<::mlir::ValueRange> {
public:
using WMMAStoreOpGenericAdaptor::WMMAStoreOpGenericAdaptor;
WMMAStoreOpAdaptor(WMMAStoreOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class WMMAStoreOp : public ::mlir::Op<WMMAStoreOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = WMMAStoreOpAdaptor;
template <typename RangeT>
using GenericAdaptor = WMMAStoreOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_ptr = 0;
static constexpr int odsIndex_args = 1;
static constexpr int odsIndex_stride = 2;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("eltype"), ::llvm::StringRef("k"), ::llvm::StringRef("layout"), ::llvm::StringRef("m"), ::llvm::StringRef("n")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getEltypeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getEltypeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getKAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getKAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getLayoutAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getLayoutAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
::mlir::StringAttr getMAttrName() {
return getAttributeNameForIndex(3);
}
static ::mlir::StringAttr getMAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 3);
}
::mlir::StringAttr getNAttrName() {
return getAttributeNameForIndex(4);
}
static ::mlir::StringAttr getNAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 4);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.wmma.store");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getPtr() {
return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin());
}
::mlir::Operation::operand_range getArgs() {
return getODSOperands(1);
}
::mlir::TypedValue<::mlir::IntegerType> getStride() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin());
}
::mlir::OpOperand &getPtrMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::MutableOperandRange getArgsMutable();
::mlir::OpOperand &getStrideMutable() {
auto range = getODSOperandIndexAndLength(2);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::IntegerAttr getMAttr() {
return ::llvm::cast<::mlir::IntegerAttr>(getProperties().m);
}
uint32_t getM();
::mlir::IntegerAttr getNAttr() {
return ::llvm::cast<::mlir::IntegerAttr>(getProperties().n);
}
uint32_t getN();
::mlir::IntegerAttr getKAttr() {
return ::llvm::cast<::mlir::IntegerAttr>(getProperties().k);
}
uint32_t getK();
::mlir::NVVM::MMALayoutAttr getLayoutAttr() {
return ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(getProperties().layout);
}
::mlir::NVVM::MMALayout getLayout();
::mlir::NVVM::MMATypesAttr getEltypeAttr() {
return ::llvm::cast<::mlir::NVVM::MMATypesAttr>(getProperties().eltype);
}
::mlir::NVVM::MMATypes getEltype();
void setMAttr(::mlir::IntegerAttr attr) {
getProperties().m = attr;
}
void setM(uint32_t attrValue);
void setNAttr(::mlir::IntegerAttr attr) {
getProperties().n = attr;
}
void setN(uint32_t attrValue);
void setKAttr(::mlir::IntegerAttr attr) {
getProperties().k = attr;
}
void setK(uint32_t attrValue);
void setLayoutAttr(::mlir::NVVM::MMALayoutAttr attr) {
getProperties().layout = attr;
}
void setLayout(::mlir::NVVM::MMALayout attrValue);
void setEltypeAttr(::mlir::NVVM::MMATypesAttr attr) {
getProperties().eltype = attr;
}
void setEltype(::mlir::NVVM::MMATypes attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value ptr, ::mlir::IntegerAttr m, ::mlir::IntegerAttr n, ::mlir::IntegerAttr k, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::MMATypesAttr eltype, ::mlir::ValueRange args, ::mlir::Value stride);
static WMMAStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value ptr, ::mlir::IntegerAttr m, ::mlir::IntegerAttr n, ::mlir::IntegerAttr k, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::MMATypesAttr eltype, ::mlir::ValueRange args, ::mlir::Value stride);
static WMMAStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value ptr, ::mlir::IntegerAttr m, ::mlir::IntegerAttr n, ::mlir::IntegerAttr k, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::MMATypesAttr eltype, ::mlir::ValueRange args, ::mlir::Value stride);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::IntegerAttr m, ::mlir::IntegerAttr n, ::mlir::IntegerAttr k, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::MMATypesAttr eltype, ::mlir::ValueRange args, ::mlir::Value stride);
static WMMAStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::IntegerAttr m, ::mlir::IntegerAttr n, ::mlir::IntegerAttr k, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::MMATypesAttr eltype, ::mlir::ValueRange args, ::mlir::Value stride);
static WMMAStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::IntegerAttr m, ::mlir::IntegerAttr n, ::mlir::IntegerAttr k, ::mlir::NVVM::MMALayoutAttr layout, ::mlir::NVVM::MMATypesAttr eltype, ::mlir::ValueRange args, ::mlir::Value stride);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value ptr, uint32_t m, uint32_t n, uint32_t k, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::MMATypes eltype, ::mlir::ValueRange args, ::mlir::Value stride);
static WMMAStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value ptr, uint32_t m, uint32_t n, uint32_t k, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::MMATypes eltype, ::mlir::ValueRange args, ::mlir::Value stride);
static WMMAStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value ptr, uint32_t m, uint32_t n, uint32_t k, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::MMATypes eltype, ::mlir::ValueRange args, ::mlir::Value stride);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, uint32_t m, uint32_t n, uint32_t k, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::MMATypes eltype, ::mlir::ValueRange args, ::mlir::Value stride);
static WMMAStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, uint32_t m, uint32_t n, uint32_t k, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::MMATypes eltype, ::mlir::ValueRange args, ::mlir::Value stride);
static WMMAStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, uint32_t m, uint32_t n, uint32_t k, ::mlir::NVVM::MMALayout layout, ::mlir::NVVM::MMATypes eltype, ::mlir::ValueRange args, ::mlir::Value stride);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WMMAStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WMMAStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WMMAStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WMMAStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 5 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
static llvm::Intrinsic::ID getIntrinsicID(int m, int n, int k, mlir::NVVM::MMALayout layoutEnum,mlir::NVVM::MMATypes eltypeEnum) { llvm::StringRef layout = stringifyEnum(layoutEnum); llvm::StringRef eltype = stringifyEnum(eltypeEnum);
if (layout == "row" && m == 16 && n == 16 && k == 16 && "f16" == eltype) return llvm::Intrinsic::nvvm_wmma_m16n16k16_store_d_f16_row_stride;
if (layout == "col" && m == 16 && n == 16 && k == 16 && "f16" == eltype) return llvm::Intrinsic::nvvm_wmma_m16n16k16_store_d_f16_col_stride;
if (layout == "row" && m == 16 && n == 16 && k == 16 && "f32" == eltype) return llvm::Intrinsic::nvvm_wmma_m16n16k16_store_d_f32_row_stride;
if (layout == "col" && m == 16 && n == 16 && k == 16 && "f32" == eltype) return llvm::Intrinsic::nvvm_wmma_m16n16k16_store_d_f32_col_stride;
if (layout == "row" && m == 16 && n == 16 && k == 16 && "s32" == eltype) return llvm::Intrinsic::nvvm_wmma_m16n16k16_store_d_s32_row_stride;
if (layout == "col" && m == 16 && n == 16 && k == 16 && "s32" == eltype) return llvm::Intrinsic::nvvm_wmma_m16n16k16_store_d_s32_col_stride;
if (layout == "row" && m == 32 && n == 8 && k == 16 && "f16" == eltype) return llvm::Intrinsic::nvvm_wmma_m32n8k16_store_d_f16_row_stride;
if (layout == "col" && m == 32 && n == 8 && k == 16 && "f16" == eltype) return llvm::Intrinsic::nvvm_wmma_m32n8k16_store_d_f16_col_stride;
if (layout == "row" && m == 32 && n == 8 && k == 16 && "f32" == eltype) return llvm::Intrinsic::nvvm_wmma_m32n8k16_store_d_f32_row_stride;
if (layout == "col" && m == 32 && n == 8 && k == 16 && "f32" == eltype) return llvm::Intrinsic::nvvm_wmma_m32n8k16_store_d_f32_col_stride;
if (layout == "row" && m == 32 && n == 8 && k == 16 && "s32" == eltype) return llvm::Intrinsic::nvvm_wmma_m32n8k16_store_d_s32_row_stride;
if (layout == "col" && m == 32 && n == 8 && k == 16 && "s32" == eltype) return llvm::Intrinsic::nvvm_wmma_m32n8k16_store_d_s32_col_stride;
if (layout == "row" && m == 8 && n == 32 && k == 16 && "f16" == eltype) return llvm::Intrinsic::nvvm_wmma_m8n32k16_store_d_f16_row_stride;
if (layout == "col" && m == 8 && n == 32 && k == 16 && "f16" == eltype) return llvm::Intrinsic::nvvm_wmma_m8n32k16_store_d_f16_col_stride;
if (layout == "row" && m == 8 && n == 32 && k == 16 && "f32" == eltype) return llvm::Intrinsic::nvvm_wmma_m8n32k16_store_d_f32_row_stride;
if (layout == "col" && m == 8 && n == 32 && k == 16 && "f32" == eltype) return llvm::Intrinsic::nvvm_wmma_m8n32k16_store_d_f32_col_stride;
if (layout == "row" && m == 8 && n == 32 && k == 16 && "s32" == eltype) return llvm::Intrinsic::nvvm_wmma_m8n32k16_store_d_s32_row_stride;
if (layout == "col" && m == 8 && n == 32 && k == 16 && "s32" == eltype) return llvm::Intrinsic::nvvm_wmma_m8n32k16_store_d_s32_col_stride;
if (layout == "row" && m == 16 && n == 16 && k == 8 && "f32" == eltype) return llvm::Intrinsic::nvvm_wmma_m16n16k8_store_d_f32_row_stride;
if (layout == "col" && m == 16 && n == 16 && k == 8 && "f32" == eltype) return llvm::Intrinsic::nvvm_wmma_m16n16k8_store_d_f32_col_stride;
if (layout == "row" && m == 8 && n == 8 && k == 4 && "f64" == eltype) return llvm::Intrinsic::nvvm_wmma_m8n8k4_store_d_f64_row_stride;
if (layout == "col" && m == 8 && n == 8 && k == 4 && "f64" == eltype) return llvm::Intrinsic::nvvm_wmma_m8n8k4_store_d_f64_col_stride;
return 0;}
/// Helpers to find valid k dimension based on mxn store shape.
static int inferKDimension(int m, int n, mlir::NVVM::MMATypes eltypeEnum) { llvm::StringRef eltype = stringifyEnum(eltypeEnum);
if (m == 16 && n == 16 && "f16" == eltype) return 16;
if (m == 16 && n == 16 && "f32" == eltype) return 16;
if (m == 16 && n == 16 && "s32" == eltype) return 16;
if (m == 32 && n == 8 && "f16" == eltype) return 16;
if (m == 32 && n == 8 && "f32" == eltype) return 16;
if (m == 32 && n == 8 && "s32" == eltype) return 16;
if (m == 8 && n == 32 && "f16" == eltype) return 16;
if (m == 8 && n == 32 && "f32" == eltype) return 16;
if (m == 8 && n == 32 && "s32" == eltype) return 16;
if (m == 16 && n == 16 && "f32" == eltype) return 8;
if (m == 8 && n == 8 && "f64" == eltype) return 4;
return 0;}};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::WMMAStoreOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::WMMAStoreOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::WarpDimOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class WarpDimOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
WarpDimOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.nwarpid", odsAttrs.getContext());
}
WarpDimOpGenericAdaptorBase(WarpDimOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class WarpDimOpGenericAdaptor : public detail::WarpDimOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::WarpDimOpGenericAdaptorBase;
public:
WarpDimOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
WarpDimOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : WarpDimOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
WarpDimOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : WarpDimOpGenericAdaptor(values, attrs, Properties{}, {}) {}
WarpDimOpGenericAdaptor(RangeT values, const WarpDimOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = WarpDimOp, typename = std::enable_if_t<std::is_same_v<LateInst, WarpDimOp>>>
WarpDimOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class WarpDimOpAdaptor : public WarpDimOpGenericAdaptor<::mlir::ValueRange> {
public:
using WarpDimOpGenericAdaptor::WarpDimOpGenericAdaptor;
WarpDimOpAdaptor(WarpDimOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class WarpDimOp : public ::mlir::Op<WarpDimOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = WarpDimOpAdaptor;
template <typename RangeT>
using GenericAdaptor = WarpDimOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<WarpDimOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.nwarpid");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static WarpDimOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static WarpDimOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static WarpDimOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static WarpDimOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static WarpDimOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static WarpDimOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static WarpDimOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static WarpDimOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WarpDimOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WarpDimOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WarpDimOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WarpDimOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WarpDimOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WarpDimOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WarpDimOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WarpDimOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::WarpDimOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::WarpDimOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::WarpIdOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class WarpIdOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
WarpIdOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.warpid", odsAttrs.getContext());
}
WarpIdOpGenericAdaptorBase(WarpIdOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class WarpIdOpGenericAdaptor : public detail::WarpIdOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::WarpIdOpGenericAdaptorBase;
public:
WarpIdOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
WarpIdOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : WarpIdOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
WarpIdOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : WarpIdOpGenericAdaptor(values, attrs, Properties{}, {}) {}
WarpIdOpGenericAdaptor(RangeT values, const WarpIdOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = WarpIdOp, typename = std::enable_if_t<std::is_same_v<LateInst, WarpIdOp>>>
WarpIdOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class WarpIdOpAdaptor : public WarpIdOpGenericAdaptor<::mlir::ValueRange> {
public:
using WarpIdOpGenericAdaptor::WarpIdOpGenericAdaptor;
WarpIdOpAdaptor(WarpIdOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class WarpIdOp : public ::mlir::Op<WarpIdOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = WarpIdOpAdaptor;
template <typename RangeT>
using GenericAdaptor = WarpIdOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<WarpIdOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.warpid");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static WarpIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static WarpIdOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static WarpIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static WarpIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static WarpIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static WarpIdOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static WarpIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static WarpIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WarpIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WarpIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WarpIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WarpIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WarpIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WarpIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WarpIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WarpIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::WarpIdOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::WarpIdOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::WarpSizeOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class WarpSizeOpGenericAdaptorBase {
public:
struct Properties {
using rangeTy = ::mlir::LLVM::ConstantRangeAttr;
rangeTy range;
auto getRange() const {
auto &propStorage = this->range;
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(propStorage);
}
void setRange(const ::mlir::LLVM::ConstantRangeAttr &propValue) {
this->range = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.range == this->range &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
WarpSizeOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.read.ptx.sreg.warpsize", odsAttrs.getContext());
}
WarpSizeOpGenericAdaptorBase(WarpSizeOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
return attr;
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
};
} // namespace detail
template <typename RangeT>
class WarpSizeOpGenericAdaptor : public detail::WarpSizeOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::WarpSizeOpGenericAdaptorBase;
public:
WarpSizeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
WarpSizeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : WarpSizeOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
WarpSizeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : WarpSizeOpGenericAdaptor(values, attrs, Properties{}, {}) {}
WarpSizeOpGenericAdaptor(RangeT values, const WarpSizeOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = WarpSizeOp, typename = std::enable_if_t<std::is_same_v<LateInst, WarpSizeOp>>>
WarpSizeOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class WarpSizeOpAdaptor : public WarpSizeOpGenericAdaptor<::mlir::ValueRange> {
public:
using WarpSizeOpGenericAdaptor::WarpSizeOpGenericAdaptor;
WarpSizeOpAdaptor(WarpSizeOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class WarpSizeOp : public ::mlir::Op<WarpSizeOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IntegerType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::InferIntRangeInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = WarpSizeOpAdaptor;
template <typename RangeT>
using GenericAdaptor = WarpSizeOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
using ::mlir::InferIntRangeInterface::Trait<WarpSizeOp>::inferResultRangesFromOptional;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("range")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getRangeAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getRangeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.read.ptx.sreg.warpsize");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::IntegerType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::LLVM::ConstantRangeAttr getRangeAttr() {
return ::llvm::dyn_cast_or_null<::mlir::LLVM::ConstantRangeAttr>(getProperties().range);
}
::std::optional<::mlir::LLVM::ConstantRangeAttr> getRange();
void setRangeAttr(::mlir::LLVM::ConstantRangeAttr attr) {
getProperties().range = attr;
}
::mlir::Attribute removeRangeAttr() {
auto attr = getProperties().range;
getProperties().range = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType);
static WarpSizeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType);
static WarpSizeOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static WarpSizeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static WarpSizeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static WarpSizeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static WarpSizeOp create(::mlir::ImplicitLocOpBuilder &builder, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static WarpSizeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static WarpSizeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WarpSizeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WarpSizeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WarpSizeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WarpSizeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WarpSizeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WarpSizeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WarpSizeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WarpSizeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
void inferResultRanges(::llvm::ArrayRef<::mlir::ConstantIntRanges> argRanges, ::mlir::SetIntRangeFn setResultRanges);
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::WarpSizeOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::WarpSizeOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::WgmmaFenceAlignedOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class WgmmaFenceAlignedOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
WgmmaFenceAlignedOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.wgmma.fence.aligned", odsAttrs.getContext());
}
WgmmaFenceAlignedOpGenericAdaptorBase(WgmmaFenceAlignedOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class WgmmaFenceAlignedOpGenericAdaptor : public detail::WgmmaFenceAlignedOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::WgmmaFenceAlignedOpGenericAdaptorBase;
public:
WgmmaFenceAlignedOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
WgmmaFenceAlignedOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : WgmmaFenceAlignedOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
WgmmaFenceAlignedOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : WgmmaFenceAlignedOpGenericAdaptor(values, attrs, Properties{}, {}) {}
WgmmaFenceAlignedOpGenericAdaptor(RangeT values, const WgmmaFenceAlignedOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = WgmmaFenceAlignedOp, typename = std::enable_if_t<std::is_same_v<LateInst, WgmmaFenceAlignedOp>>>
WgmmaFenceAlignedOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class WgmmaFenceAlignedOpAdaptor : public WgmmaFenceAlignedOpGenericAdaptor<::mlir::ValueRange> {
public:
using WgmmaFenceAlignedOpGenericAdaptor::WgmmaFenceAlignedOpGenericAdaptor;
WgmmaFenceAlignedOpAdaptor(WgmmaFenceAlignedOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class WgmmaFenceAlignedOp : public ::mlir::Op<WgmmaFenceAlignedOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::OpTrait::NVVMRequiresSM<903>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = WgmmaFenceAlignedOpAdaptor;
template <typename RangeT>
using GenericAdaptor = WgmmaFenceAlignedOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.wgmma.fence.aligned");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static WgmmaFenceAlignedOp create(::mlir::OpBuilder &builder, ::mlir::Location location);
static WgmmaFenceAlignedOp create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static WgmmaFenceAlignedOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static WgmmaFenceAlignedOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WgmmaFenceAlignedOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WgmmaFenceAlignedOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WgmmaFenceAlignedOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WgmmaFenceAlignedOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::WgmmaFenceAlignedOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::WgmmaGroupSyncAlignedOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class WgmmaGroupSyncAlignedOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
WgmmaGroupSyncAlignedOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.wgmma.commit.group.sync.aligned", odsAttrs.getContext());
}
WgmmaGroupSyncAlignedOpGenericAdaptorBase(WgmmaGroupSyncAlignedOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class WgmmaGroupSyncAlignedOpGenericAdaptor : public detail::WgmmaGroupSyncAlignedOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::WgmmaGroupSyncAlignedOpGenericAdaptorBase;
public:
WgmmaGroupSyncAlignedOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
WgmmaGroupSyncAlignedOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : WgmmaGroupSyncAlignedOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
WgmmaGroupSyncAlignedOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : WgmmaGroupSyncAlignedOpGenericAdaptor(values, attrs, Properties{}, {}) {}
WgmmaGroupSyncAlignedOpGenericAdaptor(RangeT values, const WgmmaGroupSyncAlignedOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = WgmmaGroupSyncAlignedOp, typename = std::enable_if_t<std::is_same_v<LateInst, WgmmaGroupSyncAlignedOp>>>
WgmmaGroupSyncAlignedOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class WgmmaGroupSyncAlignedOpAdaptor : public WgmmaGroupSyncAlignedOpGenericAdaptor<::mlir::ValueRange> {
public:
using WgmmaGroupSyncAlignedOpGenericAdaptor::WgmmaGroupSyncAlignedOpGenericAdaptor;
WgmmaGroupSyncAlignedOpAdaptor(WgmmaGroupSyncAlignedOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class WgmmaGroupSyncAlignedOp : public ::mlir::Op<WgmmaGroupSyncAlignedOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::OpTrait::NVVMRequiresSM<903>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = WgmmaGroupSyncAlignedOpAdaptor;
template <typename RangeT>
using GenericAdaptor = WgmmaGroupSyncAlignedOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.wgmma.commit.group.sync.aligned");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
static WgmmaGroupSyncAlignedOp create(::mlir::OpBuilder &builder, ::mlir::Location location);
static WgmmaGroupSyncAlignedOp create(::mlir::ImplicitLocOpBuilder &builder);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
static WgmmaGroupSyncAlignedOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
static WgmmaGroupSyncAlignedOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WgmmaGroupSyncAlignedOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WgmmaGroupSyncAlignedOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WgmmaGroupSyncAlignedOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WgmmaGroupSyncAlignedOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::WgmmaGroupSyncAlignedOp)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::WgmmaMmaAsyncOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class WgmmaMmaAsyncOpGenericAdaptorBase {
public:
struct Properties {
using layoutATy = ::mlir::NVVM::MMALayoutAttr;
layoutATy layoutA;
auto getLayoutA() const {
auto &propStorage = this->layoutA;
return ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(propStorage);
}
void setLayoutA(const ::mlir::NVVM::MMALayoutAttr &propValue) {
this->layoutA = propValue;
}
using layoutBTy = ::mlir::NVVM::MMALayoutAttr;
layoutBTy layoutB;
auto getLayoutB() const {
auto &propStorage = this->layoutB;
return ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(propStorage);
}
void setLayoutB(const ::mlir::NVVM::MMALayoutAttr &propValue) {
this->layoutB = propValue;
}
using satfiniteTy = ::mlir::NVVM::MMAIntOverflowAttr;
satfiniteTy satfinite;
auto getSatfinite() const {
auto &propStorage = this->satfinite;
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMAIntOverflowAttr>(propStorage);
}
void setSatfinite(const ::mlir::NVVM::MMAIntOverflowAttr &propValue) {
this->satfinite = propValue;
}
using scaleATy = ::mlir::NVVM::WGMMAScaleInAttr;
scaleATy scaleA;
auto getScaleA() const {
auto &propStorage = this->scaleA;
return ::llvm::cast<::mlir::NVVM::WGMMAScaleInAttr>(propStorage);
}
void setScaleA(const ::mlir::NVVM::WGMMAScaleInAttr &propValue) {
this->scaleA = propValue;
}
using scaleBTy = ::mlir::NVVM::WGMMAScaleInAttr;
scaleBTy scaleB;
auto getScaleB() const {
auto &propStorage = this->scaleB;
return ::llvm::cast<::mlir::NVVM::WGMMAScaleInAttr>(propStorage);
}
void setScaleB(const ::mlir::NVVM::WGMMAScaleInAttr &propValue) {
this->scaleB = propValue;
}
using scaleDTy = ::mlir::NVVM::WGMMAScaleOutAttr;
scaleDTy scaleD;
auto getScaleD() const {
auto &propStorage = this->scaleD;
return ::llvm::cast<::mlir::NVVM::WGMMAScaleOutAttr>(propStorage);
}
void setScaleD(const ::mlir::NVVM::WGMMAScaleOutAttr &propValue) {
this->scaleD = propValue;
}
using shapeTy = ::mlir::NVVM::MMAShapeAttr;
shapeTy shape;
auto getShape() const {
auto &propStorage = this->shape;
return ::llvm::cast<::mlir::NVVM::MMAShapeAttr>(propStorage);
}
void setShape(const ::mlir::NVVM::MMAShapeAttr &propValue) {
this->shape = propValue;
}
using typeATy = ::mlir::NVVM::WGMMATypesAttr;
typeATy typeA;
auto getTypeA() const {
auto &propStorage = this->typeA;
return ::llvm::cast<::mlir::NVVM::WGMMATypesAttr>(propStorage);
}
void setTypeA(const ::mlir::NVVM::WGMMATypesAttr &propValue) {
this->typeA = propValue;
}
using typeBTy = ::mlir::NVVM::WGMMATypesAttr;
typeBTy typeB;
auto getTypeB() const {
auto &propStorage = this->typeB;
return ::llvm::cast<::mlir::NVVM::WGMMATypesAttr>(propStorage);
}
void setTypeB(const ::mlir::NVVM::WGMMATypesAttr &propValue) {
this->typeB = propValue;
}
using typeDTy = ::mlir::NVVM::WGMMATypesAttr;
typeDTy typeD;
auto getTypeD() const {
auto &propStorage = this->typeD;
return ::llvm::cast<::mlir::NVVM::WGMMATypesAttr>(propStorage);
}
void setTypeD(const ::mlir::NVVM::WGMMATypesAttr &propValue) {
this->typeD = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.layoutA == this->layoutA &&
rhs.layoutB == this->layoutB &&
rhs.satfinite == this->satfinite &&
rhs.scaleA == this->scaleA &&
rhs.scaleB == this->scaleB &&
rhs.scaleD == this->scaleD &&
rhs.shape == this->shape &&
rhs.typeA == this->typeA &&
rhs.typeB == this->typeB &&
rhs.typeD == this->typeD &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
WgmmaMmaAsyncOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.wgmma.mma_async", odsAttrs.getContext());
}
WgmmaMmaAsyncOpGenericAdaptorBase(WgmmaMmaAsyncOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::NVVM::MMAShapeAttr getShapeAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MMAShapeAttr>(getProperties().shape);
return attr;
}
::mlir::NVVM::MMAShapeAttr getShape();
::mlir::NVVM::WGMMATypesAttr getTypeAAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::WGMMATypesAttr>(getProperties().typeA);
return attr;
}
::mlir::NVVM::WGMMATypes getTypeA();
::mlir::NVVM::WGMMATypesAttr getTypeBAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::WGMMATypesAttr>(getProperties().typeB);
return attr;
}
::mlir::NVVM::WGMMATypes getTypeB();
::mlir::NVVM::WGMMATypesAttr getTypeDAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::WGMMATypesAttr>(getProperties().typeD);
return attr;
}
::mlir::NVVM::WGMMATypes getTypeD();
::mlir::NVVM::WGMMAScaleOutAttr getScaleDAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::WGMMAScaleOutAttr>(getProperties().scaleD);
return attr;
}
::mlir::NVVM::WGMMAScaleOut getScaleD();
::mlir::NVVM::WGMMAScaleInAttr getScaleAAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::WGMMAScaleInAttr>(getProperties().scaleA);
return attr;
}
::mlir::NVVM::WGMMAScaleIn getScaleA();
::mlir::NVVM::WGMMAScaleInAttr getScaleBAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::WGMMAScaleInAttr>(getProperties().scaleB);
return attr;
}
::mlir::NVVM::WGMMAScaleIn getScaleB();
::mlir::NVVM::MMALayoutAttr getLayoutAAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(getProperties().layoutA);
return attr;
}
::mlir::NVVM::MMALayout getLayoutA();
::mlir::NVVM::MMALayoutAttr getLayoutBAttr() {
auto attr = ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(getProperties().layoutB);
return attr;
}
::mlir::NVVM::MMALayout getLayoutB();
::mlir::NVVM::MMAIntOverflowAttr getSatfiniteAttr() {
auto attr = ::llvm::dyn_cast_or_null<::mlir::NVVM::MMAIntOverflowAttr>(getProperties().satfinite);
return attr;
}
::std::optional<::mlir::NVVM::MMAIntOverflow> getSatfinite();
};
} // namespace detail
template <typename RangeT>
class WgmmaMmaAsyncOpGenericAdaptor : public detail::WgmmaMmaAsyncOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::WgmmaMmaAsyncOpGenericAdaptorBase;
static constexpr int odsIndex_inouts = 0;
static constexpr int odsIndex_descriptorA = 1;
static constexpr int odsIndex_descriptorB = 2;
public:
WgmmaMmaAsyncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
WgmmaMmaAsyncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : WgmmaMmaAsyncOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
WgmmaMmaAsyncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : WgmmaMmaAsyncOpGenericAdaptor(values, attrs, Properties{}, {}) {}
WgmmaMmaAsyncOpGenericAdaptor(RangeT values, const WgmmaMmaAsyncOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = WgmmaMmaAsyncOp, typename = std::enable_if_t<std::is_same_v<LateInst, WgmmaMmaAsyncOp>>>
WgmmaMmaAsyncOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getInouts() {
return (*getODSOperands(0).begin());
}
ValueT getDescriptorA() {
return (*getODSOperands(1).begin());
}
ValueT getDescriptorB() {
return (*getODSOperands(2).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class WgmmaMmaAsyncOpAdaptor : public WgmmaMmaAsyncOpGenericAdaptor<::mlir::ValueRange> {
public:
using WgmmaMmaAsyncOpGenericAdaptor::WgmmaMmaAsyncOpGenericAdaptor;
WgmmaMmaAsyncOpAdaptor(WgmmaMmaAsyncOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class WgmmaMmaAsyncOp : public ::mlir::Op<WgmmaMmaAsyncOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<3>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::NVVM::BasicPtxBuilderInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = WgmmaMmaAsyncOpAdaptor;
template <typename RangeT>
using GenericAdaptor = WgmmaMmaAsyncOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_inouts = 0;
static constexpr int odsIndex_descriptorA = 1;
static constexpr int odsIndex_descriptorB = 2;
using Properties = FoldAdaptor::Properties;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<WgmmaMmaAsyncOp>::getPredicate;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<WgmmaMmaAsyncOp>::hasIntrinsic;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<WgmmaMmaAsyncOp>::hasSideEffect;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<WgmmaMmaAsyncOp>::makeConstantI32;
using ::mlir::NVVM::BasicPtxBuilderInterface::Trait<WgmmaMmaAsyncOp>::getAsmValues;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("layoutA"), ::llvm::StringRef("layoutB"), ::llvm::StringRef("satfinite"), ::llvm::StringRef("scaleA"), ::llvm::StringRef("scaleB"), ::llvm::StringRef("scaleD"), ::llvm::StringRef("shape"), ::llvm::StringRef("typeA"), ::llvm::StringRef("typeB"), ::llvm::StringRef("typeD")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getLayoutAAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getLayoutAAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
::mlir::StringAttr getLayoutBAttrName() {
return getAttributeNameForIndex(1);
}
static ::mlir::StringAttr getLayoutBAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 1);
}
::mlir::StringAttr getSatfiniteAttrName() {
return getAttributeNameForIndex(2);
}
static ::mlir::StringAttr getSatfiniteAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 2);
}
::mlir::StringAttr getScaleAAttrName() {
return getAttributeNameForIndex(3);
}
static ::mlir::StringAttr getScaleAAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 3);
}
::mlir::StringAttr getScaleBAttrName() {
return getAttributeNameForIndex(4);
}
static ::mlir::StringAttr getScaleBAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 4);
}
::mlir::StringAttr getScaleDAttrName() {
return getAttributeNameForIndex(5);
}
static ::mlir::StringAttr getScaleDAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 5);
}
::mlir::StringAttr getShapeAttrName() {
return getAttributeNameForIndex(6);
}
static ::mlir::StringAttr getShapeAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 6);
}
::mlir::StringAttr getTypeAAttrName() {
return getAttributeNameForIndex(7);
}
static ::mlir::StringAttr getTypeAAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 7);
}
::mlir::StringAttr getTypeBAttrName() {
return getAttributeNameForIndex(8);
}
static ::mlir::StringAttr getTypeBAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 8);
}
::mlir::StringAttr getTypeDAttrName() {
return getAttributeNameForIndex(9);
}
static ::mlir::StringAttr getTypeDAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 9);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.wgmma.mma_async");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getInouts() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getDescriptorA() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::IntegerType> getDescriptorB() {
return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin());
}
::mlir::OpOperand &getInoutsMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getDescriptorAMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getDescriptorBMutable() {
auto range = getODSOperandIndexAndLength(2);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::Type> getResults() {
return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::NVVM::MMAShapeAttr getShapeAttr() {
return ::llvm::cast<::mlir::NVVM::MMAShapeAttr>(getProperties().shape);
}
::mlir::NVVM::MMAShapeAttr getShape();
::mlir::NVVM::WGMMATypesAttr getTypeAAttr() {
return ::llvm::cast<::mlir::NVVM::WGMMATypesAttr>(getProperties().typeA);
}
::mlir::NVVM::WGMMATypes getTypeA();
::mlir::NVVM::WGMMATypesAttr getTypeBAttr() {
return ::llvm::cast<::mlir::NVVM::WGMMATypesAttr>(getProperties().typeB);
}
::mlir::NVVM::WGMMATypes getTypeB();
::mlir::NVVM::WGMMATypesAttr getTypeDAttr() {
return ::llvm::cast<::mlir::NVVM::WGMMATypesAttr>(getProperties().typeD);
}
::mlir::NVVM::WGMMATypes getTypeD();
::mlir::NVVM::WGMMAScaleOutAttr getScaleDAttr() {
return ::llvm::cast<::mlir::NVVM::WGMMAScaleOutAttr>(getProperties().scaleD);
}
::mlir::NVVM::WGMMAScaleOut getScaleD();
::mlir::NVVM::WGMMAScaleInAttr getScaleAAttr() {
return ::llvm::cast<::mlir::NVVM::WGMMAScaleInAttr>(getProperties().scaleA);
}
::mlir::NVVM::WGMMAScaleIn getScaleA();
::mlir::NVVM::WGMMAScaleInAttr getScaleBAttr() {
return ::llvm::cast<::mlir::NVVM::WGMMAScaleInAttr>(getProperties().scaleB);
}
::mlir::NVVM::WGMMAScaleIn getScaleB();
::mlir::NVVM::MMALayoutAttr getLayoutAAttr() {
return ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(getProperties().layoutA);
}
::mlir::NVVM::MMALayout getLayoutA();
::mlir::NVVM::MMALayoutAttr getLayoutBAttr() {
return ::llvm::cast<::mlir::NVVM::MMALayoutAttr>(getProperties().layoutB);
}
::mlir::NVVM::MMALayout getLayoutB();
::mlir::NVVM::MMAIntOverflowAttr getSatfiniteAttr() {
return ::llvm::dyn_cast_or_null<::mlir::NVVM::MMAIntOverflowAttr>(getProperties().satfinite);
}
::std::optional<::mlir::NVVM::MMAIntOverflow> getSatfinite();
void setShapeAttr(::mlir::NVVM::MMAShapeAttr attr) {
getProperties().shape = attr;
}
void setTypeAAttr(::mlir::NVVM::WGMMATypesAttr attr) {
getProperties().typeA = attr;
}
void setTypeA(::mlir::NVVM::WGMMATypes attrValue);
void setTypeBAttr(::mlir::NVVM::WGMMATypesAttr attr) {
getProperties().typeB = attr;
}
void setTypeB(::mlir::NVVM::WGMMATypes attrValue);
void setTypeDAttr(::mlir::NVVM::WGMMATypesAttr attr) {
getProperties().typeD = attr;
}
void setTypeD(::mlir::NVVM::WGMMATypes attrValue);
void setScaleDAttr(::mlir::NVVM::WGMMAScaleOutAttr attr) {
getProperties().scaleD = attr;
}
void setScaleD(::mlir::NVVM::WGMMAScaleOut attrValue);
void setScaleAAttr(::mlir::NVVM::WGMMAScaleInAttr attr) {
getProperties().scaleA = attr;
}
void setScaleA(::mlir::NVVM::WGMMAScaleIn attrValue);
void setScaleBAttr(::mlir::NVVM::WGMMAScaleInAttr attr) {
getProperties().scaleB = attr;
}
void setScaleB(::mlir::NVVM::WGMMAScaleIn attrValue);
void setLayoutAAttr(::mlir::NVVM::MMALayoutAttr attr) {
getProperties().layoutA = attr;
}
void setLayoutA(::mlir::NVVM::MMALayout attrValue);
void setLayoutBAttr(::mlir::NVVM::MMALayoutAttr attr) {
getProperties().layoutB = attr;
}
void setLayoutB(::mlir::NVVM::MMALayout attrValue);
void setSatfiniteAttr(::mlir::NVVM::MMAIntOverflowAttr attr) {
getProperties().satfinite = attr;
}
void setSatfinite(::std::optional<::mlir::NVVM::MMAIntOverflow> attrValue);
::mlir::Attribute removeSatfiniteAttr() {
auto attr = getProperties().satfinite;
getProperties().satfinite = {};
return attr;
}
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type results, ::mlir::Value inouts, ::mlir::Value descriptorA, ::mlir::Value descriptorB, ::mlir::NVVM::MMAShapeAttr shape, ::mlir::NVVM::WGMMATypesAttr typeA, ::mlir::NVVM::WGMMATypesAttr typeB, ::mlir::NVVM::WGMMATypesAttr typeD, ::mlir::NVVM::WGMMAScaleOutAttr scaleD, ::mlir::NVVM::WGMMAScaleInAttr scaleA, ::mlir::NVVM::WGMMAScaleInAttr scaleB, ::mlir::NVVM::MMALayoutAttr layoutA, ::mlir::NVVM::MMALayoutAttr layoutB, /*optional*/::mlir::NVVM::MMAIntOverflowAttr satfinite);
static WgmmaMmaAsyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type results, ::mlir::Value inouts, ::mlir::Value descriptorA, ::mlir::Value descriptorB, ::mlir::NVVM::MMAShapeAttr shape, ::mlir::NVVM::WGMMATypesAttr typeA, ::mlir::NVVM::WGMMATypesAttr typeB, ::mlir::NVVM::WGMMATypesAttr typeD, ::mlir::NVVM::WGMMAScaleOutAttr scaleD, ::mlir::NVVM::WGMMAScaleInAttr scaleA, ::mlir::NVVM::WGMMAScaleInAttr scaleB, ::mlir::NVVM::MMALayoutAttr layoutA, ::mlir::NVVM::MMALayoutAttr layoutB, /*optional*/::mlir::NVVM::MMAIntOverflowAttr satfinite);
static WgmmaMmaAsyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type results, ::mlir::Value inouts, ::mlir::Value descriptorA, ::mlir::Value descriptorB, ::mlir::NVVM::MMAShapeAttr shape, ::mlir::NVVM::WGMMATypesAttr typeA, ::mlir::NVVM::WGMMATypesAttr typeB, ::mlir::NVVM::WGMMATypesAttr typeD, ::mlir::NVVM::WGMMAScaleOutAttr scaleD, ::mlir::NVVM::WGMMAScaleInAttr scaleA, ::mlir::NVVM::WGMMAScaleInAttr scaleB, ::mlir::NVVM::MMALayoutAttr layoutA, ::mlir::NVVM::MMALayoutAttr layoutB, /*optional*/::mlir::NVVM::MMAIntOverflowAttr satfinite);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value inouts, ::mlir::Value descriptorA, ::mlir::Value descriptorB, ::mlir::NVVM::MMAShapeAttr shape, ::mlir::NVVM::WGMMATypesAttr typeA, ::mlir::NVVM::WGMMATypesAttr typeB, ::mlir::NVVM::WGMMATypesAttr typeD, ::mlir::NVVM::WGMMAScaleOutAttr scaleD, ::mlir::NVVM::WGMMAScaleInAttr scaleA, ::mlir::NVVM::WGMMAScaleInAttr scaleB, ::mlir::NVVM::MMALayoutAttr layoutA, ::mlir::NVVM::MMALayoutAttr layoutB, /*optional*/::mlir::NVVM::MMAIntOverflowAttr satfinite);
static WgmmaMmaAsyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value inouts, ::mlir::Value descriptorA, ::mlir::Value descriptorB, ::mlir::NVVM::MMAShapeAttr shape, ::mlir::NVVM::WGMMATypesAttr typeA, ::mlir::NVVM::WGMMATypesAttr typeB, ::mlir::NVVM::WGMMATypesAttr typeD, ::mlir::NVVM::WGMMAScaleOutAttr scaleD, ::mlir::NVVM::WGMMAScaleInAttr scaleA, ::mlir::NVVM::WGMMAScaleInAttr scaleB, ::mlir::NVVM::MMALayoutAttr layoutA, ::mlir::NVVM::MMALayoutAttr layoutB, /*optional*/::mlir::NVVM::MMAIntOverflowAttr satfinite);
static WgmmaMmaAsyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value inouts, ::mlir::Value descriptorA, ::mlir::Value descriptorB, ::mlir::NVVM::MMAShapeAttr shape, ::mlir::NVVM::WGMMATypesAttr typeA, ::mlir::NVVM::WGMMATypesAttr typeB, ::mlir::NVVM::WGMMATypesAttr typeD, ::mlir::NVVM::WGMMAScaleOutAttr scaleD, ::mlir::NVVM::WGMMAScaleInAttr scaleA, ::mlir::NVVM::WGMMAScaleInAttr scaleB, ::mlir::NVVM::MMALayoutAttr layoutA, ::mlir::NVVM::MMALayoutAttr layoutB, /*optional*/::mlir::NVVM::MMAIntOverflowAttr satfinite);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type results, ::mlir::Value inouts, ::mlir::Value descriptorA, ::mlir::Value descriptorB, ::mlir::NVVM::MMAShapeAttr shape, ::mlir::NVVM::WGMMATypes typeA, ::mlir::NVVM::WGMMATypes typeB, ::mlir::NVVM::WGMMATypes typeD, ::mlir::NVVM::WGMMAScaleOut scaleD, ::mlir::NVVM::WGMMAScaleIn scaleA, ::mlir::NVVM::WGMMAScaleIn scaleB, ::mlir::NVVM::MMALayout layoutA, ::mlir::NVVM::MMALayout layoutB, /*optional*/::mlir::NVVM::MMAIntOverflowAttr satfinite);
static WgmmaMmaAsyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type results, ::mlir::Value inouts, ::mlir::Value descriptorA, ::mlir::Value descriptorB, ::mlir::NVVM::MMAShapeAttr shape, ::mlir::NVVM::WGMMATypes typeA, ::mlir::NVVM::WGMMATypes typeB, ::mlir::NVVM::WGMMATypes typeD, ::mlir::NVVM::WGMMAScaleOut scaleD, ::mlir::NVVM::WGMMAScaleIn scaleA, ::mlir::NVVM::WGMMAScaleIn scaleB, ::mlir::NVVM::MMALayout layoutA, ::mlir::NVVM::MMALayout layoutB, /*optional*/::mlir::NVVM::MMAIntOverflowAttr satfinite);
static WgmmaMmaAsyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type results, ::mlir::Value inouts, ::mlir::Value descriptorA, ::mlir::Value descriptorB, ::mlir::NVVM::MMAShapeAttr shape, ::mlir::NVVM::WGMMATypes typeA, ::mlir::NVVM::WGMMATypes typeB, ::mlir::NVVM::WGMMATypes typeD, ::mlir::NVVM::WGMMAScaleOut scaleD, ::mlir::NVVM::WGMMAScaleIn scaleA, ::mlir::NVVM::WGMMAScaleIn scaleB, ::mlir::NVVM::MMALayout layoutA, ::mlir::NVVM::MMALayout layoutB, /*optional*/::mlir::NVVM::MMAIntOverflowAttr satfinite);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value inouts, ::mlir::Value descriptorA, ::mlir::Value descriptorB, ::mlir::NVVM::MMAShapeAttr shape, ::mlir::NVVM::WGMMATypes typeA, ::mlir::NVVM::WGMMATypes typeB, ::mlir::NVVM::WGMMATypes typeD, ::mlir::NVVM::WGMMAScaleOut scaleD, ::mlir::NVVM::WGMMAScaleIn scaleA, ::mlir::NVVM::WGMMAScaleIn scaleB, ::mlir::NVVM::MMALayout layoutA, ::mlir::NVVM::MMALayout layoutB, /*optional*/::mlir::NVVM::MMAIntOverflowAttr satfinite);
static WgmmaMmaAsyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value inouts, ::mlir::Value descriptorA, ::mlir::Value descriptorB, ::mlir::NVVM::MMAShapeAttr shape, ::mlir::NVVM::WGMMATypes typeA, ::mlir::NVVM::WGMMATypes typeB, ::mlir::NVVM::WGMMATypes typeD, ::mlir::NVVM::WGMMAScaleOut scaleD, ::mlir::NVVM::WGMMAScaleIn scaleA, ::mlir::NVVM::WGMMAScaleIn scaleB, ::mlir::NVVM::MMALayout layoutA, ::mlir::NVVM::MMALayout layoutB, /*optional*/::mlir::NVVM::MMAIntOverflowAttr satfinite);
static WgmmaMmaAsyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value inouts, ::mlir::Value descriptorA, ::mlir::Value descriptorB, ::mlir::NVVM::MMAShapeAttr shape, ::mlir::NVVM::WGMMATypes typeA, ::mlir::NVVM::WGMMATypes typeB, ::mlir::NVVM::WGMMATypes typeD, ::mlir::NVVM::WGMMAScaleOut scaleD, ::mlir::NVVM::WGMMAScaleIn scaleA, ::mlir::NVVM::WGMMAScaleIn scaleB, ::mlir::NVVM::MMALayout layoutA, ::mlir::NVVM::MMALayout layoutB, /*optional*/::mlir::NVVM::MMAIntOverflowAttr satfinite);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WgmmaMmaAsyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WgmmaMmaAsyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WgmmaMmaAsyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WgmmaMmaAsyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
::llvm::LogicalResult verify();
std::string getPtx();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 10 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
bool getAsmValues(RewriterBase &, llvm::SmallVectorImpl<std::pair<mlir::Value, mlir::NVVM::PTXRegisterMod>> &);
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::WgmmaMmaAsyncOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::WgmmaMmaAsyncOpGenericAdaptorBase::Properties)
namespace mlir::NVVM {
//===----------------------------------------------------------------------===//
// ::mlir::NVVM::WgmmaWaitGroupSyncOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class WgmmaWaitGroupSyncOpGenericAdaptorBase {
public:
struct Properties {
using groupTy = ::mlir::IntegerAttr;
groupTy group;
auto getGroup() const {
auto &propStorage = this->group;
return ::llvm::cast<::mlir::IntegerAttr>(propStorage);
}
void setGroup(const ::mlir::IntegerAttr &propValue) {
this->group = propValue;
}
bool operator==(const Properties &rhs) const {
return
rhs.group == this->group &&
true;
}
bool operator!=(const Properties &rhs) const {
return !(*this == rhs);
}
};
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
WgmmaWaitGroupSyncOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("nvvm.wgmma.wait.group.sync.aligned", odsAttrs.getContext());
}
WgmmaWaitGroupSyncOpGenericAdaptorBase(WgmmaWaitGroupSyncOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
::mlir::IntegerAttr getGroupAttr() {
auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().group);
return attr;
}
uint64_t getGroup();
};
} // namespace detail
template <typename RangeT>
class WgmmaWaitGroupSyncOpGenericAdaptor : public detail::WgmmaWaitGroupSyncOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::WgmmaWaitGroupSyncOpGenericAdaptorBase;
public:
WgmmaWaitGroupSyncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
WgmmaWaitGroupSyncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : WgmmaWaitGroupSyncOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
WgmmaWaitGroupSyncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : WgmmaWaitGroupSyncOpGenericAdaptor(values, attrs, Properties{}, {}) {}
WgmmaWaitGroupSyncOpGenericAdaptor(RangeT values, const WgmmaWaitGroupSyncOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = WgmmaWaitGroupSyncOp, typename = std::enable_if_t<std::is_same_v<LateInst, WgmmaWaitGroupSyncOp>>>
WgmmaWaitGroupSyncOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class WgmmaWaitGroupSyncOpAdaptor : public WgmmaWaitGroupSyncOpGenericAdaptor<::mlir::ValueRange> {
public:
using WgmmaWaitGroupSyncOpGenericAdaptor::WgmmaWaitGroupSyncOpGenericAdaptor;
WgmmaWaitGroupSyncOpAdaptor(WgmmaWaitGroupSyncOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class WgmmaWaitGroupSyncOp : public ::mlir::Op<WgmmaWaitGroupSyncOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::NVVMRequiresSM<903>::Impl> {
public:
using Op::Op;
using Op::print;
using Adaptor = WgmmaWaitGroupSyncOpAdaptor;
template <typename RangeT>
using GenericAdaptor = WgmmaWaitGroupSyncOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {::llvm::StringRef("group")};
return ::llvm::ArrayRef(attrNames);
}
::mlir::StringAttr getGroupAttrName() {
return getAttributeNameForIndex(0);
}
static ::mlir::StringAttr getGroupAttrName(::mlir::OperationName name) {
return getAttributeNameForIndex(name, 0);
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("nvvm.wgmma.wait.group.sync.aligned");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
void writeProperties(::mlir::DialectBytecodeWriter &writer);
::mlir::IntegerAttr getGroupAttr() {
return ::llvm::cast<::mlir::IntegerAttr>(getProperties().group);
}
uint64_t getGroup();
void setGroupAttr(::mlir::IntegerAttr attr) {
getProperties().group = attr;
}
void setGroup(uint64_t attrValue);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr group);
static WgmmaWaitGroupSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr group);
static WgmmaWaitGroupSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr group);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr group);
static WgmmaWaitGroupSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr group);
static WgmmaWaitGroupSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr group);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint64_t group);
static WgmmaWaitGroupSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, uint64_t group);
static WgmmaWaitGroupSyncOp create(::mlir::ImplicitLocOpBuilder &builder, uint64_t group);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint64_t group);
static WgmmaWaitGroupSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint64_t group);
static WgmmaWaitGroupSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint64_t group);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WgmmaWaitGroupSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static WgmmaWaitGroupSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WgmmaWaitGroupSyncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static WgmmaWaitGroupSyncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
private:
::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
return getAttributeNameForIndex((*this)->getName(), index);
}
static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
assert(index < 1 && "invalid attribute index");
assert(name.getStringRef() == getOperationName() && "invalid operation name");
assert(name.isRegistered() && "Operation isn't registered, missing a "
"dependent dialect loading?");
return name.getAttributeNames()[index];
}
public:
};
} // namespace mlir::NVVM
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::WgmmaWaitGroupSyncOp)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::NVVM::detail::WgmmaWaitGroupSyncOpGenericAdaptorBase::Properties)
#endif // GET_OP_CLASSES