Skip to content

Commit

Permalink
Update install_tsl.sh (#92)
Browse files Browse the repository at this point in the history
* Update install_tsl.sh

* changed ubuntu:23.04 to 22.04

* fixed issue with pip

* Fixed mask_storeu test

* removed whitespaces

* removed whitespaces

* Fixed Dockerfiles
  • Loading branch information
JPietrzykTUD authored Apr 26, 2024
1 parent b2dfa63 commit f344573
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 63 deletions.
13 changes: 7 additions & 6 deletions .github/actions/tsl-deb-build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
FROM ubuntu:23.04
FROM ubuntu:22.04

ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt-get update
RUN apt-get -y install bash build-essential binutils lintian debhelper dh-make devscripts

RUN mkdir -p /root/debbuild/tsl/DEBIAN
RUN mkdir -p /root/debbuild/tsl/usr/include/tsl/__hollistic

LABEL org.opencontainers.image.source=https://github.com/db-tu-dresden/TSL
LABEL org.opencontainers.image.description="DEB Builder for TSL"
LABEL org.opencontainers.image.licenses=Apache-2.0

COPY control /root/debbuild/tsl/DEBIAN/control
COPY postinst /root/debbuild/tsl/DEBIAN/postinst
COPY postrm /root/debbuild/tsl/DEBIAN/postrm

COPY entrypoint.sh /entrypoint.sh

LABEL org.opencontainers.image.source=https://github.com/db-tu-dresden/TSL
LABEL org.opencontainers.image.description="DEB Builder for TSL"
LABEL org.opencontainers.image.licenses=Apache-2.0

# ENTRYPOINT [ "/bin/bash" ]
ENTRYPOINT ["/entrypoint.sh"]
20 changes: 10 additions & 10 deletions .github/actions/tsl-generate/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
FROM amd64/ubuntu:23.04
FROM amd64/ubuntu:22.04

ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt-get update
RUN apt-get -y install software-properties-common \
python3-full python3-pip python3-venv \
git wget
python3-full python3-pip python3-venv python3-distutils \
git wget

RUN ls
RUN pwd

COPY requirements.txt /requirements.txt

RUN pip3 install --ignore-installed -r /requirements.txt --break-system-packages

LABEL org.opencontainers.image.source=https://github.com/db-tu-dresden/TSL
LABEL org.opencontainers.image.description="TSLerator Generation Image"
LABEL org.opencontainers.image.licenses=Apache-2.0
RUN pip3 install --ignore-installed -r /requirements.txt

COPY entrypoint.sh /entrypoint.sh
COPY target_flags_translate.py /target_flags_translate.py

LABEL org.opencontainers.image.source=https://github.com/db-tu-dresden/TSL
LABEL org.opencontainers.image.description="TSLGenerator Generation Image"
LABEL org.opencontainers.image.licenses=Apache-2.0

ENTRYPOINT ["/entrypoint.sh"]
12 changes: 6 additions & 6 deletions .github/actions/tsl-generator-all-in-one/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:23.04
FROM ubuntu:22.04

ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
Expand All @@ -7,7 +7,7 @@ RUN apt-get update
RUN apt-get -y install software-properties-common \
build-essential checkinstall \
make cmake lsb-release \
python3-full python3-pip python3-venv \
python3-full python3-pip python3-venv python3-distutils \
git wget bash

# Install gcc 13
Expand All @@ -29,10 +29,10 @@ RUN tar -xvf /root.tar.gz -C /tslgen
RUN rm /root.tar.gz
# COPY requirements.txt /requirements.txt

RUN pip install --ignore-installed -r /tslgen/requirements.txt --break-system-packages
RUN pip install --ignore-installed ruff yamllint --break-system-packages


#RUN pip3 install --ignore-installed --break-system-packages -r /tslgen/requirements.txt
#RUN pip3 install --ignore-installed --break-system-packages ruff yamllint
RUN pip3 install --ignore-installed -r /tslgen/requirements.txt
RUN pip3 install --ignore-installed ruff yamllint

LABEL org.opencontainers.image.source=https://github.com/db-tu-dresden/TSL
LABEL org.opencontainers.image.description="TSLGenerator Image"
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/tsl-rpm-build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ RUN dnf -y install fedora-packager rpmdevtools util-linux

RUN mkdir -p /root/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}

COPY entrypoint.sh /entrypoint.sh
COPY tsl.spec /root/rpmbuild/SPECS/tsl.spec

LABEL org.opencontainers.image.source=https://github.com/db-tu-dresden/TSL
LABEL org.opencontainers.image.description="RPM Builder for TSL"
LABEL org.opencontainers.image.licenses=Apache-2.0

COPY entrypoint.sh /entrypoint.sh
COPY tsl.spec /root/rpmbuild/SPECS/tsl.spec

ENTRYPOINT ["/entrypoint.sh"]
11 changes: 7 additions & 4 deletions .github/actions/tsl-test-arm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM arm64v8/ubuntu:23.04
FROM arm64v8/ubuntu:22.04

ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt update
RUN apt-get -y install \
Expand All @@ -11,10 +14,10 @@ RUN wget https://apt.llvm.org/llvm.sh && \
./llvm.sh 17 && \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-17 100

COPY entrypoint.sh /entrypoint.sh

LABEL org.opencontainers.image.source=https://github.com/db-tu-dresden/TSL
LABEL org.opencontainers.image.description="TSLerator Compilation Image for x86"
LABEL org.opencontainers.image.description="TSLGenerator Compilation Image for x86"
LABEL org.opencontainers.image.licenses=Apache-2.0

COPY entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
12 changes: 7 additions & 5 deletions .github/actions/tsl-test-x86/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM amd64/ubuntu:23.04
FROM amd64/ubuntu:22.04

ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt update
RUN apt-get -y install \
Expand All @@ -11,11 +14,10 @@ RUN wget https://apt.llvm.org/llvm.sh && \
./llvm.sh 17 && \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-17 100

COPY entrypoint.sh /entrypoint.sh

LABEL org.opencontainers.image.source=https://github.com/db-tu-dresden/TSL
LABEL org.opencontainers.image.description="TSLerator Compilation Image for x86"
LABEL org.opencontainers.image.description="TSLGenerator Compilation Image for x86"
LABEL org.opencontainers.image.licenses=Apache-2.0

COPY entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
#ENTRYPOINT ["/bin/bash"]
30 changes: 16 additions & 14 deletions .github/actions/tsl-validate/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
FROM amd64/ubuntu:23.04

RUN apt update
RUN apt-get -y install software-properties-common
FROM amd64/ubuntu:22.04

ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt update
RUN apt-get -y install software-properties-common

RUN add-apt-repository -y ppa:deadsnakes/ppa && \
apt update && apt-get -y install python3-pip
RUN python3 -m pip install --upgrade pip

#RUN python3 -m pip install --upgrade pip

RUN apt-get -y install \
python3.8 python3.8-venv \
python3.9 python3.9-venv \
python3.10 python3.10-venv \
python3.11 python3.11-venv \
python3.12 python3.12-venv && \
mkdir -p /py/venvs && \
python3.8 -m venv /py/venvs/py38 && \
python3.9 -m venv /py/venvs/py39 && \
python3.10 -m venv /py/venvs/py310 && \
python3.11 -m venv /py/venvs/py311 && \
python3.12 -m venv /py/venvs/py312
mkdir -p /py/venvs && \
python3.8 -m venv /py/venvs/py38 && \
python3.9 -m venv /py/venvs/py39 && \
python3.10 -m venv /py/venvs/py310 && \
python3.11 -m venv /py/venvs/py311 && \
python3.12 -m venv /py/venvs/py312

COPY requirements.txt /requirements.txt

Expand Down Expand Up @@ -49,10 +51,10 @@ RUN . /py/venvs/py312/bin/activate && \
pip install --ignore-installed ruff && pip install --ignore-installed yamllint && \
deactivate

COPY entrypoint.sh /entrypoint.sh

LABEL org.opencontainers.image.source=https://github.com/db-tu-dresden/TSL
LABEL org.opencontainers.image.description="TSLerator Validation Image for x86"
LABEL org.opencontainers.image.description="TSLGenerator Validation Image for x86"
LABEL org.opencontainers.image.licenses=Apache-2.0

COPY entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
2 changes: 1 addition & 1 deletion .github/workflows/install_tsl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ if [ -d "${UNPACK_DIR}/${TAR_PREFIX_TSL_DIR}/${TAR_PREFIX_GENERATION}${CHOSEN_TS
cp -r ${UNPACK_DIR}/${TAR_PREFIX_TSL_DIR}/${TAR_PREFIX_GENERATION}${CHOSEN_TSL_PATH}/supplementary ${WORK_DIR}
fi

cp ${UNPACK_DIR}/${TAR_PREFIX_TSL_DIR}/${TAR_PREFIX_GENERATION}${CHOSEN_TSL_PATH}/tsl.hpp ${INSTALL_DIR}
cp ${UNPACK_DIR}/${TAR_PREFIX_TSL_DIR}/${TAR_PREFIX_GENERATION}${CHOSEN_TSL_PATH}/tsl.hpp ${WORK_DIR}
28 changes: 14 additions & 14 deletions primitive_data/primitives/mask_ls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -402,27 +402,27 @@ testing:
implementation: |
using T = typename Vec::base_type;
using reg_t = typename Vec::register_type;
typename Vec::imask_type imask;
testing::rnd_init(&imask, 1);
const auto mask = tsl::to_mask<Vec>(imask);
std::size_t element_count = 1024;
testing::test_memory_helper_t<Vec> test_helper{Vec::vector_element_count(), false};
std::size_t repetition_count = 10000;
testing::test_memory_helper_t<Vec> test_helper{Vec::vector_element_count(), Vec::vector_element_count(), false};
bool allOk = true;
auto reference_result_ptr = test_helper.result_ref();
auto test_result_ptr = test_helper.result_target();
for(std::size_t i = 0; i < element_count; i += Vec::vector_element_count()){
for(size_t j = i; j < i + Vec::vector_element_count(); ++j) {
if ( (imask >> (j-i)) & 0b1 == 1 ) {
reference_result_ptr[j-i] = i;
auto test_data_ptr = test_helper.data_target();
std::cout << "STARTING: " << tsl::type_name<Vec>() << "\n";
for (auto rep = 0; rep < repetition_count; ++rep) {
testing::rnd_init(&imask, 1);
for (size_t i = 0; i < Vec::vector_element_count(); ++i) {
if ( (imask >> i) & 0b1 == 1 ) {
reference_result_ptr[i] = i+1;
} else {
reference_result_ptr[j-i] = 0;
reference_result_ptr[i] = Vec::vector_element_count()*2;
}
test_result_ptr[i] = Vec::vector_element_count()*2;
test_data_ptr[i] = i+1;
}
memset(test_result_ptr, 0, sizeof(typename Vec::base_type) + Vec::vector_element_count());
auto vec = set1<Vec>(i);
auto vec = loadu<Vec>(test_data_ptr);
const auto mask = tsl::to_mask<Vec>(imask);
storeu<Vec>(mask, test_result_ptr, vec);
test_helper.synchronize();
allOk &= test_helper.validate();
Expand Down

0 comments on commit f344573

Please sign in to comment.