Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
494 changes: 494 additions & 0 deletions experiments/StringExperiments.cpp

Large diffs are not rendered by default.

1,113 changes: 1,113 additions & 0 deletions experiments/analysis.ipynb

Large diffs are not rendered by default.

108 changes: 108 additions & 0 deletions experiments/experiments.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
#!/bin/bash

# Copyright 2021 The DAPHNE Consortium
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This script builds and runs the test cases for the DAPHNE prototype.
#
# Arguments to this script are forwarded to the test-case executable, i.e., all
# arguments to the catch2 main-function can be used. Invoke `./test.sh -h` or
# see https://github.com/catchorg/Catch2/blob/v2.x/docs/command-line.md for a
# reference.
#
# Invoke this script in the root directory "prototype".

# Stop immediately if any command fails.
set -e

catch2_options=""
BUILD_CUDA=""
BUILD_FPGAOPENCL=""
BUILD_MPI=""
BUILD_PAPI=""
BUILD_DEBUG=""
BUILD_DAPHNE=1

while [[ $# -gt 0 ]]; do
key=$1
shift
case $key in
--cuda)
echo using CUDA
export BUILD_CUDA="--cuda"
;;
--fpgaopencl)
echo using FPGAOPENCL
export BUILD_FPGAOPENCL="--fpgaopencl"
;;
--mpi)
echo using MPI
export BUILD_MPI="--mpi"
;;
--no-papi)
echo not using PAPI
export BUILD_PAPI="--no-papi"
;;
--debug)
echo building DEBUG version
export BUILD_DEBUG="--debug"
;;
-nb | --no-build)
BUILD_DAPHNE=0
;;
*)
catch2_options="${catch2_options} ${key}"
;;
esac
done

# Build tests.
if [ $BUILD_DAPHNE -gt 0 ]; then
./build.sh $BUILD_CUDA $BUILD_FPGAOPENCL $BUILD_MPI $BUILD_PAPI $BUILD_DEBUG --target run_tests
fi

# Preparations for running DaphneLib (Python API) tests and MLIR codegen tests (LLVM LIT)
export PYTHONPATH="$PYTHONPATH:$PWD/src/api/python/:/usr/lib/llvm-10/build/utils/lit/:/usr/lib/llvm-18/build/utils/lit/"
export DAPHNELIB_DIR_PATH=$PWD/lib
export PATH=$PWD/bin:/usr/lib/llvm-10/bin:/usr/lib/llvm-18/bin:$PATH
export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH

# Silence TensorFlow warnings in DaphneLib test cases.
export TF_CPP_MIN_LOG_LEVEL=3

# this speeds up the vectorized tests
export OPENBLAS_NUM_THREADS=1

# Find out if TensorFlow and PyTorch are available in Python and set environment
# variables accordingly. Used to switch the DaphneLib test cases for data transfer
# with these libraries on/off.
# As an alternative to environment variables, we could use a custom catch2 main
# function with custom CLI arguments, but that seems to be more complicated.
if python3 -c "import tensorflow" 2> /dev/null; then
export DAPHNE_DEP_AVAIL_TENSFORFLOW=1
else
export DAPHNE_DEP_AVAIL_TENSFORFLOW=0
fi
if python3 -c "import torch" 2> /dev/null; then
export DAPHNE_DEP_AVAIL_PYTORCH=1
else
export DAPHNE_DEP_AVAIL_PYTORCH=0
fi

# Run tests.
# shellcheck disable=SC2086
#./bin/run_tests $catch2_options
./bin/run_tests --reporter xml --out results.xml $catch2_options

set +e
303 changes: 303 additions & 0 deletions experiments/gen_dataset.ipynb

Large diffs are not rendered by default.

8,277 changes: 8,277 additions & 0 deletions experiments/results.xml

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions src/runtime/local/datastructures/DenseMatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,11 @@ template class DenseMatrix<unsigned long>;
template class DenseMatrix<bool>;
template class DenseMatrix<std::string>;
template class DenseMatrix<FixedStr16>;
template class DenseMatrix<FixedStr32>;
template class DenseMatrix<FixedStr64>;
template class DenseMatrix<FixedStr128>;
template class DenseMatrix<FixedStr256>;
template class DenseMatrix<Umbra_t>;
template class DenseMatrix<NewUmbra_t>;
template class DenseMatrix<UnorderedDictionaryEncodedString>;
template class DenseMatrix<OrderedDictionaryEncodedString>;
146 changes: 0 additions & 146 deletions src/runtime/local/datastructures/FixedSizeStringValueType.h

This file was deleted.

Loading