Posts

CPU vs GPU Floyd Warshall Test

Image
Floyd Warshall is a min path algorithm,  https://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm that can calculate the optimal distance between any two nodes in a graph.  Because of the way it works is easy to be translated in a parallel implementation that can run on a GPU using CUDA.  How the tests where performed.  For each test a random graph is generated with a predefined number of nodes and stored in a array, this makes it easier to reference the data from the kernel (the code that is executed on the GPU). The kernel is executed once for each node (basically the outer loop from the algorithm) The iterative version is executed The results of both version are compared to be sure are returning the same values.  A test is executed multiple times to have an idea of the running time variance.  Hardware used: https://www.techpowerup.com/gpu-specs/geforce-rtx-3050-mobile.c3788 https://www.techpowerup.com/cpu-specs/ryzen-5-6600h.c2525 Below are the re...