About Ct whitepaper and conjugate gradient..

About Ct whitepaper and conjugate gradient..

Hi I want to implement conjugate gradient with ARBB.. I have seen Ct whitepaper implements SPMV sample like here:
CCtVEC ctSparseMatrixVectorProductCSC(CCtVEC Values,CCtVEC RowIdx,CCtVEC ColP,CCtVEC v) {CCtVEC expv = ctDistribute(v,ColP);CCtVEC product = Values*expv;CCtVEC result =ctAddMultiReduce(product,RowIdx);return result;Could you elaborate on how much has evolvedARBBfrom CT so how this code needs code changes:basically similar functionality toctAddMultiReducectAddMultiReduce exists right?Also can you post a simple sample of conjugate gradient using SPMV in ARBB?Thanks.

3 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

Hi, if you are interested I tried CG a month ago.

typedef arbb::i64 ind_t;typedef arbb::uncaptured::type ind_ct;struct Matrix{arbb::dense nrows;arbb::dense cols;arbb::dense vals;};
using namespace arbb;void Ax(const Matrix &A, const dense &x, dense &y){dense colvals = gather(x, A.cols);dense mvals = colvals * A.vals;nested nmvals = reshape_nested_offsets(mvals, A.nrows);y = add_reduce(nmvals);}

To my surprise it was slower than without ArBB. At some point I noticed some casts from i32 to i64 in ArBB code and I tried to change index vector base types, but it did not help, original (without ArBB) Ax was still faster than with ArBB.

As I could not figure out what the problem was and I had not spare time I left it where it was. If you find some information, it will be interesting for me.


Hi, please download the latest version (ArBB Beta 2) and use that API. The Ct API is not compatible with the ArBB API. Let us know how your own CG performs with the latest Beta along with your implementation and we can see how it can be improved, or if we need to do some runtime optimizations to speed it up. In any case, if a function already exists in MKL to do it, use that. ArBB is best suited for non-canned algorithms where the pre-existing MKL/IPP functions do not exist.

Lascia un commento

Eseguire l'accesso per aggiungere un commento. Non siete membri? Iscriviti oggi