Skip to content

Commit

Permalink
Mv python gen script in 'codegen' folder and add the 'compress' doc i…
Browse files Browse the repository at this point in the history
…n the README.
  • Loading branch information
kouchy committed Apr 26, 2024
1 parent 43ed034 commit c16753f
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 24 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ To generate the source files containing these LUTs you need to install Python3
with the Jinja2 package:
```bash
sudo apt install python3 python3-pip
pip3 install --user -r requirements.txt
pip3 install --user -r codegen/requirements.txt
```

Then you can call the generator as follow:
```bash
python3 gencode.py
python3 codegen/gen_compress.py
```

And, finally you can compile the MIPP static library:
Expand Down Expand Up @@ -506,7 +506,7 @@ In the documentation there are some terms that requires to be clarified:
| `high` | `Reg_2<T> high (const Reg<T> r)` | Gets the high part of the `r` register. | `double`, `float`, `int64_t`, `uint64_t`, `int32_t`, `uint32_t`, `int16_t`, `uint16_t`, `int8_t`, `uint8_t` |
| `combine` | `Reg <T> combine (const Reg_2<T> r1, const Reg_2<T> r2)` | Combine two half registers in a full register, `r1` will be the low part and `r2` the high part. | `double`, `float`, `int64_t`, `uint64_t`, `int32_t`, `uint32_t`, `int16_t`, `uint16_t`, `int8_t`, `uint8_t` |
| `combine` | `Reg <S,T> combine (const Reg<T> r1, const Reg<T> r2)` | `S` elements of `r1` are shifted to the left, `(S - N) + N` elements of `r2` are shifted to the right. Shifted `r1` and `r2` are combined to give the result. | `double`, `float`, `int64_t`, `uint64_t`, `int32_t`, `uint32_t`, `int16_t`, `uint16_t`, `int8_t`, `uint8_t` |
| `compress` | `Reg <T> compress (const Reg<T> r1, const Msk<N> m)` | TODO. | `double`, `float`, `int64_t`, `uint64_t`, `int32_t`, `uint32_t`, `int16_t`, `uint16_t`, `int8_t`, `uint8_t` |
| `compress` | `Reg <T> compress (const Reg<T> r1, const Msk<N> m)` | Pack the elements of `r1` at the beginning of the register according to the bitmask `m` (if the bit is 1 then element is picked, otherwise it is not). | `double`, `float`, `int64_t`, `uint64_t`, `int32_t`, `uint32_t`, `int16_t`, `uint16_t`, `int8_t`, `uint8_t` |
| `cmask` | `Reg <T> cmask (const uint32_t[N ] ids)` | Creates a cmask from an indexes list (indexes have to be between 0 and N-1). | `double`, `float`, `int64_t`, `uint64_t`, `int32_t`, `uint32_t`, `int16_t`, `uint16_t`, `int8_t`, `uint8_t` |
| `cmask2` | `Reg <T> cmask2 (const uint32_t[N/2] ids)` | Creates a cmask2 from an indexes list (indexes have to be between 0 and (N/2)-1). | `double`, `float`, `int64_t`, `uint64_t`, `int32_t`, `uint32_t`, `int16_t`, `uint16_t`, `int8_t`, `uint8_t` |
| `cmask4` | `Reg <T> cmask4 (const uint32_t[N/4] ids)` | Creates a cmask4 from an indexes list (indexes have to be between 0 and (N/4)-1). | `double`, `float`, `int64_t`, `uint64_t`, `int32_t`, `uint32_t`, `int16_t`, `uint16_t`, `int8_t`, `uint8_t` |
Expand Down
7 changes: 7 additions & 0 deletions TODO..md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# TODO

- [ ] Add `compress` for NEONv1 with emulation of `vqtbl1q` based on two `vtbl2`
- [ ] Improve NEONv2 `shuff` operations with `vqtbl1q` instruction
- [ ] Create a docker image with "Intel Software Development Emulator" to enable
AVX-512 instructions emulation on the runners that does not support
native AVX-512
2 changes: 1 addition & 1 deletion ci/build-coverage-linux-armv7-gcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function gen_coverage_info {
fi
}

python3 gencode.py
python3 codegen/gen_compress.py

cd tests
mkdir code_coverage_files || true
Expand Down
2 changes: 1 addition & 1 deletion ci/build-coverage-linux-armv8-gcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function gen_coverage_info {
fi
}

python3 gencode.py
python3 codegen/gen_compress.py

cd tests
mkdir code_coverage_files || true
Expand Down
2 changes: 1 addition & 1 deletion ci/build-coverage-linux-x86-gcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function gen_coverage_info {
fi
}

python3 gencode.py
python3 codegen/gen_compress.py

cd tests
mkdir code_coverage_files || true
Expand Down
4 changes: 2 additions & 2 deletions ci/build-linux-armv7-clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ function compile {

apt update
apt install -y python3-pip
pip3 install --user -r requirements.txt
python3 gencode.py
pip3 install --user -r codegen/requirements.txt
python3 codegen/gen_compress.py

build_root=build_linux_armv7_clang
compile "${build_root}_nointr" "-DMIPP_NO_INTRINSICS"
Expand Down
4 changes: 2 additions & 2 deletions ci/build-linux-armv7-gcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ function compile {

apt update
apt install -y python3-pip
pip3 install --user -r requirements.txt
python3 gencode.py
pip3 install --user -r codegen/requirements.txt
python3 codegen/gen_compress.py

build_root=build_linux_armv7_gcc
compile "${build_root}_nointr" "-DMIPP_NO_INTRINSICS"
Expand Down
4 changes: 2 additions & 2 deletions ci/build-linux-armv8-clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ function compile {

apt update
apt install -y python3-pip
pip3 install --user -r requirements.txt
python3 gencode.py
pip3 install --user -r codegen/requirements.txt
python3 codegen/gen_compress.py

build_root=build_linux_armv8_clang
compile "${build_root}_nointr" "-DMIPP_NO_INTRINSICS"
Expand Down
4 changes: 2 additions & 2 deletions ci/build-linux-armv8-gcc-11.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ function compile {

apt update
apt install -y python3-pip
pip3 install --user -r requirements.txt
python3 gencode.py
pip3 install --user -r codegen/requirements.txt
python3 codegen/gen_compress.py

build_root=build_linux_armv8_gcc
compile "${build_root}_sve_ls256" "-march=armv8-a+sve -msve-vector-bits=256"
Expand Down
4 changes: 2 additions & 2 deletions ci/build-linux-armv8-gcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ function compile {

apt update
apt install -y python3-pip
pip3 install --user -r requirements.txt
python3 gencode.py
pip3 install --user -r codegen/requirements.txt
python3 codegen/gen_compress.py

build_root=build_linux_armv8_gcc
compile "${build_root}_nointr" "-DMIPP_NO_INTRINSICS"
Expand Down
4 changes: 2 additions & 2 deletions ci/build-linux-x86-clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ function compile {

apt update
apt install -y python3-pip
pip3 install --user -r requirements.txt
python3 gencode.py
pip3 install --user -r codegen/requirements.txt
python3 codegen/gen_compress.py

build_root=build_linux_x86_clang
compile "${build_root}_nointr" "-DMIPP_NO_INTRINSICS"
Expand Down
4 changes: 2 additions & 2 deletions ci/build-linux-x86-gcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ function compile {

apt update
apt install -y python3-pip
pip3 install --user -r requirements.txt
python3 gencode.py
pip3 install --user -r codegen/requirements.txt
python3 codegen/gen_compress.py

build_root=build_linux_x86_gcc
compile "${build_root}_nointr" "-DMIPP_NO_INTRINSICS"
Expand Down
4 changes: 2 additions & 2 deletions ci/build-linux-x86-icpc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ function compile {
cd ..
}

pip3 install --user -r requirements.txt
python3 gencode.py
pip3 install --user -r codegen/requirements.txt
python3 codegen/gen_compress.py

source /opt/intel/vars-intel.sh

Expand Down
4 changes: 2 additions & 2 deletions ci/build-macos-x86-clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ function compile {

apt update
apt install -y python3-pip
pip3 install --user -r requirements.txt
python3 gencode.py
pip3 install --user -r codegen/requirements.txt
python3 codegen/gen_compress.py

build_root=build_macos_x86_clang
compile "${build_root}_nointr" "-DMIPP_NO_INTRINSICS"
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit c16753f

Please sign in to comment.