14.08.2013 Views

Tutorial slides (PDF) - Clemson University

Tutorial slides (PDF) - Clemson University

Tutorial slides (PDF) - Clemson University

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

NumPy - FLOPS<br />

Optimized BLAS available via NumPy via np.dot. Handles<br />

general inner product of multi-dimensional arrays.<br />

Very difficult to cross-compile on BG/P. Blame disutils!<br />

core/_dotblas.so is a sign of optimized NumPy dot<br />

Python wrapper overhead is negligible<br />

For matrix * vector products, NumPy dot can yield better<br />

performance than direct call to GEMV!<br />

Fused floating-point multiply-add instructions are not<br />

created for AXPY type operation in pure Python. Not<br />

available in NumPy either.<br />

for i in xrange(N):<br />

Y[i] += alpha*X[i]<br />

C[i] += A[i]*B[i]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!