Skip to content
champ-hubPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

SYCL-HD: Framework for Hyperdimensional Computing

SYCL-HD is developed with the aim of efficiently and robustly running tasks based on HDC across devices of different architectures while fully exploiting their processing capabilities. It's main strenghts are:

  • Performance: through highly parellelized source code and reliability on the C++ and SYCL standards.
  • Versatility: SYCL ensures that almost any device can be targeted out of the box, from HPC to embedded.
  • Beginner Friendly: Beginner users can code with the library without extensive knowlegde of SYCL and C++.
  • Powerful: SYCL-HD gives experienced users a convenient way to manage Hypervector buffers, so you can write the optimized kernels for your application, with minimal hassle.

Citation

If you use SYCL-HD in your research, please cite:

@inproceedings{caires2026syclhd,
  title     = {SYCL-HD: Parallel Framework for Hyperdimensional Computing},
  author    = {Pedro Caires and Aleksandar Ilic and Leonel Sousa},
  booktitle = {Proceedings of the 24th International Workshop on Algorithms, Models and Tools for Parallel Computing on Heterogeneous Platforms (HeteroPar 2026)},
  series    = {Lecture Notes in Computer Science},
  publisher = {Springer},
  year      = {2026}
}

Installing

The library is built with CMake allowing it to be easily integrated into your workflow. Check here for detailed instructions on how to install

Documentation

Documentation is generated by Doxygen. Check here for general information and instructions on how to build the documentation.

Examples

Many examples are provided in the repository. A simple one is the Dollar of Mexico:

// Dollar of mexico atomic symbols
std::vector<std::string> keys = {"Name","Capital","Currency"};
std::vector<std::string> values = {"USA","WDC","Dollar",
                                    "Mexico","Mex. City","Peso"};
// Model set up
auto mymodel = hd::BSC(8*100);

//Generate atom rep
auto keys_rep = mymodel.genAtomicRep(keys);             // size 3*800
auto values_rep = mymodel.genAtomicRep(values);         // size 6*800

// Encode full representation
std::vector<std::vector<std::string>> data = {{"USA","WDC","Dollar"},
                                                {"Mexico","Mex. City","Peso"}};
                                    
auto countries_rep = keys_rep.baseLevel(values_rep,data); // size 2*800
auto full_rep = countries_rep.bindDown();                 // size 1*800

//Place in AM
auto AM = keys_rep.stack(values_rep);
std::cout << std::endl;

// Query
auto dollar = values_rep["Dollar"];              // size 1*800
auto query = full_rep.unbind(dollar);            // size 1*800

auto result = AM.query(query)[0]; // [0] converts vector with 1 element to string

// Should output: Peso
std::cout << "The 'Dollar of Mexico' is: " << result << std::endl << std::endl;

Supported models

Supported models are:

  • Binary Spatter Codes (BSC)
  • Ternary Multiply-Add-Permute (TMAP)
  • Multiply-Add-Permute (MAP)

Running tests:

It is then possible to compile and run the unit tests by using the following command inside your build directory:

make tests && ./tests/tests

This will also inform you of the default device selected by SYCL.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages