-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to support Vitis 2020.1 and 2018.2 simultaneously
- Loading branch information
1 parent
7634356
commit 71bf094
Showing
6 changed files
with
89 additions
and
114 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
Submodule hlslib
updated
3 files
+1 −1 | cmake/FindVitis.cmake | |
+85 −43 | include/hlslib/xilinx/Stream.h | |
+7 −2 | xilinx_test/CMakeLists.txt |
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
/// @author Johannes de Fine Licht ([email protected]) | ||
/// @date August 2017 | ||
/// @copyright This software is copyrighted under the BSD 3-Clause License. | ||
|
||
#pragma once | ||
|
@@ -11,68 +10,59 @@ | |
|
||
// Read wide bursts from memory, then distribute it into separate column | ||
// buffers, which will be read out in column-major order and sent to the kernel | ||
void ReadA(MemoryPackK_t const a[], | ||
Stream<Data_t, 2 * kOuterTileSizeN> aSplit[kTransposeWidth], | ||
void ReadA(MemoryPackK_t const a[], Stream<Data_t> aSplit[kTransposeWidth], | ||
unsigned n, unsigned k, unsigned m); | ||
|
||
// We pop from the column buffers in column-major order, funneling the | ||
// transposed data to the kernel | ||
#ifdef MM_CONVERT_A | ||
|
||
void TransposeA(Stream<Data_t, 2 * kOuterTileSizeN> aSplit[kTransposeWidth], | ||
Stream<Data_t, kPipeDepth> &toKernel, | ||
unsigned n, unsigned k, unsigned m); | ||
void TransposeA(Stream<Data_t> aSplit[kTransposeWidth], | ||
Stream<Data_t> &toKernel, unsigned n, unsigned k, unsigned m); | ||
|
||
void ConvertWidthA(Stream<Data_t, kPipeDepth> &narrow, | ||
Stream<ComputePackN_t, kPipeDepth> &wide, | ||
void ConvertWidthA(Stream<Data_t> &narrow, Stream<ComputePackN_t> &wide, | ||
unsigned, unsigned k, unsigned m); | ||
|
||
#else | ||
|
||
void TransposeA(Stream<Data_t, 2 * kOuterTileSizeN> aSplit[kTransposeWidth], | ||
Stream<ComputePackN_t, kPipeDepth> &toKernel, | ||
unsigned n, unsigned k, unsigned m); | ||
void TransposeA(Stream<Data_t> aSplit[kTransposeWidth], | ||
Stream<ComputePackN_t> &toKernel, unsigned n, unsigned k, | ||
unsigned m); | ||
#endif | ||
|
||
#else // MM_TRANSPOSED_A | ||
#else // MM_TRANSPOSED_A | ||
|
||
void ReadATransposed(MemoryPackN_t const memory[], | ||
Stream<MemoryPackN_t, 2 * kOuterTileSizeNMemory> &pipe, | ||
void ReadATransposed(MemoryPackN_t const memory[], Stream<MemoryPackN_t> &pipe, | ||
const unsigned size_n, const unsigned size_k, | ||
const unsigned size_m); | ||
|
||
void ConvertWidthATransposed( | ||
Stream<MemoryPackN_t, 2 * kOuterTileSizeNMemory> &pipe_in, | ||
Stream<ComputePackN_t, kPipeDepth> &pipe_out, const unsigned size_n, | ||
const unsigned size_k, const unsigned size_m); | ||
void ConvertWidthATransposed(Stream<MemoryPackN_t> &pipe_in, | ||
Stream<ComputePackN_t> &pipe_out, | ||
const unsigned size_n, const unsigned size_k, | ||
const unsigned size_m); | ||
|
||
#endif | ||
|
||
void ReadB(MemoryPackM_t const memory[], | ||
Stream<MemoryPackM_t, 2 * kOuterTileSizeMMemory> &pipe, | ||
void ReadB(MemoryPackM_t const memory[], Stream<MemoryPackM_t> &pipe, | ||
unsigned n, unsigned k, unsigned m); | ||
|
||
#ifdef MM_CONVERT_B | ||
|
||
void ConvertWidthB(Stream<MemoryPackM_t, 2 * kOuterTileSizeMMemory> &wide, | ||
Stream<ComputePackM_t> &narrow, | ||
void ConvertWidthB(Stream<MemoryPackM_t> &wide, Stream<ComputePackM_t> &narrow, | ||
unsigned n, unsigned k, unsigned m); | ||
|
||
void FeedB(Stream<ComputePackM_t> &converted, | ||
Stream<ComputePackM_t, kPipeDepth> &toKernel, | ||
void FeedB(Stream<ComputePackM_t> &converted, Stream<ComputePackM_t> &toKernel, | ||
unsigned n, unsigned k, unsigned m); | ||
|
||
#else | ||
|
||
void FeedB(Stream<ComputePackM_t, 2 * kOuterTileSizeMMemory> &fromMemory, | ||
Stream<ComputePackM_t, kPipeDepth> &toKernel, | ||
void FeedB(Stream<ComputePackM_t> &fromMemory, Stream<ComputePackM_t> &toKernel, | ||
unsigned n, unsigned k, unsigned m); | ||
|
||
#endif | ||
|
||
void ConvertWidthC(Stream<OutputPack_t> &narrow, | ||
Stream<MemoryPackM_t, 2 * kOuterTileSizeMMemory> &wide, | ||
void ConvertWidthC(Stream<OutputPack_t> &narrow, Stream<MemoryPackM_t> &wide, | ||
unsigned n, unsigned k, unsigned m); | ||
|
||
void WriteC(Stream<MemoryPackM_t, 2 * kOuterTileSizeMMemory> &pipe, | ||
MemoryPackM_t memory[], unsigned n, unsigned k, unsigned m); | ||
void WriteC(Stream<MemoryPackM_t> &pipe, MemoryPackM_t memory[], unsigned n, | ||
unsigned k, unsigned m); |
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.