forked from OSchip/llvm-project
Remove TOSA test passes from non test registration.
* Wires them in the same way that peer-dialect test passes are registered. * Fixes the build for -DLLVM_INCLUDE_TESTS=OFF. Differential Revision: https://reviews.llvm.org/D91022
This commit is contained in:
parent
4d54c6fc5a
commit
86b011777e
|
@ -24,14 +24,3 @@ def TosaMakeBroadcastable : FunctionPass<"tosa-make-broadcastable"> {
|
|||
|
||||
let constructor = "createTosaMakeBroadcastablePass()";
|
||||
}
|
||||
|
||||
// TOSA Test Passes
|
||||
|
||||
def TosaTestQuantUtils : FunctionPass<"tosa-test-quant-utils"> {
|
||||
let summary = "TOSA Test: Exercise the APIs in QuantUtils.cpp";
|
||||
let description = [{
|
||||
Exercises the API that builds a quantized type from min/max quantized range.
|
||||
}];
|
||||
|
||||
let constructor = "createTosaTestQuantUtilAPIPass()";
|
||||
}
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
#include "mlir/Pass/Pass.h"
|
||||
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
|
||||
|
||||
#define PASS_NAME "tosa-test-quant-utils"
|
||||
|
||||
using namespace mlir;
|
||||
using namespace mlir::tosa;
|
||||
|
||||
|
@ -176,7 +178,7 @@ ConvertTosaConv2DOp::matchAndRewrite(Operation *op,
|
|||
namespace {
|
||||
|
||||
struct TosaTestQuantUtilAPI
|
||||
: public TosaTestQuantUtilsBase<TosaTestQuantUtilAPI> {
|
||||
: public PassWrapper<TosaTestQuantUtilAPI, FunctionPass> {
|
||||
void runOnFunction() override;
|
||||
};
|
||||
|
||||
|
@ -192,6 +194,9 @@ void TosaTestQuantUtilAPI::runOnFunction() {
|
|||
|
||||
} // anonymous namespace
|
||||
|
||||
std::unique_ptr<Pass> mlir::tosa::createTosaTestQuantUtilAPIPass() {
|
||||
return std::make_unique<TosaTestQuantUtilAPI>();
|
||||
namespace mlir {
|
||||
void registerTosaTestQuantUtilAPIPass() {
|
||||
PassRegistration<TosaTestQuantUtilAPI>(
|
||||
PASS_NAME, "TOSA Test: Exercise the APIs in QuantUtils.cpp.");
|
||||
}
|
||||
} // namespace mlir
|
||||
|
|
|
@ -48,6 +48,7 @@ void registerTestReducer();
|
|||
void registerTestSpirvEntryPointABIPass();
|
||||
void registerTestSpirvModuleCombinerPass();
|
||||
void registerTestTraitsPass();
|
||||
void registerTosaTestQuantUtilAPIPass();
|
||||
void registerVectorizerTestPass();
|
||||
|
||||
namespace test {
|
||||
|
@ -111,6 +112,7 @@ void registerTestPasses() {
|
|||
registerTestSpirvModuleCombinerPass();
|
||||
registerTestTraitsPass();
|
||||
registerVectorizerTestPass();
|
||||
registerTosaTestQuantUtilAPIPass();
|
||||
|
||||
test::registerConvertCallOpPass();
|
||||
test::registerInliner();
|
||||
|
|
Loading…
Reference in New Issue