cosineSimilarityAPSparse - 2023.2 English

Vitis Libraries

Release Date
2023.2 English
#include "xf_graph_L3.hpp"
event <int> cosineSimilarityAPSparse (
    xf::graph::L3::Handle& handle,
    uint32_t topK,
    xf::graph::Graph <uint32_t, float> gr,
    uint32_t** resultID,
    float** similarity

The all-pairs cosine similarity API for sparse graph.


handle Graph library L3 handle
topK Input, the output similarity buffer length
gr Input, CSR graph of IDs’ type of uint32_t and weights’ type of float
resultID Output, the topK highest similarity IDs of all vertices in the sparse graph
similarity Output, similarity values of all vertices in the sparse graph