JuliaStats / Distances.jl

A Julia package for evaluating distances (metrics) between vectors.
Other
432 stars 98 forks source link

how to calculate Euclidean distance using GPU ? #137

Open zsz00 opened 5 years ago

zsz00 commented 5 years ago

how to calculate Euclidean distance using GPU ? I want to calculate Euclidean distance between 10000000x512 matrix and 10000000x512 matrix . Can I use GPU ?? and how to do this??

KristofferC commented 5 years ago

The code here is quite old (before juia ran anything on GPUs) and written using loops so it isn't really gpu friendly. You should be able to fairly easy write the euclidean distance using broadcasting which works on GPU (https://math.stackexchange.com/questions/2240429/pairwise-distance-matrix).