Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Add support for nonlinear operations #27

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ede67e7
[feat] add support for look-up-table
HobbitQia Jul 17, 2024
3d060fd
merge
HobbitQia Jul 17, 2024
32a9671
[fix] change initialization for call and lut, then we can enable it o…
HobbitQia Jul 17, 2024
219d1d8
[update] add special functional support for div
HobbitQia Jul 22, 2024
b7f2926
[update] add special functional support for quantization
HobbitQia Jul 22, 2024
e26df4f
[fix] combine getelemtnptr + load/store in DFG
HobbitQia Jul 22, 2024
7fb0f61
[update] add support for int
HobbitQia Jul 24, 2024
7fbd95f
[feat] add support for fine-grained fusion
HobbitQia Aug 2, 2024
be01199
[update] add support for new special funtionalities in dfg
HobbitQia Aug 12, 2024
c7df862
[update] Add more detailed comments
HobbitQia Aug 24, 2024
f405e5e
[feat] split non-vectorized operations into seperate nodes rather tha…
HobbitQia Sep 4, 2024
42df212
[fix] only enable vectorization in integer format
HobbitQia Oct 3, 2024
73df393
[feat] parameterizable vectorization factor for tuning division patterns
HobbitQia Oct 25, 2024
e9d6c61
[feat] refactor codes for fine-grained fusion and special functions
HobbitQia Nov 12, 2024
67ffd08
[fix] resolve conflicts
HobbitQia Nov 12, 2024
050f675
[update] fix bugs & add a reference param.json
HobbitQia Nov 13, 2024
daceefd
[update] add nonlinear_test.cpp
HobbitQia Nov 13, 2024
88840d2
[update] rename vectorFactor to vectorFactorForIdiv
HobbitQia Nov 16, 2024
f0967de
[update] add idiv_test and enable github testing flow
HobbitQia Nov 16, 2024
553c187
[fix] correct path in cmake.yml
HobbitQia Nov 16, 2024
514b909
[fix] adjust file struct of test
HobbitQia Nov 16, 2024
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
9 changes: 9 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,13 @@ jobs:
# Build your program with the given configuration
run: make

- name: Test Nonlinear Feature
working-directory: ${{github.workspace}}/test
run: clang-12 -emit-llvm -O3 -fno-unroll-loops -fno-vectorize -o nonlinear_test.bc -c nonlinear_test.cpp && opt-12 -load ./build/src/libmapperPass.so -mapperPass nonlinear_test.bc

- name: Test Idiv Feature
working-directory: ${{github.workspace}}/test
run: clang-12 -emit-llvm -O3 -fno-unroll-loops -fno-vectorize -o idiv_test.bc -c idiv_test.cpp && opt-12 -load ./build/src/libmapperPass.so -mapperPass idiv_test.bc

HobbitQia marked this conversation as resolved.
Show resolved Hide resolved


23 changes: 23 additions & 0 deletions test/idiv_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#define NTAPS 2048

int input[NTAPS], output[NTAPS];

void kernel(int* __restrict__ input, int* __restrict__ output);

int main()
{
kernel(input, output);

return 0;
}

void kernel(int* __restrict__ input, int* __restrict__ output)
/* input : input sample array */
/* output: output sample array */
{
#pragma clang loop vectorize(enable)
for (int i = 0; i < NTAPS; i++) {
int x = input[i];
output[i] = x / 3;
}
}
Loading