MLIR 24.0.0git
NVVMConvertOps.cpp File Reference
#include "mlir/Dialect/LLVMIR/NVVMConvertOps.h"
#include "IR/NVVMOps.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/Diagnostics.h"
#include "mlir/IR/MLIRContext.h"
#include "mlir/IR/Operation.h"
#include "mlir/IR/Types.h"
#include "mlir/Target/LLVMIR/ModuleTranslation.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/TypeSwitch.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/IntrinsicsNVPTX.h"
#include "llvm/Support/Casting.h"
#include <utility>
#include "mlir/Dialect/LLVMIR/NVVMConvertOps.cpp.inc"

Go to the source code of this file.

Macros

#define _none
#define CVT_F2TF32_ID_IMPL(rnd, relu, sf)
#define GET_CVT_F2TF32_ID(rnd, relu, sf)
#define GET_OP_CLASSES

Functions

static LogicalResult verifyConvertF32x2ToFP16x2Op (Twine dstType, FPRoundingMode rnd, bool hasRandomBits, bool hasPzo, Operation *op)
static void appendN1ScaleArg (Value scaleFactor, LLVM::ModuleTranslation &mt, llvm::IRBuilderBase &builder, llvm::SmallVectorImpl< llvm::Value * > &args)
static llvm::Intrinsic::ID getUE5M3IntrinsicID (NVVM::FPRoundingMode rnd, bool hasSatFinite, bool hasScale, ArrayRef< llvm::Intrinsic::ID > ids, ArrayRef< llvm::Intrinsic::ID > scaledIds)

Macro Definition Documentation

◆ _none

#define _none

Definition at line 369 of file NVVMConvertOps.cpp.

◆ CVT_F2TF32_ID_IMPL

#define CVT_F2TF32_ID_IMPL ( rnd,
relu,
sf )
Value:
hasRelu ? llvm::Intrinsic::nvvm_f2tf32_##rnd##relu##sf \
: llvm::Intrinsic::nvvm_f2tf32_##rnd##sf

Definition at line 371 of file NVVMConvertOps.cpp.

◆ GET_CVT_F2TF32_ID

#define GET_CVT_F2TF32_ID ( rnd,
relu,
sf )
Value:
hasSatFinite ? CVT_F2TF32_ID_IMPL(rnd, relu, sf) \
: CVT_F2TF32_ID_IMPL(rnd, relu, )
#define CVT_F2TF32_ID_IMPL(rnd, relu, sf)

Definition at line 375 of file NVVMConvertOps.cpp.

◆ GET_OP_CLASSES

#define GET_OP_CLASSES

Definition at line 1383 of file NVVMConvertOps.cpp.

Function Documentation

◆ appendN1ScaleArg()

void appendN1ScaleArg ( Value scaleFactor,
LLVM::ModuleTranslation & mt,
llvm::IRBuilderBase & builder,
llvm::SmallVectorImpl< llvm::Value * > & args )
static

Definition at line 396 of file NVVMConvertOps.cpp.

References mlir::LLVM::ModuleTranslation::lookupValue().

◆ getUE5M3IntrinsicID()

llvm::Intrinsic::ID getUE5M3IntrinsicID ( NVVM::FPRoundingMode rnd,
bool hasSatFinite,
bool hasScale,
ArrayRef< llvm::Intrinsic::ID > ids,
ArrayRef< llvm::Intrinsic::ID > scaledIds )
static

Definition at line 656 of file NVVMConvertOps.cpp.

◆ verifyConvertF32x2ToFP16x2Op()

LogicalResult verifyConvertF32x2ToFP16x2Op ( Twine dstType,
FPRoundingMode rnd,
bool hasRandomBits,
bool hasPzo,
Operation * op )
static

Definition at line 291 of file NVVMConvertOps.cpp.

References mlir::Operation::emitOpError(), and success().