-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improves VNNI validation and lit tests to be target independent w.r.t. VNNI blocking factor. VNNI infrastructure is extended with DLTI support that allows to override target's default VNNI factor. This allows to fix VNNI shape for lit testing to ensure that general pass logic works fine. This is primarily applied to tests that use prepacked VNNI shapes. When possible, tests' checks are generalized to account for varying packing factor. Test shapes are adjusted to prevent failure due to incompatible VNNI packing sizes compared to dimension size used for verification. BF16 integration tests are now disabled on non-x86 systems to avoid runtime mismatch between prepacked shapes and microkernel requirements.
- Loading branch information
Showing
32 changed files
with
1,012 additions
and
674 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
//===- DLTIUtils.h -----------------------------------------------*- C++-*-===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef TPP_TRANSFORMS_UTILS_DLTIUTILS_H | ||
#define TPP_TRANSFORMS_UTILS_DLTIUTILS_H | ||
|
||
#include "mlir/Dialect/DLTI/DLTI.h" | ||
|
||
namespace llvm { | ||
class StringRef; | ||
} // namespace llvm | ||
|
||
namespace mlir { | ||
namespace dlti { | ||
namespace utils { | ||
|
||
// Perform a DLTI-query using string keys. | ||
FailureOr<Attribute> query(Operation *op, ArrayRef<StringRef> keys, | ||
bool emitError = false); | ||
|
||
} // namespace utils | ||
} // namespace dlti | ||
} // namespace mlir | ||
|
||
#endif // TPP_TRANSFORMS_UTILS_DLTIUTILS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//===- DLTIUtils.cpp ---------------------------------------------*- C++-*-===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#include "TPP/Transforms/Utils/DLTIUtils.h" | ||
|
||
namespace mlir { | ||
namespace dlti { | ||
namespace utils { | ||
|
||
FailureOr<Attribute> query(Operation *op, ArrayRef<StringRef> keys, | ||
bool emitError) { | ||
if (!op) | ||
return failure(); | ||
|
||
auto ctx = op->getContext(); | ||
SmallVector<DataLayoutEntryKey> entryKeys; | ||
for (auto &key : keys) { | ||
auto entry = StringAttr::get(ctx, key); | ||
entryKeys.push_back(entry); | ||
} | ||
|
||
return dlti::query(op, entryKeys, emitError); | ||
} | ||
|
||
} // namespace utils | ||
} // namespace dlti | ||
} // namespace mlir |
Oops, something went wrong.