gwdidonato / hpgda-spring22

8 stars 10 forks source link

Possible inconsistency in spmv_coo_cpu #5

Closed frafad closed 2 years ago

frafad commented 2 years ago

Hi, is it possible that here at line 39 x and y should be swapped when the read_tuples_transposed flag is set to true? According me and @feDann they should be swapped because when the flag is set to true, x holds the column ids and y holds the row ids. https://github.com/gwdidonato/hpgda-spring22/blob/2416e55ce0c6406bf3bab7a8a8f383628fc6bc42/cuda_CONTEST/src/benchmarks/personalized_pagerank.cuh#L37-L41 https://github.com/gwdidonato/hpgda-spring22/blob/2416e55ce0c6406bf3bab7a8a8f383628fc6bc42/cuda_CONTEST/src/benchmarks/personalized_pagerank.cu#L51-L58

gwdidonato commented 2 years ago

Nope, because in the matrix formulation you need the X matrix that is T_transposed, where T=(D^-1)A. In our implementation, we directly load the adjacency matrix A as transposed (both the read_tuples_transposed and sort_tuples flags are true), and we assume the matrix is transposed in the whole implementation.

frafad commented 2 years ago

Ok perfect, thanks