-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[aievec] Add lowering for vector.extract_strided_slice
This is part of the canonical lowering of unaligned transfer read ops. For now we only support extracting a contiguous vector of half the size of the source vector.
- Loading branch information
Showing
32 changed files
with
1,849 additions
and
730 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,12 @@ | ||
# | ||
# This file is licensed 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 | ||
# | ||
# (c) Copyright 2022 Xilinx Inc. | ||
|
||
set(LLVM_TARGET_DEFINITIONS Passes.td) | ||
mlir_tablegen(Passes.h.inc -gen-pass-decls -name AIEVecAnalysis) | ||
add_public_tablegen_target(MLIRAIEVecAnalysisPassIncGen) | ||
|
||
add_mlir_doc(Passes AIEVecAnalysisPasses ./ -gen-pass-doc) |
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,46 @@ | ||
//===- Passes.h - AIE Vector Passes -----------------------------*- C++ -*-===// | ||
// | ||
// This file is licensed 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 | ||
// | ||
// (c) Copyright 2022 Xilinx Inc. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// Register all the AIE vectorization passes | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef AIE_DIALECT_AIEVEC_ANALYSIS_PASSES_H | ||
#define AIE_DIALECT_AIEVEC_ANALYSIS_PASSES_H | ||
|
||
#include "mlir/Pass/Pass.h" | ||
#include "mlir/Pass/PassOptions.h" | ||
#include <limits> | ||
|
||
//===----------------------------------------------------------------------===// | ||
// Registration | ||
//===----------------------------------------------------------------------===// | ||
|
||
namespace mlir { | ||
namespace func { | ||
class FuncOp; | ||
} // namespace func | ||
} // namespace mlir | ||
|
||
namespace xilinx { | ||
namespace aievec { | ||
|
||
#define GEN_PASS_DECL | ||
#define GEN_PASS_CLASSES | ||
#include "aie/Dialect/AIEVec/Analysis/Passes.h.inc" | ||
|
||
std::unique_ptr<Pass> createAIEVecConvolutionAnalysisPass(); | ||
|
||
/// Generate the code for registering passes. | ||
#define GEN_PASS_REGISTRATION | ||
#include "aie/Dialect/AIEVec/Analysis/Passes.h.inc" | ||
|
||
} // end namespace aievec | ||
} // end namespace xilinx | ||
|
||
#endif // AIE_DIALECT_AIEVEC_ANALYSIS_PASSES_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
//=== Passes.td - AIE vector analysis pass definition file -*- tablegen -*-===// | ||
// | ||
// This file is licensed 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 | ||
// | ||
// (c) Copyright 2023 AMD Inc. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// This file contains definitions for passes within the AIEVec/ directory. | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef AIE_DIALECT_AIEVEC_ANALYSIS_PASSES | ||
#define AIE_DIALECT_AIEVEC_ANALYSIS_PASSES | ||
|
||
include "mlir/Pass/PassBase.td" | ||
|
||
def AIEVecConvAnalysis : Pass<"aievec-convolution-analysis", "mlir::func::FuncOp"> { | ||
let summary = "Find MAC chains that can be replaced by convolution ops in " | ||
"AIE-ML"; | ||
let constructor = "xilinx::aievec::createAIEVecConvolutionAnalysisPass()"; | ||
let options = [ | ||
Option<"printResult", "print", "bool", /*default=*/"false", | ||
"Print the result of the analysis">, | ||
]; | ||
} | ||
|
||
#endif // AIE_DIALECT_AIEVEC_ANALYSIS_PASSES |
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 |
---|---|---|
|
@@ -5,5 +5,6 @@ | |
# | ||
# (c) Copyright 2022 Xilinx Inc. | ||
|
||
add_subdirectory(Analysis) | ||
add_subdirectory(IR) | ||
add_subdirectory(Transforms) |
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
Oops, something went wrong.