Efficient k-Means in OpenCL
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
allocator
baselines
cl_kernels
cmake
configurations
container
images
libs
measurement
scripts
test
.gitignore
.gitmodules
.ycm_extra_conf.py
CMakeLists.txt
LICENSE
README.md
SystemConfig.h.in
Version.h.in
abstract_kmeans.hpp
bench.cpp
benchmark_configuration.hpp
binary_format.cpp
binary_format.hpp
buffer_cache.hpp
buffer_helper.cpp
buffer_helper.hpp
centroid_update_configuration.hpp
centroid_update_factory.hpp
cluster_generator.cpp
cluster_generator.hpp
clustering_benchmark.cpp
clustering_benchmark.hpp
common.hpp
configuration_parser.cpp
configuration_parser.hpp
csv.hpp
device_scheduler.hpp
fused_configuration.hpp
fused_factory.hpp
generator.cpp
kmeans.hpp
kmeans_armadillo.cpp
kmeans_armadillo.hpp
kmeans_common.cpp
kmeans_common.hpp
kmeans_configuration.hpp
kmeans_gpu_assisted.cpp
kmeans_gpu_assisted.hpp
kmeans_initializer.cpp
kmeans_initializer.hpp
kmeans_naive.cpp
kmeans_naive.hpp
kmeans_single_stage.hpp
kmeans_single_stage_buffered.hpp
kmeans_three_stage.hpp
kmeans_three_stage_buffered.hpp
labeling_configuration.hpp
labeling_factory.hpp
lloyd_gpu_feature_sum.cpp
lloyd_gpu_feature_sum.hpp
mass_update_configuration.hpp
mass_update_factory.hpp
matrix.hpp
picluster.cpp
simple_buffer_cache.cpp
simple_buffer_cache.hpp
single_device_scheduler.cpp
single_device_scheduler.hpp
temp.hpp
test.conf
test_csv.cpp
timer.hpp
transfer_bench.cpp
utility.hpp

README.md

CL k-Means

CL k-Means is an efficient and portable implementation of Lloyd's k-Means algorithm in OpenCL. It introduces a more efficient execution strategy that requires only a single pass over data. This single pass optimization is based on a new centroid update algorithm that features a reduced cache footprint.

Build Dependencies

Build Instructions

git clone --recursive https://github.com/TU-Berlin-DIMA/CL-kmeans.git
mkdir CL-kmeans/build
cd CL-kmeans/build
cmake -DCMAKE_BUILD_TYPE=Debug ..
make -j`grep processor /proc/cpuinfo | wc -l`

Usage

Generated binary files in simple file format.

./scripts/generate_features.py
./bench --csv runtime.csv --config ../configurations/intel_core_i7-6700K_three_stage.conf ../data/cluster_data_4f_10c_2048mb.bin
grep TotalTime *runtime_mnts.csv # Total runtime in microseconds in last column

Configurations

CL k-Means can be tuned to different types of processors using simple configuration files. Each file consists of a key-value pairs that define the execution strategy and hardware tuning options.

See example configurations for Intel Core i7-6700K and Nvidia GeForce GTX 1080 processors in the '/configurations' directory.

Publications

C. Lutz et al., "Efficient and Scalable k-Means on GPUs", in Datenbanken Spektrum 2018
C. Lutz et al., "Efficient k-Means on GPUs", in DaMoN 2018