Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ff93675
[mlir][RFC] Allow to skip operands type specification in ASM form
Oct 12, 2021
792e0e1
Add FlatSymbolRefAttr and ArrayAttr for memory space representation (…
nikita-kud Dec 21, 2021
4401054
[mlir] Relax ASM parser requirements about operands Type presence
Jan 14, 2022
4911da0
[mlir] Remove LIT tests affected by ASM simplification
Jan 21, 2022
fc0db2e
Merge pull request #11 from iszilve/SymbolTableTweaks
nikita-kud Mar 14, 2023
29042a3
Disable failed tests: #73140
nikita-kud Feb 13, 2024
a34ac59
extend SymbolContainer semantics to SymbolUserMap
Jun 22, 2023
db32b9e
Add method getInlineBlockAndPoint for DialectInlinerInterface
nikita-kud Jan 31, 2024
98c21b7
PR #27: Adding newlines and tracking indent level moved to mlir::AsmP…
Jacenty-And-Intel Feb 21, 2024
d4d0c25
Added f8E4M3FN and f8E5M2 support to existing QuantizedTypes (17.x) (…
AndreiFilipIntel Feb 22, 2024
528b679
Initialize pass options using pipeline options
nikita-kud Apr 15, 2024
9743519
Fix compilation issue with MSVC
jschj May 7, 2024
205f63a
Port Ubunu-24 warning fixes to npu/release/18.x (#45)
DariaMityagina Jun 24, 2024
6d72b73
Extend Quant dialect with Quantile Quantization type (#53)
sartil Aug 20, 2024
a3ce43b
Extending QuantileQuantizedType with quantileType mlir::Type member (…
sartil Oct 3, 2024
631b33c
Relax negative scales conditions in Quant Dialect (#61)
ZoranZomborat Oct 10, 2024
3dd0b65
Adding missing check in QuantileQuantizedPerAxisType::verify (#66)
sartil Oct 11, 2024
6e27eb1
Adding new quantileType types to mlir test (#85)
sartil Nov 19, 2024
9cdbb7c
Add Value back to SideEffectInterfaces
rayngun Mar 21, 2025
d795636
Revert "[mlir][Symbol] Add verification that symbol's parent is a Sym…
rayngun Mar 24, 2025
acb035d
Fix thread handle leak on Windows (#133)
lmielick Jun 4, 2025
c010a3b
EISW-130780: remove all wd flag to enable warnings when LLVM_ENABLE_W…
ShaojieZhuIntel Jun 11, 2025
f3ea0fb
EISW-176770 Fix argument parsing issue in mlir-src-sharder after comm…
sramasit Jun 27, 2025
c3193ed
[mlir] Expose output strategies of TimingManager (#166548)
andrey-golubev Nov 6, 2025
eaca98b
[mlir][bufferization] Support custom types at function boundaries (#1…
andrey-golubev Sep 24, 2025
c06b60a
Avoid copies in getChecked (cherry-pick from upstream) (#151) (#170)
AlexandruLorinti Nov 10, 2025
349c164
[mlir][bufferization] Refine tensor-buffer compatibility checks (#167…
andrey-golubev Nov 18, 2025
30a119c
[MLIR][ODS] Fully qualify namespace for mlir::Attribute in ODS genera…
BogdanDragosV Nov 21, 2025
3fa04c4
Enable quantization for FP4 type
Jacenty-And-Intel Nov 14, 2025
3b125a0
[MLIR] Forward generated OpTy::create arguments (#170012)
ricejasonf Dec 2, 2025
8ee6ab0
[mlir][SCF] Add scf.index_switch support for populateSCFStructuralTyp…
ArtemySkrebkov Sep 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions llvm/cmake/modules/HandleLLVMOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,16 @@ if (MSVC)

# Enable warnings
if (LLVM_ENABLE_WARNINGS)
# Remove all -wd flag to enable warnings
if (NOT CLANG_CL)
set(msvc_warning_flags
# Promoted warnings.
-w14062 # Promote 'enumerator in switch of enum is not handled' to level 1 warning.

# Promoted warnings to errors.
-we4238 # Promote 'nonstandard extension used : class rvalue used as lvalue' to error.
)
endif(NOT CLANG_CL)
# Put /W4 in front of all the -we flags. cl.exe doesn't care, but for
# clang-cl having /W4 after the -we flags will re-enable the warnings
# disabled by -we.
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/ADT/FunctionExtras.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ template <typename ReturnT, typename... ParamTs> class UniqueFunctionBase {
void *StoragePtr;
size_t Size;
size_t Alignment;
} OutOfLineStorage;
} OutOfLineStorage = {};
static_assert(
sizeof(OutOfLineStorageT) <= InlineStorageSize,
"Should always use all of the out-of-line storage for inline storage!");
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1444,8 +1444,8 @@ void DWARFVerifier::verifyNameIndexAttribute(
}

if (AttrEnc.Index == dwarf::DW_IDX_parent) {
constexpr static auto AllowedForms = {dwarf::Form::DW_FORM_flag_present,
dwarf::Form::DW_FORM_ref4};
static constexpr dwarf::Form AllowedForms[] = {
dwarf::Form::DW_FORM_flag_present, dwarf::Form::DW_FORM_ref4};
if (!is_contained(AllowedForms, AttrEnc.Form)) {
ErrorCategory.Report("Unexpected NameIndex Abbreviation", [&]() {
error() << formatv(
Expand Down
3 changes: 3 additions & 0 deletions llvm/lib/Support/Windows/Threading.inc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ void llvm_thread_join_impl(HANDLE hThread) {
if (::WaitForSingleObject(hThread, INFINITE) == WAIT_FAILED) {
ReportLastErrorFatal("WaitForSingleObject failed");
}
if (::CloseHandle(hThread) == FALSE) {
ReportLastErrorFatal("CloseHandle failed");
}
}

void llvm_thread_detach_impl(HANDLE hThread) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,12 @@ struct BufferizationOptions {
std::function<LogicalResult(OpBuilder &, Location, Value, Value)>;
/// Initializer function for analysis state.
using AnalysisStateInitFn = std::function<void(AnalysisState &)>;
/// Tensor -> MemRef type converter.
/// Parameters: tensor type, memory space, func op, bufferization options
/// Tensor-like -> Buffer-like type conversion.
/// Parameters: tensor-like type, memory space, func op, bufferization options
using FunctionArgTypeConverterFn =
std::function<BaseMemRefType(TensorType, Attribute memorySpace,
std::function<BufferLikeType(TensorLikeType, Attribute memorySpace,
func::FuncOp, const BufferizationOptions &)>;
/// Tensor -> MemRef type converter.
/// Tensor -> MemRef type conversion.
/// Parameters: tensor type, memory space, bufferization options
using UnknownTypeConverterFn = std::function<BaseMemRefType(
TensorType, Attribute memorySpace, const BufferizationOptions &)>;
Expand Down Expand Up @@ -335,10 +335,12 @@ struct BufferizationOptions {
/// predictable.
void setFunctionBoundaryTypeConversion(LayoutMapOption layoutMapOption);

/// Type converter from tensors to memrefs. This type converter is used to
/// determine bufferized function argument and result types. By default, a
/// type converter that returns a memref type with a fully dynamic layout map
/// is used.
/// Type conversion from tensors to buffers. This type conversion is used to
/// determine bufferized function argument and result types.
///
/// By default, if tensor is a (builtin) tensor type, it is converted to a
/// memref type with a fully dynamic layout map; if tensor is a (generic)
/// tensor-like type, it is converted using TensorLikeType::getBufferType().
///
/// If `bufferizeFunctionBoundaries` is not set, this function isn't used.
FunctionArgTypeConverterFn functionArgTypeConverterFn = nullptr;
Expand All @@ -350,10 +352,9 @@ struct BufferizationOptions {
/// If `bufferizeFunctionBoundaries` is not set, this flag has no effect.
bool inferFunctionResultLayout = true;

/// Type converter from tensors to memrefs. This type converter is used if no
/// memref type could be inferred during bufferization. By default, a type
/// converter that returns a memref type with a fully dynamic layout map is
/// used.
/// Type conversion from tensors to memrefs. This type conversion is used if
/// no memref type could be inferred during bufferization. By default, returns
/// a memref type with a fully dynamic layout map.
UnknownTypeConverterFn unknownTypeConverterFn = nullptr;

// Use during type conversion to determine the memory space for memref based
Expand Down
28 changes: 28 additions & 0 deletions mlir/include/mlir/Dialect/Quant/IR/QuantBase.td
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,34 @@ class quant_ScalarOrTensorOf<Type etype> :

def quant_QuantizedType :
Type<CPred<"::llvm::isa<mlir::quant::QuantizedType>($_self)">, "quantized type">;

def quant_QuantileQuantizedType :
DialectType<Quant_Dialect,
CPred<"::llvm::isa<mlir::quant::QuantileQuantizedType>($_self)">,
"QuantileQuantizedType">;

def quant_QuantileQuantizedValueType :
quant_ScalarOrTensorOf<quant_QuantileQuantizedType>;

// UniformQuantizedPerAxisType
def quant_UniformQuantizedPerAxisType :
DialectType<Quant_Dialect,
CPred<"::llvm::isa<::mlir::quant::UniformQuantizedPerAxisType>($_self)">,
"UniformQuantizedPerAxisType">;

// QuantileQuantizedPerAxisType
def quant_QuantileQuantizedPerAxisType :
DialectType<Quant_Dialect,
CPred<"::llvm::isa<::mlir::quant::QuantileQuantizedPerAxisType>($_self)">,
"QuantileQuantizedPerAxisType">;

// Predicate for detecting a container or primitive of UniformQuantizedPerAxisType.
def quant_UniformQuantizedPerAxisValueType :
quant_ScalarOrTensorOf<quant_UniformQuantizedPerAxisType>;

// Predicate for detecting a container or primitive of QuantileQuantizedPerAxisType.
def quant_QuantileQuantizedPerAxisValueType :
quant_ScalarOrTensorOf<quant_QuantileQuantizedPerAxisType>;

def quant_ScalarType :
Type<Or<[
Expand Down
46 changes: 42 additions & 4 deletions mlir/include/mlir/Dialect/Quant/IR/QuantDialectBytecode.td
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,37 @@ def UniformQuantizedSubChannelType
zeroPoints, llvm::to_vector(llvm::map_range(quantizedDimensions,
[](int64_t dim) { return static_cast<int32_t>(dim);})), blockSizes,
storageTypeMin, storageTypeMax)
}];
}

def QuantileQuantizedType: DialectType<(type
VarInt:$flags,
Type:$storageType,
Type:$quantileType,
Type:$expressedType,
Array<DoubleAPFloatList>:$quantiles,
DoubleAPFloat:$scale,
SignedVarInt:$zeroPoint,
SignedVarInt:$storageTypeMin,
SignedVarInt:$storageTypeMax
)>;

def QuantileQuantizedPerAxisType: DialectType<(type
VarInt:$flags,
Type:$storageType,
Type:$quantileType,
Type:$expressedType,
VarInt:$quantizedDimension,
SignedVarInt:$storageTypeMin,
SignedVarInt:$storageTypeMax,
Array<DoubleAPFloatList>:$quantiles,
Array<DoubleAPFloatList>:$scales,
Array<SignedVarIntList>:$zeroPoints
)> {
// Note: builder order differs from bytecode.
let cBuilder = [{
get<$_resultType>(context, flags, storageType, quantileType, expressedType, quantiles, scales,
zeroPoints, quantizedDimension, storageTypeMin, storageTypeMax)
}];
}

Expand All @@ -103,10 +134,17 @@ def UniformQuantizedSubChannelType
/// compatibility with older bytecode.

def QuantDialectTypes : DialectTypes<"Quant"> {
let elems = [ReservedOrDead, AnyQuantizedType,
AnyQuantizedTypeWithExpressedType, CalibratedQuantizedType,
UniformQuantizedType, UniformQuantizedPerAxisType,
UniformQuantizedSubChannelType];
let elems = [
ReservedOrDead,
AnyQuantizedType,
AnyQuantizedTypeWithExpressedType,
CalibratedQuantizedType,
UniformQuantizedType,
UniformQuantizedPerAxisType,
QuantileQuantizedType,
QuantileQuantizedPerAxisType,
UniformQuantizedSubChannelType
];
}

#endif // QUANT_BYTECODE
Loading